/* ============================================================
   Admin panel karanlik tema
   ------------------------------------------------------------
   Calisma bicimi: html[data-theme="dark"] varken devreye girer;
   attribute yokken (aydinlik mod) bu dosyadaki hicbir kural
   eslesmez, aydinlik gorunum bayt bayt ayni kalir.
   dashboard.css kurallarinin cogu !important tasidigi icin
   buradaki override'lar da !important kullanir (yalniz dark
   kapsaminda olduklarindan aydinlik moda etkileri yoktur).
   Tuzaklar (style.css envanterinden):
   - --white-color / --black-color TOKENLARI CEVRILMEZ: ayni
     token hem yuzey hem buton METIN rengi olarak kullaniliyor.
   - .sidebar .side-menu .dropdown-menu transparent kalmali;
     genel .dropdown-menu kurali sonrasi yeniden atanir.
   - .note-editable BILEREK beyaz kalir: e-posta/sayfa icerigi
     beyaz zeminde goruntulenecegi icin editor yuzeyi acik kalir.
   ============================================================ */

/* --- Tema toggle ikonu (header) — iki temada da gecerli altyapi.
   Gunes ikonu blade'de inline display:none tasir (bu dosya yuklenemezse
   iki ikon birden gorunmesin); dark'ta acmak icin !important gerekir. --- */
.theme-toggle .fa-sun { display: none; }
html[data-theme="dark"] .theme-toggle .fa-moon { display: none !important; }
html[data-theme="dark"] .theme-toggle .fa-sun { display: inline-block !important; }

html[data-theme="dark"] {
    color-scheme: dark; /* native scrollbar, date/select, audio controls */

    /* Karanlik palet (marka #1b1b2f ailesi) */
    --rbd-bg: #131320;          /* sayfa zemini */
    --rbd-surface: #1b1b2c;     /* kart / sidebar / tablo yuzeyi */
    --rbd-surface-2: #232336;   /* yukseltilmis yuzey: dropdown, modal, thead */
    --rbd-input: #20202f;       /* form kontrolleri */
    --rbd-border: rgba(255, 255, 255, 0.08);
    --rbd-border-strong: rgba(255, 255, 255, 0.16);
    --rbd-text: #e6e6f0;
    --rbd-text-2: #b9b9c9;
    --rbd-muted: #8f8fa3;
    --rbd-primary: #8d84f0;     /* #4e45b8'in koyu zeminde okunur hali */

    /* style.css :root tokenlarinin guvenli cevrimleri
       (--white-color / --black-color / renkli tokenlar haric) */
    --body-color: var(--rbd-text);
    --light-color: rgba(255, 255, 255, 0.09);   /* acik border'lar */
    --dark-color: rgba(0, 0, 0, 0.35);          /* golgeler */
    --sidebar-color: var(--rbd-surface);
    --sidebar-a-color: #9a9ab0;
    --sidebar-icon-color: var(--rbd-muted);
    --input-group-color: var(--rbd-border-strong); /* header arama cercevesi (#010101 idi) */
    --border-bottom-color: rgba(255, 255, 255, 0.16);
    --table-th-tr-color: rgba(255, 255, 255, 0.035);
    --table-color: #c9c9d6;
    --cutom-tab-color: var(--rbd-surface-2);
    --artist-card-color: rgba(0, 0, 0, 0.3);
    --video-card-color: rgba(30, 30, 46, 0.88);
    --pagination-color: var(--rbd-surface-2);
    --form-group: var(--rbd-input);
    --radio-group-before: #5a5a70;
    --login-bg: var(--rbd-bg);
    --avatar-edit: rgba(0, 0, 0, 0.5);
    --avatar-edit-hover: #2a2a3e;
    --avatar-edit-hover-border: #3a3a52;
    --import-file-input: var(--rbd-surface-2);
    --import-file: var(--rbd-muted);
    --light-gray: #9a9aa8;
    --avatar-lebal: var(--rbd-text-2);
    --rebbin-color: rgba(255, 255, 255, 0.12);
    --rebbin-text: rgba(255, 255, 255, 0.25);
}

/* --- Govde --- */
html[data-theme="dark"] body {
    background-color: var(--rbd-bg) !important;
    color: var(--rbd-text);
}

html[data-theme="dark"] .right-content {
    background: var(--rbd-bg) !important;
}

html[data-theme="dark"] .primary-color {
    color: var(--rbd-primary);
}

/* --- Header --- */
html[data-theme="dark"] .header {
    background: rgba(27, 27, 44, 0.97) !important;
    border-bottom: 1px solid var(--rbd-border) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .header .page-title,
html[data-theme="dark"] .page-title-sm {
    color: var(--rbd-text) !important;
}

html[data-theme="dark"] .header .side-logo h3,
html[data-theme="dark"] .sidebar .side-logo h3 {
    color: var(--rbd-primary) !important;
    -webkit-text-fill-color: var(--rbd-primary) !important;
}

html[data-theme="dark"] .header .head-control .btn {
    border-color: var(--rbd-border) !important;
}

html[data-theme="dark"] .header .head-control .btn:hover {
    background: var(--rbd-surface-2) !important;
}

/* --- Sidebar --- */
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .sidebar.hide-sidebar {
    background: var(--rbd-surface) !important;
    border-right: 1px solid var(--rbd-border) !important;
}

html[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14) !important;
}

html[data-theme="dark"] .sidebar .side-toggle span {
    background: #5a5a70 !important;
}

html[data-theme="dark"] .sidebar .side-menu .partition {
    color: var(--rbd-muted) !important;
    border-bottom-color: var(--rbd-border) !important;
}

/* .partition span zemini sidebar zeminiyle AYNI olmali (cizgi maskeleme) */
html[data-theme="dark"] .partition span {
    background: var(--rbd-surface) !important;
    color: var(--rbd-muted) !important;
}

html[data-theme="dark"] .sidebar .side-menu a {
    color: #a3a3b8 !important;
}

html[data-theme="dark"] .sidebar .side-menu a .menu-icon,
html[data-theme="dark"] .sidebar .side-menu a .submenu-icon {
    color: var(--rbd-muted) !important;
}

html[data-theme="dark"] .sidebar .side-menu a:hover {
    color: var(--rbd-text) !important;
    background: var(--rbd-surface-2) !important;
}

html[data-theme="dark"] .sidebar .side-menu a:hover .menu-icon,
html[data-theme="dark"] .sidebar .side-menu a:hover .submenu-icon {
    color: var(--rbd-text-2) !important;
}

html[data-theme="dark"] .sidebar .side-menu .active > a,
html[data-theme="dark"] .sidebar .side-menu .side_line.active > a,
html[data-theme="dark"] .sidebar .side-menu li.active > a,
html[data-theme="dark"] .sidebar.hide-sidebar .side-menu .active > a,
html[data-theme="dark"] .sidebar.hide-sidebar .side-menu .side_line.active > a {
    background: rgba(78, 69, 184, 0.3) !important;
    color: #b5aef8 !important;
}

html[data-theme="dark"] .sidebar .side-menu .active > a .menu-icon,
html[data-theme="dark"] .sidebar .side-menu .side_line.active > a .menu-icon {
    color: #b5aef8 !important;
}

html[data-theme="dark"] .sidebar .side-menu .dropdown-toggle::after {
    border-top-color: #5a5a70 !important;
}

/* Alt menu konteyneri seffaf kalmali (genel .dropdown-menu kuralindan sonra) */
html[data-theme="dark"] .sidebar .side-menu .dropdown-menu,
html[data-theme="dark"] .sidebar .side-menu .side-submenu {
    background: transparent !important;
    border-left-color: var(--rbd-border-strong) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .sidebar .side-menu .dropdown-menu .dropdown-item,
html[data-theme="dark"] .sidebar .side-menu .side-submenu a {
    color: #a3a3b8 !important;
    border-bottom: none !important;
}

html[data-theme="dark"] .sidebar .side-menu .dropdown-menu .dropdown-item:hover,
html[data-theme="dark"] .sidebar .side-menu .side-submenu a:hover {
    color: var(--rbd-text) !important;
    background: var(--rbd-surface-2) !important;
}

html[data-theme="dark"] .sidebar .side-menu .side-submenu .active a,
html[data-theme="dark"] .sidebar .side-menu .side-submenu .side_line.active a,
html[data-theme="dark"] .sidebar .side-menu .dropdown-menu .side_line.active .dropdown-item {
    background: rgba(78, 69, 184, 0.3) !important;
    color: #b5aef8 !important;
}

html[data-theme="dark"] .sidebar .side-menu .side-submenu .active a .submenu-icon,
html[data-theme="dark"] .sidebar .side-menu .dropdown-menu .side_line.active .dropdown-item .submenu-icon {
    color: #b5aef8 !important;
}

/* Cikis linki hover (acikta #fff0f0 + kirmizi) */
html[data-theme="dark"] .sidebar .side-menu li:last-child > a:hover {
    background: rgba(229, 62, 62, 0.16) !important;
    color: #ff8585 !important;
}

html[data-theme="dark"] .sidebar .side-menu li:last-child > a:hover .menu-icon {
    color: #ff8585 !important;
}

/* --- Breadcrumb --- */
html[data-theme="dark"] .breadcrumb-item a { color: var(--rbd-primary) !important; }
html[data-theme="dark"] .breadcrumb-item a:hover { color: #b5aef8 !important; }
html[data-theme="dark"] .breadcrumb-item.active { color: var(--rbd-muted) !important; }
html[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before { color: #5a5a70 !important; }
html[data-theme="dark"] .border-bottom.row.mb-3 { border-bottom-color: var(--rbd-border) !important; }

/* --- Kartlar: stat-card / modern-* (dashboard.css sabit #fff yazar) --- */
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .modern-chart-card,
html[data-theme="dark"] .modern-info-card,
html[data-theme="dark"] .modern-media-card {
    background: var(--rbd-surface) !important;
    border-color: var(--rbd-border) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .stat-card:hover,
html[data-theme="dark"] .modern-media-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5) !important;
}

/* Uyari kartlarinin alarm cercevesi genel .stat-card border override'ina
   yenilmesin (ozgulluk: (0,2,1) genel kurali gecmek icin ayrica yazilir) */
html[data-theme="dark"] .stat-card--reports.has-new {
    border-color: rgba(235, 51, 73, 0.55) !important;
}

html[data-theme="dark"] .stat-card--errors.has-new {
    border-color: rgba(247, 151, 30, 0.55) !important;
}

html[data-theme="dark"] .stat-card__label { color: var(--rbd-muted) !important; }

html[data-theme="dark"] .stat-card__value,
html[data-theme="dark"] .modern-chart-card__title,
html[data-theme="dark"] .modern-info-card__title,
html[data-theme="dark"] .modern-media-card__name {
    color: var(--rbd-text) !important;
}

html[data-theme="dark"] .stat-card__link {
    background: rgba(255, 255, 255, 0.07) !important;
    color: var(--rbd-text-2) !important;
}

html[data-theme="dark"] .modern-chart-card__subtitle,
html[data-theme="dark"] .modern-media-card__plays {
    color: var(--rbd-muted) !important;
}

html[data-theme="dark"] .modern-chart-card__title i,
html[data-theme="dark"] .modern-info-card__title i,
html[data-theme="dark"] .modern-chart-card__viewall {
    color: var(--rbd-primary) !important;
}

html[data-theme="dark"] .modern-chart-btn {
    background: var(--rbd-surface-2) !important;
    color: var(--rbd-text-2) !important;
}

html[data-theme="dark"] .modern-chart-btn:hover {
    background: rgba(78, 69, 184, 0.3) !important;
    color: #b5aef8 !important;
}

/* --- Genel kart + dropdown (style.css: .dropdown-menu,.card {#ffffffe3}) --- */
html[data-theme="dark"] .card {
    background-color: var(--rbd-surface) !important;
    border: 1px solid var(--rbd-border) !important;
}

html[data-theme="dark"] .card-header {
    background: var(--rbd-surface-2) !important;
    border-bottom: 1px solid var(--rbd-border) !important;
    color: var(--rbd-text) !important;
}

html[data-theme="dark"] .dropdown-menu {
    background-color: var(--rbd-surface-2) !important;
    border: 1px solid var(--rbd-border) !important;
}

html[data-theme="dark"] .dropdown-menu .dropdown-item,
html[data-theme="dark"] .dropdown-item {
    color: #cfcfdd !important;
}

html[data-theme="dark"] .dropdown-menu .dropdown-item:hover,
html[data-theme="dark"] .dropdown-menu .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--rbd-text) !important;
}

html[data-theme="dark"] .dropdown-divider { border-top-color: var(--rbd-border) !important; }

/* Header profil menusu (dashboard.css item rengi #555) */
html[data-theme="dark"] .header .dropdown-menu .dropdown-item { color: #cfcfdd !important; }
html[data-theme="dark"] .header .dropdown-menu .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--rbd-text) !important;
}

/* --- Modal (Bootstrap beyazi) --- */
html[data-theme="dark"] .modal-content {
    background-color: var(--rbd-surface) !important;
    color: var(--rbd-text);
    /* dashboard.css 'border: none !important' der; !important sart */
    border: 1px solid var(--rbd-border-strong) !important;
}

html[data-theme="dark"] .modal-header { border-bottom-color: var(--rbd-border) !important; }
html[data-theme="dark"] .modal-footer { border-top-color: var(--rbd-border) !important; }
html[data-theme="dark"] .modal-title { color: var(--rbd-text) !important; }

html[data-theme="dark"] .modal .close,
html[data-theme="dark"] .close {
    color: var(--rbd-text) !important;
    text-shadow: none !important;
}

/* --- Tablolar --- */
html[data-theme="dark"] .table-responsive {
    background: var(--rbd-surface) !important;
    border-color: var(--rbd-border) !important;
}

html[data-theme="dark"] .table { color: var(--rbd-text-2) !important; }

html[data-theme="dark"] .table thead tr {
    background: linear-gradient(135deg, #20202f, #262639) !important;
}

html[data-theme="dark"] .table thead th {
    color: var(--rbd-text-2) !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.06) !important;
    border-top-color: var(--rbd-border) !important;
}

html[data-theme="dark"] .table tbody td {
    color: #cfcfdd !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

html[data-theme="dark"] .table tbody tr:hover {
    background: rgba(78, 69, 184, 0.14) !important;
}

html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.02) !important;
}

html[data-theme="dark"] .table-striped tbody tr:nth-of-type(even) {
    background: transparent !important;
}

html[data-theme="dark"] .table-bordered,
html[data-theme="dark"] .table-bordered td,
html[data-theme="dark"] .table-bordered th {
    border-color: var(--rbd-border) !important;
}

/* Acik zeminli logo/gorseller karanlik zeminde kaybolmasin */
html[data-theme="dark"] .table img.rounded-circle,
html[data-theme="dark"] .thumbnail-img {
    background-color: #fff;
}

/* --- DataTables kontrolleri --- */
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--rbd-text-2) !important;
}

html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(78, 69, 184, 0.25) !important;
    color: #b5aef8 !important;
    border-color: transparent !important;
}

html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
html[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    color: #55556a !important;
    background: transparent !important;
}

html[data-theme="dark"] .dataTables_wrapper .dataTables_info { color: var(--rbd-muted) !important; }

html[data-theme="dark"] .dataTables_wrapper .dataTables_length select {
    background-color: var(--rbd-input) !important;
    color: var(--rbd-text) !important;
    border-color: var(--rbd-border-strong) !important;
}

html[data-theme="dark"] .dataTables_wrapper .dataTables_processing {
    background: rgba(19, 19, 32, 0.92) !important;
    color: var(--rbd-text-2) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}

/* --- Sayfalama (style.css .page-link !important tasir) --- */
html[data-theme="dark"] .pagination { border-color: var(--rbd-border) !important; }

html[data-theme="dark"] .pagination .page-link {
    background: var(--rbd-surface-2) !important;
    color: #cfcfdd !important;
    border-color: var(--rbd-border) !important;
}

html[data-theme="dark"] .pagination .arrow-icon {
    filter: invert(0.85);
}

/* --- Formlar --- */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .custom-select,
html[data-theme="dark"] textarea.form-control,
html[data-theme="dark"] select.form-control {
    background-color: var(--rbd-input) !important;
    color: var(--rbd-text) !important;
    border-color: var(--rbd-border-strong) !important;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .custom-select:focus {
    background-color: var(--rbd-surface-2) !important;
    color: var(--rbd-text) !important;
}

html[data-theme="dark"] .form-control::placeholder { color: #77778c !important; }

html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-control[readonly] {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--rbd-muted) !important;
}

/* dashboard.css'in koyu (fill=%23666) select oku -> acik ok */
html[data-theme="dark"] select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b9b9c9' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
}

html[data-theme="dark"] .form-group label,
html[data-theme="dark"] label {
    color: var(--rbd-text-2) !important;
}

html[data-theme="dark"] .input-group-text {
    background-color: var(--rbd-surface-2) !important;
    color: var(--rbd-muted) !important;
    border-color: var(--rbd-border-strong) !important;
}

html[data-theme="dark"] .import-file { color: var(--rbd-text) !important; }

html[data-theme="dark"] .import-file::file-selector-button {
    background: #3a3a52 !important;
    color: var(--rbd-text) !important;
}

html[data-theme="dark"] .hexcolor {
    background-color: var(--rbd-input) !important;
    color: var(--rbd-text) !important;
}

/* Onay kutusu / radio (secili degilken) */
html[data-theme="dark"] .custom-control-label::before {
    background-color: var(--rbd-input);
    border-color: #5a5a70;
}

html[data-theme="dark"] .radio-group .custom-control-label {
    color: #cfcfdd !important; /* admob sayfa-ici #1b1b1b kuralini da ezer */
}

/* secili radio chip'i primary zeminli kalir; metni beyaz kalmali */
html[data-theme="dark"] .radio-group .custom-control-input:checked ~ .custom-control-label {
    color: #fff !important;
}

/* Avatar duzenle butonu: acikta beyaz yuvarlak buton; ikonu tokenla
   acildigi icin zemin de koyulastirilmali (yoksa acik ikon beyazda kaybolur) */
html[data-theme="dark"] .avatar-edit input + label,
html[data-theme="dark"] .avatar-edit-landscape input + label {
    background: var(--rbd-surface-2) !important;
}

/* --- Select2 (page-app inline stili + kutuphane beyazlari) --- */
html[data-theme="dark"] .select2-container .select2-selection--single,
html[data-theme="dark"] .select2-container .select2-selection--multiple {
    background: var(--rbd-input) !important;
    border-color: var(--rbd-border-strong) !important;
}

html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--rbd-text) !important;
}

html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #77778c !important;
}

html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--rbd-text-2) transparent transparent transparent !important;
}

html[data-theme="dark"] .select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent var(--rbd-text-2) transparent !important;
}

html[data-theme="dark"] .select2-dropdown {
    background: var(--rbd-surface-2) !important;
    border-color: var(--rbd-border-strong) !important;
}

html[data-theme="dark"] .select2-search--dropdown .select2-search__field {
    background: var(--rbd-input) !important;
    color: var(--rbd-text) !important;
    border-color: var(--rbd-border-strong) !important;
}

html[data-theme="dark"] .select2-results__option { color: #cfcfdd; }

html[data-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"] {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--rbd-text) !important;
}

html[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: #3a3a52 !important;
    color: var(--rbd-text) !important;
    border-color: var(--rbd-border-strong) !important;
}

html[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--rbd-text-2) !important;
}

/* focus gostergesi: page-app head-ici kuralin dark'ta da gorunmesi icin */
html[data-theme="dark"] .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--rbd-primary) !important;
}

/* --- Datetimepicker (bootstrap-datetimepicker; zemini .dropdown-menu'den alir) --- */
html[data-theme="dark"] .bootstrap-datetimepicker-widget table td,
html[data-theme="dark"] .bootstrap-datetimepicker-widget table th {
    color: #cfcfdd;
}

html[data-theme="dark"] .bootstrap-datetimepicker-widget table td.day:hover,
html[data-theme="dark"] .bootstrap-datetimepicker-widget table td.hour:hover,
html[data-theme="dark"] .bootstrap-datetimepicker-widget table td.minute:hover,
html[data-theme="dark"] .bootstrap-datetimepicker-widget table th:hover,
html[data-theme="dark"] .bootstrap-datetimepicker-widget table td span:hover {
    background: var(--rbd-surface) !important;
}

html[data-theme="dark"] .bootstrap-datetimepicker-widget table td.old,
html[data-theme="dark"] .bootstrap-datetimepicker-widget table td.new,
html[data-theme="dark"] .bootstrap-datetimepicker-widget table td.disabled {
    color: #55556a !important;
}

/* td.active primary zeminli kalir (kutuphane varsayilani) */

/* --- Summernote: toolbar koyu, yazim yuzeyi BILEREK acik --- */
html[data-theme="dark"] .note-editor.note-frame {
    border-color: var(--rbd-border-strong) !important;
    background: var(--rbd-surface) !important;
}

html[data-theme="dark"] .note-editor.note-frame .note-toolbar,
html[data-theme="dark"] .note-editor.note-frame .note-statusbar {
    background: var(--rbd-surface-2) !important;
    border-color: var(--rbd-border) !important;
}

html[data-theme="dark"] .note-btn {
    background: #2a2a3e !important;
    color: #cfcfdd !important;
    border-color: var(--rbd-border) !important;
}

html[data-theme="dark"] .note-btn:hover {
    background: #33334a !important;
    color: var(--rbd-text) !important;
}

/* icerik e-postada/sitede beyaz zeminde goruntulenecegi icin acik birakildi */
html[data-theme="dark"] .note-editable {
    background-color: #fff !important;
    color: #1b1b1b !important;
}

/* --- Yukleme perdesi --- */
html[data-theme="dark"] #dvloader {
    background-color: var(--rbd-bg) !important;
}

/* --- Custom tabs --- */
html[data-theme="dark"] .custom-tabs .nav-link.active { color: #fff !important; }

html[data-theme="dark"] .nav-tabs { border-bottom-color: var(--rbd-border-strong) !important; }

html[data-theme="dark"] .nav-tabs .nav-link.active {
    background-color: var(--rbd-surface) !important;
    color: var(--rbd-text) !important;
    border-color: var(--rbd-border-strong) !important;
}

/* --- Login --- */
html[data-theme="dark"] .app-login-box { background: var(--rbd-surface) !important; }
html[data-theme="dark"] .app-login-box .form-control:focus { background: var(--rbd-surface-2) !important; }

/* --- page-search / kutu yuzeyleri --- */
html[data-theme="dark"] .page-search {
    background: var(--rbd-surface) !important;
    border-color: var(--rbd-border) !important;
}

html[data-theme="dark"] .page-search .input-group-text { background: transparent !important; }

html[data-theme="dark"] .page-search .form-control,
html[data-theme="dark"] .page-search .sorting .form-control {
    color: var(--rbd-text) !important;
    /* genel .form-control koyu kutusu dikis yaratmasin; acikta oldugu gibi
       arama inputu .page-search yuzeyine dikissiz otursun */
    background: transparent !important;
}

html[data-theme="dark"] .page-search .sorting {
    background: var(--rbd-surface-2) !important;
    border-color: var(--rbd-border) !important;
}

html[data-theme="dark"] .page-search .sorting label { color: var(--rbd-muted) !important; }

html[data-theme="dark"] .hashtag-card { background: var(--rbd-surface) !important; }

/* --- Butonlar --- */
html[data-theme="dark"] .btn-cancel,
html[data-theme="dark"] .btn-install-cancel {
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

html[data-theme="dark"] .btn-cancel:hover,
html[data-theme="dark"] .btn-install-cancel:hover {
    color: var(--rbd-text) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .btn-light {
    background: #2a2a3e !important;
    color: #cfcfdd !important;
    border-color: var(--rbd-border) !important;
}

/* --- Rozetler: yari saydam zeminler kalir, metin parlatilir --- */
html[data-theme="dark"] .badge-success { color: #4ade80 !important; }
html[data-theme="dark"] .badge-danger { color: #f87171 !important; }
html[data-theme="dark"] .badge-warning { color: #fbbf24 !important; }
html[data-theme="dark"] .badge-info { color: #60a5fa !important; }

html[data-theme="dark"] .badge-light {
    background: var(--rbd-surface-2) !important;
    color: var(--rbd-text-2) !important;
}

/* --- Bootstrap yardimcilari --- */
html[data-theme="dark"] .bg-white { background-color: var(--rbd-surface) !important; }
html[data-theme="dark"] .bg-light { background-color: var(--rbd-surface-2) !important; }
html[data-theme="dark"] .text-dark { color: var(--rbd-text) !important; }
html[data-theme="dark"] .text-muted { color: var(--rbd-muted) !important; }
html[data-theme="dark"] .text-secondary { color: var(--rbd-text-2) !important; }

html[data-theme="dark"] .list-group-item {
    background-color: var(--rbd-surface) !important;
    color: var(--rbd-text-2) !important;
    border-color: var(--rbd-border) !important;
}

/* --- Banner sayfasi (sayfa ici <style> bloklarinin koyu esdegerleri) --- */
html[data-theme="dark"] .banner-tile {
    background: var(--rbd-surface) !important;
    border-color: var(--rbd-border) !important;
}

html[data-theme="dark"] .banner-tile .b-title { color: var(--rbd-text) !important; }

html[data-theme="dark"] .banner-stats {
    color: var(--rbd-text-2) !important;
    border-top-color: var(--rbd-border) !important;
    border-bottom-color: var(--rbd-border) !important;
}

html[data-theme="dark"] .banner-stats i { color: var(--rbd-primary) !important; }

html[data-theme="dark"] .banner-preview { background-color: var(--rbd-input) !important; }
html[data-theme="dark"] .banner-tile .thumb { background-color: var(--rbd-input) !important; }

html[data-theme="dark"] .ui-sortable-placeholder {
    background: rgba(78, 69, 184, 0.16) !important;
    border-color: rgba(141, 132, 240, 0.5) !important;
}

/* Podcast bolum kartlari: overlay butonu dark'ta koyulasir, icindeki
   satir-ici mor ikon (#4e45b8) okunmaz olurdu */
html[data-theme="dark"] .video-card .overlap-control .btn i {
    color: var(--rbd-primary) !important;
}

/* --- Chat sayfasi (chat/show sayfa-ici stilleri) --- */
html[data-theme="dark"] .chat-row { border-bottom-color: rgba(255, 255, 255, 0.14) !important; }
html[data-theme="dark"] .chat-row .chat-meta { color: var(--rbd-muted) !important; }
html[data-theme="dark"] .chat-row .chat-body { color: #d6d6e2 !important; }
html[data-theme="dark"] .chat-row.removed .chat-body { color: #6a6a80 !important; }
html[data-theme="dark"] .chat-row.shadow .chat-body { color: #d8b23a !important; }
html[data-theme="dark"] .chat-row.hidden-by-report .chat-body { color: #ff8585 !important; }

/* ============================================================
   Satir-ici (inline style) acik zemin kurtarmalari
   Bladelerde tekrarlanan style="background: #F9FAFF" tablo
   basliklari ve benzer sabit acik zeminler icin attribute
   secicileri; [style*=... i] buyuk/kucuk harf duyarsizdir.
   ============================================================ */
html[data-theme="dark"] [style*="#F9FAFF" i] {
    background: var(--rbd-surface-2) !important;
}

/* chat-stream: acik zemin + acik cerceve */
html[data-theme="dark"] [style*="#f9fafc" i] {
    background: var(--rbd-input) !important;
    border-color: var(--rbd-border) !important;
}

/* siralama listesi ogeleri (#e9ecef zemin + siyah cerceve). Secici bilerek
   "background-color: #e9ecef" imlasina daraltildi: #e9ecef'i yalniz border
   olarak kullanan elemanlarin (or. chat-stream) zeminini basmasin */
html[data-theme="dark"] [style*="background-color: #e9ecef" i] {
    background-color: var(--rbd-surface-2) !important;
    color: var(--rbd-text) !important;
    border-color: var(--rbd-border-strong) !important;
}

/* song/edit kosullu kart zeminleri (aktif yesilimsi / pasif kirmizimsi) */
html[data-theme="dark"] [style*="#f6fff9" i] { background: #16261d !important; }
html[data-theme="dark"] [style*="#fff7f7" i] { background: #2a1b1e !important; }

/* song/edit bilgi karti + gamification form zemini */
html[data-theme="dark"] [style*="#f8fbff" i] { background: var(--rbd-input) !important; }
html[data-theme="dark"] [style*="#fbfbfd" i] { background: var(--rbd-input) !important; }

/* satir-ici koyu metin etiketleri (setting sayfasi color:#1b1b1b) */
html[data-theme="dark"] label[style*="#1b1b1b" i] { color: var(--rbd-text) !important; }

/* notification/show satir-ici durum chip'leri (pastel zemin + koyu metin) */
html[data-theme="dark"] [style*="#e6f7ec" i] {
    background: #14261c !important;
    color: #5fd08a !important;
}

html[data-theme="dark"] [style*="#f0f0f0" i] {
    background: var(--rbd-surface-2) !important;
    color: var(--rbd-text-2) !important;
}

html[data-theme="dark"] [style*="#fdecea" i] {
    background: #2a1b1e !important;
    color: #f87171 !important;
}


/* ---------------------------------------------------------------------------
   Bootstrap alert kutulari (Premium Planlari / Kaynaklari sayfalarindaki bilgi
   seridi). Aydinlik varsayilanlari cok acik zeminli oldugu icin karanlik modda
   okunmuyordu; theme-dark.css'te '.alert' icin HIC kural yoktu.
   --------------------------------------------------------------------------- */
html[data-theme="dark"] .alert {
    border-color: var(--rbd-border, #33334d) !important;
}
html[data-theme="dark"] .alert-info {
    background-color: #16283a !important;
    border-color: #1f4a6b !important;
    color: #9ecbf0 !important;
}
html[data-theme="dark"] .alert-warning {
    background-color: #2f2612 !important;
    border-color: #6b551f !important;
    color: #e5b25d !important;
}
html[data-theme="dark"] .alert-danger {
    background-color: #2a1b1e !important;
    border-color: #6b2f2f !important;
    color: #f08b8b !important;
}
html[data-theme="dark"] .alert-success {
    background-color: #16281f !important;
    border-color: #2f6b47 !important;
    color: #6fcf97 !important;
}
