/*
 * MonoLinks — Koyu tema
 * ---------------------------------------------------------------
 * Tema <html data-theme="light|dark" data-bs-theme="..."> ile seçilir
 * (bkz. resources/views/components/theme_script.twig).
 *
 * Bu dosyadaki TÜM kurallar yalnızca [data-theme="dark"] altında çalışır;
 * açık tema hiç etkilenmez. Kurallar `:where([data-theme="dark"]) .x`
 * biçiminde yazıldı: :where() özgüllük eklemez, böylece orijinal
 * dosyalardaki :hover / .active gibi durum kuralları aynen çalışmaya
 * devam eder. Bu dosya diğer tüm CSS'lerden SONRA yüklenmelidir.
 *
 * Satır içi (inline) stillerde kullanılan --ml-* token'ları yalnızca
 * burada, koyu temada tanımlıdır; açık temada var(--ml-x, <eski renk>)
 * ifadesindeki eski renk kullanılır.
 */

/* ===== 1. Token'lar ===== */
:root[data-theme="dark"] {
    color-scheme: dark;

    --ml-bg: #111316;
    --ml-surface: #1a1d21;
    --ml-surface-2: #212429;
    --ml-surface-3: #2a2e34;
    --ml-input: #15181b;
    --ml-border: #2f343b;
    --ml-text: #e6e8eb;
    --ml-text-2: #a3aab3;
    --ml-text-3: #7c838d;
    --ml-fill-subtle: rgba(255, 255, 255, 0.03);
    --ml-sidebar: #16181c;
    --ml-ink: #2c2f34;              /* açık temadaki --black: koyu kalması gereken zeminler */

    --ml-tint-red: rgba(239, 68, 68, 0.14);
    --ml-tint-red-border: rgba(239, 68, 68, 0.35);
    --ml-tint-amber: rgba(245, 158, 11, 0.13);
    --ml-tint-amber-border: rgba(245, 158, 11, 0.35);
    --ml-tint-green: rgba(16, 185, 129, 0.14);
    --ml-tint-green-border: rgba(16, 185, 129, 0.35);
    --ml-tint-blue: rgba(59, 130, 246, 0.14);
    --ml-tint-blue-border: #3a4049;
    --ml-tint-violet: rgba(139, 92, 246, 0.14);
    --ml-red-text: #f87171;
    --ml-amber-text: #fbbf24;
    --ml-green-text: #34d399;
    --ml-blue-text: #60a5fa;

    /* Proje değişkenleri: --black metin rengi olarak kullanılıyor -> açık olur */
    --black: var(--ml-text);
    --gray: #9399a2;
    --off-white: var(--ml-surface-2);
    --soft-green: rgba(13, 147, 97, 0.18);

    /* Bootstrap 5.3 (data-bs-theme="dark" ile birlikte) */
    --bs-body-bg: var(--ml-bg);
    --bs-body-bg-rgb: 17, 19, 22;
    --bs-body-color: var(--ml-text);
    --bs-emphasis-color: #fff;
    --bs-secondary-color: var(--ml-text-2);
    --bs-secondary-bg: var(--ml-surface-2);
    --bs-tertiary-bg: var(--ml-surface-2);
    --bs-border-color: var(--ml-border);
    --bs-border-color-translucent: rgba(255, 255, 255, 0.1);
    --bs-heading-color: var(--ml-text);
    --bs-link-color: #34c48d;
    --bs-link-color-rgb: 52, 196, 141;
    --bs-link-hover-color: #5ad6a6;
    --bs-link-hover-color-rgb: 90, 214, 166;
}

/* Tema değişimi View Transitions ile tek parça çapraz geçiş (bkz. theme_script.twig) */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.25s;
}

/* ===== 2. Mevcut CSS dosyalarındaki sabit renklerin koyu karşılıkları =====
   (açık temadaki kural birebir korunur; burada yalnızca renk değerleri koyu karşılığıyla yeniden yazıldı) */

/* --- global.css --- */
:where([data-theme="dark"]) .btn-green:hover {
    background-color: var(--ml-surface);
}
:where([data-theme="dark"]) .form-control {
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .form-check-input {
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .otp-input {
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .toast-box {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .navbar-sticky-container {
    background-color: var(--ml-surface);
}
:where([data-theme="dark"]) .form-select:focus,
:where([data-theme="dark"]) .form-control:focus {
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) .navbar {
    background-color: var(--ml-surface);
}
:where([data-theme="dark"]) .dropdown-item.text-danger:hover {
    background-color: var(--ml-surface-2);
    color: #e25a67;
}
:where([data-theme="dark"]) .btn-close {
    color: var(--ml-text);
}
:where([data-theme="dark"]) .settings-modal .modal-content {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .modal-icon {
    background: rgba(223, 32, 32, 0.16);
}
:where([data-theme="dark"]) .btn-cancel {
    background: var(--ml-surface-2);
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .btn-cancel:hover {
    background: var(--ml-surface-3);
}
:where([data-theme="dark"]) .cc-banner {
    background: var(--ml-surface);
    border-top: 1px solid rgba(255, 255, 255, 0.112);
}
:where([data-theme="dark"]) .cc-btn-primary:hover {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .cc-btn-secondary {
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .cc-btn-secondary:hover {
    background: var(--ml-surface-3);
}
:where([data-theme="dark"]) .cc-btn-outline {
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .cc-modal-box {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .cc-modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.084);
}
:where([data-theme="dark"]) .cc-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.084);
}
:where([data-theme="dark"]) .cc-toggle-thumb {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .image-size-hint {
    color: var(--ml-text-2);
}

/* --- feedback.css --- */
:where([data-theme="dark"]) .feedback-modal-title {
    color: var(--ml-text);
}
:where([data-theme="dark"]) .feedback-modal-close {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .feedback-modal-close:hover {
    color: var(--ml-text);
}
:where([data-theme="dark"]) .feedback-modal-desc {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .feedback-textarea {
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .feedback-btn-cancel {
    border: 1px solid var(--ml-border);
    background: var(--ml-surface);
    color: var(--ml-text);
}
:where([data-theme="dark"]) .feedback-btn-cancel:hover {
    background: var(--ml-surface-2);
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) .feedback-modal-title {
    color: var(--ml-text);
}
:where([data-theme="dark"]) .feedback-modal-close {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .feedback-modal-close:hover {
    color: var(--ml-text);
}
:where([data-theme="dark"]) .feedback-modal-desc {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .feedback-textarea {
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .feedback-btn-cancel {
    border: 1px solid var(--ml-border);
    background: var(--ml-surface);
    color: var(--ml-text);
}
:where([data-theme="dark"]) .feedback-btn-cancel:hover {
    background: var(--ml-surface-2);
    border-color: var(--ml-border);
}

/* --- auth.css --- */
:where([data-theme="dark"]) .auth-divider::before,
:where([data-theme="dark"]) .auth-divider::after {
    background: rgba(255, 255, 255, 0.104);
}
:where([data-theme="dark"]) .btn-google {
    color: var(--ml-text-2);
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .btn-google:hover {
    background: var(--ml-surface-2);
    color: var(--ml-text-2);
}

/* --- sidebar.css --- */
:where([data-theme="dark"]) .panel-navbar {
    background-color: var(--ml-surface);
    border-bottom: 1px solid var(--ml-border);
}

/* --- panel.css --- */
html[data-theme="dark"] {
    background-color: var(--ml-surface);
}
:where([data-theme="dark"]) .panel-main {
    background-color: var(--ml-surface-2);
}
:where([data-theme="dark"]) .delete-confirm-modal-icon {
    color: #e45858;
}
:where([data-theme="dark"]) .delete-confirm-modal-icon .iconify {
    color: #e45858;
}
:where([data-theme="dark"]) .delete-confirm-modal-desc {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .delete-confirm-modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.084);
}
:where([data-theme="dark"]) .stat-card {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .stat-card-icon.icon-views {
    color: #6cefbe;
}
:where([data-theme="dark"]) .stat-card-icon.icon-collections {
    color: #5181ec;
}
:where([data-theme="dark"]) .stat-card-icon.icon-links {
    background-color: rgba(223, 223, 32, 0.16);
    color: #efef6c;
}
:where([data-theme="dark"]) .stat-card-icon.icon-ctr {
    color: #ec7f51;
}
:where([data-theme="dark"]) .stat-card-badge.badge-green {
    background-color: rgba(32, 223, 91, 0.16);
    color: #6cef9d;
}
:where([data-theme="dark"]) .stat-card-badge.badge-yellow {
    background-color: rgba(223, 223, 32, 0.16);
    color: #efef6c;
}
:where([data-theme="dark"]) .stat-card-badge.badge-blue {
    background-color: rgba(32, 116, 223, 0.16);
    color: #5181ec;
}
:where([data-theme="dark"]) .stat-card-badge.badge-red {
    background-color: rgba(223, 32, 32, 0.16);
    color: #ec7f51;
}
:where([data-theme="dark"]) .chart-card {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .collections-card {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .collection-item {
    border-bottom: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .top-links-card {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .top-links-icon {
    background-color: rgba(223, 185, 32, 0.16);
    color: #eca451;
}
:where([data-theme="dark"]) .top-link-item {
    background: var(--ml-surface-2);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .top-link-ctr {
    background-color: rgba(32, 223, 98, 0.16);
}
:where([data-theme="dark"]) .top-links-premium-gate {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .top-links-premium-gate-icon {
    background-color: var(--ml-surface-2);
    border: 1px solid rgba(255, 255, 255, 0.112);
}
:where([data-theme="dark"]) .stat-card-premium {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .stat-card-premium-icon {
    background-color: var(--ml-surface-2);
    border: 1px solid rgba(255, 255, 255, 0.112);
}
:where([data-theme="dark"]) .collection-item-lock-overlay {
    background: rgba(18, 20, 24, 0.85);
}
:where([data-theme="dark"]) .top-links-switch {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .top-links-switch-btn {
    color: var(--gray, var(--ml-text-2));
}
:where([data-theme="dark"]) .top-links-switch-btn.active {
    background: var(--ml-surface);
}

/* --- qr.css --- */
:where([data-theme="dark"]) .qr-section {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .qr-select,
:where([data-theme="dark"]) .qr-input {
    border: 1px solid var(--ml-border);
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .qr-field-select-wrap .iconify {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .qr-input[readonly] {
    background: var(--ml-surface-2);
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .qr-color-option:hover {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .qr-color-swatch {
    border: 1px solid rgba(255, 255, 255, 0.112);
}
:where([data-theme="dark"]) .qr-color-input-wrap input[type="text"] {
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .qr-preview-wrap {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .qr-features span {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .qr-download-btn {
    border: 1px solid var(--ml-border);
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .qr-download-btn:hover {
    background: var(--ml-surface-2);
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) .upgrade-gate-wrap {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .upgrade-gate-icon {
    background-color: var(--ml-surface-2);
    border: 1px solid rgba(255, 255, 255, 0.112);
}

/* --- media.css --- */
:where([data-theme="dark"]) #mediaUploadCategoryDropdown .media-filter-btn {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) #mediaUploadCategoryDropdown .media-filter-btn:hover {
    background: var(--ml-surface-2);
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) #mediaUploadCategoryDropdown .dropdown-item:hover {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .media-stat-card {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .media-stat-card.media-stat-total {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .media-stat-card.pdf .media-stat-icon {
    color: #ec8651;
}
:where([data-theme="dark"]) .media-stat-card.image .media-stat-icon {
    color: #5181ec;
}
:where([data-theme="dark"]) .media-stat-label {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .media-filter-bar {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .media-search-wrap input {
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .media-filter-btn {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .media-filter-dropdown .dropdown-item:active,
:where([data-theme="dark"]) .media-filter-dropdown .dropdown-item:focus {
    background-color: var(--ml-surface-2) !important;
}
:where([data-theme="dark"]) .media-filter-btn:hover {
    background: var(--ml-surface-2);
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) .media-filter-dropdown .dropdown-menu {
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .media-filter-dropdown .dropdown-item:hover {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .collection-media-thumb,
:where([data-theme="dark"]) .media-gallery-item {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .media-card {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .media-card-preview {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .media-card-placeholder-pdf {
    color: #ec8651;
}
:where([data-theme="dark"]) .media-card-processing {
    background: rgba(18, 20, 24, 0.9);
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .media-card-meta {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .media-card-badge {
    color: var(--ml-text-2);
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .media-card-badge:hover {
    background: rgba(32, 77, 223, 0.16);
}
:where([data-theme="dark"]) .media-card-btn {
    border: 1px solid var(--ml-border);
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .media-card-btn:hover {
    background: var(--ml-surface-2);
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) .media-card-btn-delete {
    color: #e45858;
    border-color: rgba(223, 32, 32, 0.35);
    background: rgba(223, 32, 32, 0.16);
}
:where([data-theme="dark"]) .media-card-btn-delete:hover {
    background: rgba(223, 32, 32, 0.16);
    border-color: rgba(223, 32, 32, 0.35);
    color: #e65757;
}
:where([data-theme="dark"]) #mediaUsagesList {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .media-usages-modal .usages-thumb {
    background: linear-gradient(135deg,rgba(32, 77, 223, 0.16),rgba(32, 223, 91, 0.16));
    color: var(--ml-text);
}
:where([data-theme="dark"]) .media-usages-modal .usages-item .fw-semibold {
    color: var(--ml-text);
}
:where([data-theme="dark"]) .media-usages-modal .usages-list .small {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .media-usages-modal #mediaUsagesEmpty {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) #mediaUsagesList strong {
    color: var(--ml-text);
}
:where([data-theme="dark"]) #mediaUsagesList a {
    color: #51ecea;
}
:where([data-theme="dark"]) #mediaUsagesList .small {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .media-upload-zone {
    border: 2px dashed var(--ml-border);
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .media-upload-zone-hint {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .media-upload-preview-box {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .media-upload-preview-pdf {
    color: #ec8651;
}
:where([data-theme="dark"]) .media-upload-change-btn {
    color: #e45858;
    background: rgba(223, 32, 32, 0.16);
    border: 1px solid rgba(223, 32, 32, 0.35);
}
:where([data-theme="dark"]) .media-upload-change-btn:hover {
    background: rgba(223, 32, 32, 0.16);
    border-color: rgba(223, 32, 32, 0.35);
    color: #e65757;
}
:where([data-theme="dark"]) .media-upload-select {
    border: 1px solid var(--ml-border);
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .media-upload-select:hover {
    background-color: var(--ml-surface-2);
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) .media-upload-select:focus {
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) .media-empty-state-desc {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .upgrade-gate-wrap {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .upgrade-gate-icon {
    background-color: var(--ml-surface-2);
    border: 1px solid rgba(255, 255, 255, 0.112);
}
:where([data-theme="dark"]) .media-select-toggle {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .media-card-check {
    border: 2px solid var(--ml-border);
}
:where([data-theme="dark"]) .media-card-category {
    background: rgba(18, 20, 24, 0.92);
}
:where([data-theme="dark"]) .media-upload-item {
    border: 1px solid var(--ml-border);
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .media-upload-item.is-invalid,
:where([data-theme="dark"]) .media-upload-item.is-failed {
    border-color: rgba(223, 32, 32, 0.35);
    background: rgba(223, 32, 32, 0.16);
}
:where([data-theme="dark"]) .media-upload-item-thumb {
    background: var(--ml-surface-2);
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .media-upload-item-meta {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .media-upload-item-error {
    color: #e45858;
}
:where([data-theme="dark"]) .media-upload-item-remove:hover {
    color: #e45858;
}
:where([data-theme="dark"]) .media-upload-footer-hint {
    color: var(--ml-text-2);
}

/* --- checkout.css --- */
:where([data-theme="dark"]) .checkout-layout {
    background-color: var(--ml-surface-2);
}
:where([data-theme="dark"]) .checkout-header {
    background: var(--ml-surface);
    border-bottom: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .payment-card {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .payment-card h3 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.112);
}
:where([data-theme="dark"]) .order-summary-row.total {
    border-top: 1px solid rgba(255, 255, 255, 0.112);
}
:where([data-theme="dark"]) .payment-form input {
    border: 1px solid rgba(255, 255, 255, 0.14);
}
:where([data-theme="dark"]) .payment-trust {
    border-top: 1px solid rgba(255, 255, 255, 0.084);
}
:where([data-theme="dark"]) .payment-trust-paytr {
    color: var(--ml-text);
}
:where([data-theme="dark"]) .payment-partial-back {
    background: var(--ml-surface);
    border: 1px solid rgba(255, 255, 255, 0.14);
}
:where([data-theme="dark"]) .payment-partial-back:hover {
    background: var(--ml-surface-3);
    border-color: rgba(255, 255, 255, 0.14);
}
:where([data-theme="dark"]) .payment-partial-card {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .payment-partial-card h3 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.112);
}
:where([data-theme="dark"]) .payment-partial-row.total {
    border-top: 1px solid rgba(255, 255, 255, 0.112);
}
:where([data-theme="dark"]) .payment-partial-form input {
    border: 1px solid rgba(255, 255, 255, 0.14);
}
:where([data-theme="dark"]) .payment-partial-trust {
    border-top: 1px solid rgba(255, 255, 255, 0.084);
}
:where([data-theme="dark"]) .text-muted {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .invoice-type-toggle h3 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.112);
}
:where([data-theme="dark"]) .toggle-buttons {
    background: rgba(255, 255, 255, 0.052);
}
:where([data-theme="dark"]) .toggle-btn {
    color: var(--gray, var(--ml-text-2));
}
:where([data-theme="dark"]) .toggle-btn.active {
    background: var(--ml-surface);
    color: var(--black, var(--ml-text));
}
:where([data-theme="dark"]) .billing-fields-grid textarea {
    border: 1px solid rgba(255, 255, 255, 0.14);
}
:where([data-theme="dark"]) .optional-tag {
    color: var(--gray, var(--ml-text-2));
    background: rgba(255, 255, 255, 0.065);
}
:where([data-theme="dark"]) .label-preset-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .checkbox-label {
    color: var(--gray, var(--ml-text-2));
}
:where([data-theme="dark"]) .billing-payment-divider {
    border-top: 1px dashed rgba(255, 255, 255, 0.14);
}
:where([data-theme="dark"]) #payment-section h3 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.112);
}
:where([data-theme="dark"]) .saved-addresses-section > h3 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.112);
}
:where([data-theme="dark"]) .saved-address-card {
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .saved-address-radio {
    border: 2px solid rgba(255, 255, 255, 0.14);
}
:where([data-theme="dark"]) .saved-address-detail {
    color: var(--gray, var(--ml-text-2));
}
:where([data-theme="dark"]) .badge-corporate {
    color: #eca451;
}
:where([data-theme="dark"]) .add-new-address-btn {
    color: var(--green, #51ecb8);
}
:where([data-theme="dark"]) .payment-partial-form textarea,
:where([data-theme="dark"]) .payment-form textarea {
    border: 1px solid rgba(255, 255, 255, 0.14);
}

/* --- details.css --- */
:where([data-theme="dark"]) .collection-details-back {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
    color: var(--black, var(--ml-text));
}
:where([data-theme="dark"]) .collection-details-back:hover {
    background: var(--ml-surface-2);
    border-color: rgba(83, 123, 172, 0.35);
}
:where([data-theme="dark"]) .collection-details-copy {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .collection-stat-card.blue {
    background: rgba(32, 114, 223, 0.15);
}
:where([data-theme="dark"]) .collection-stat-card.green {
    background: rgba(32, 223, 98, 0.15);
}
:where([data-theme="dark"]) .collection-stat-card.yellow {
    background: rgba(223, 185, 32, 0.15);
}
:where([data-theme="dark"]) .collection-stat-card.orange {
    background: rgba(223, 143, 32, 0.15);
}
:where([data-theme="dark"]) .collection-stat-card .label {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .collection-stat-card-premium-wrap .label {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .collection-empty-state-desc {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .collection-link-card {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .collection-link-card-image {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .collection-link-action {
    border: 1px solid var(--ml-border);
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .collection-link-action:hover {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) #newLinkModal .form-select.form-select-lg:focus {
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) #newLinkModal .new-link-upload-zone {
    border: 1px dashed var(--ml-border) !important;
    background: var(--ml-surface);
}
:where([data-theme="dark"]) #newLinkModal .new-link-upload-zone:hover,
:where([data-theme="dark"]) #newLinkModal .new-link-upload-zone.drag-over {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) #newLinkModal .new-link-thumb-wrap {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) #newLinkModal .file-placeholder {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) #newLinkModal .file-placeholder {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .gallery-thumbnail-pdf {
    background: var(--ml-surface-2);
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) #mainPdf {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .media-gallery-item {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .media-gallery-item .select-overlay {
    background: var(--ml-surface);
    border: 1px solid rgba(255, 255, 255, 0.112);
}
:where([data-theme="dark"]) .media-gallery-footer .selected-info {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) #newLinkModal .new-link-add-more {
    border: 1px dashed var(--ml-border);
    background: var(--ml-surface);
}
:where([data-theme="dark"]) #newLinkModal .new-link-add-more:hover {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) #newLinkModal .new-link-media-btn {
    border: 1px solid var(--ml-border);
    background: var(--ml-surface);
}
:where([data-theme="dark"]) #newLinkModal .new-link-media-btn:hover {
    background: var(--ml-surface-2);
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) .media-gallery-item {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .btn-supporters {
    background: var(--ml-surface-2);
    color: var(--ml-text-2);
    border: 1.5px solid var(--ml-border);
}
:where([data-theme="dark"]) .btn-supporters:hover {
    background: var(--ml-surface-3);
    color: var(--ml-text);
}
:where([data-theme="dark"]) .reset-confirm-modal-icon {
    color: #e45858;
}
:where([data-theme="dark"]) .collection-link-card-lock-overlay {
    background: rgba(18, 20, 24, 0.52);
}
:where([data-theme="dark"]) .collection-link-card-lock-overlay:hover {
    background: rgba(18, 20, 24, 0.72);
}

/* --- donation.css --- */
:where([data-theme="dark"]) .donation-card {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .donation-title {
    color: var(--ml-text);
}
:where([data-theme="dark"]) .donation-desc {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .donation-amount {
    border: 2px solid var(--ml-border);
    background: var(--ml-surface);
    color: var(--ml-text);
}
:where([data-theme="dark"]) .donation-amount:hover {
    color: var(--green, #61db95);
}
:where([data-theme="dark"]) .donation-amount.active {
    background: var(--soft-green, rgba(59, 196, 128, 0.16));
    color: var(--green, #61db95);
}
:where([data-theme="dark"]) .donation-custom-label {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .donation-custom-input {
    border: 2px solid var(--ml-border);
}
:where([data-theme="dark"]) .donation-info {
    border-top: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .donation-info-text a {
    color: var(--green, #61db95);
}

/* --- collections.css --- */
:where([data-theme="dark"]) .collections-plan-limit {
    background: var(--ml-surface-2);
    border: 1px solid rgba(255, 255, 255, 0.084);
}
:where([data-theme="dark"]) .collections-plan-limit-bar {
    background: rgba(255, 255, 255, 0.104);
}
:where([data-theme="dark"]) .collections-plan-limit-circular .circle-bg {
    stroke: rgba(255, 255, 255, 0.45);
}
:where([data-theme="dark"]) .collections-plan-limit-circular .circle-fill.near-limit {
    stroke: #ecb251;
}
:where([data-theme="dark"]) .collection-card {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .collection-card-footer {
    border-top: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .collection-card-action {
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .add-collection-card {
    background: var(--ml-surface-2);
    border: 2px dashed var(--ml-border);
}
:where([data-theme="dark"]) .media-gallery-item {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .collections-empty-state-desc {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) #newCollectionModal .form-select:focus {
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) #newCollectionModal .new-link-media-btn {
    border: 1px solid var(--ml-border);
    background: var(--ml-surface);
}
:where([data-theme="dark"]) #newCollectionModal .new-link-media-btn:hover {
    background: var(--ml-surface-2);
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) .delete-confirm-modal .btn-light,
:where([data-theme="dark"]) .delete-confirm-modal .btn-outline-secondary {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .delete-confirm-modal .btn-light:hover,
:where([data-theme="dark"]) .delete-confirm-modal .btn-outline-secondary:hover {
    background: var(--ml-surface-2);
    color: var(--ml-text);
    border-color: rgba(83, 123, 172, 0.35);
}
:where([data-theme="dark"]) .collection-card-lock-overlay {
    background: rgba(18, 20, 24, 0.52);
}
:where([data-theme="dark"]) .collection-card-lock-overlay:hover {
    background: rgba(18, 20, 24, 0.72);
}
:where([data-theme="dark"]) .list-unstyled.mb-0.px-3.py-1 li {
    border-bottom: 1px solid var(--ml-border) !important;
}

/* --- upgrade.css --- */
:where([data-theme="dark"]) .pricing-card {
    background-color: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .pricing-icon.icon-free {
    background-color: var(--ml-surface-3);
}
:where([data-theme="dark"]) .pricing-icon.icon-starter {
    background-color: rgba(32, 114, 223, 0.16);
}
:where([data-theme="dark"]) .pricing-icon.icon-pro {
    background-color: rgba(32, 223, 98, 0.16);
}
:where([data-theme="dark"]) .pricing-icon.icon-premium {
    background-color: rgba(223, 185, 32, 0.16);
    color: #eca451;
}
:where([data-theme="dark"]) .pricing-btn-disabled {
    background-color: var(--ml-surface-2) !important;
}

/* --- home.css --- */
:where([data-theme="dark"]) .brand-header h2 span {
    background-color: var(--ml-surface);
}
:where([data-theme="dark"]) .feature-card {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .how-it-works-section {
    background-color: var(--ml-surface);
}
:where([data-theme="dark"]) .why-monolinks-section {
    background-color: var(--ml-surface);
}
:where([data-theme="dark"]) .about-section {
    background-color: var(--ml-surface);
}
:where([data-theme="dark"]) .about-card {
    background-color: var(--ml-surface-2);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .pricing-section {
    background-color: var(--ml-surface-3);
}
:where([data-theme="dark"]) .pricing-card {
    background-color: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .pricing-icon.icon-free {
    background-color: var(--ml-surface-3);
}
:where([data-theme="dark"]) .pricing-icon.icon-starter {
    background-color: rgba(32, 114, 223, 0.16);
}
:where([data-theme="dark"]) .pricing-icon.icon-pro {
    background-color: rgba(223, 185, 32, 0.16);
    color: #eca451;
}
:where([data-theme="dark"]) .pricing-icon.icon-premium {
    background-color: rgba(32, 223, 98, 0.16);
}
:where([data-theme="dark"]) .pricing-btn-disabled {
    background-color: var(--ml-surface-2);
}
:where([data-theme="dark"]) .pricing-btn-outline {
    background-color: var(--ml-surface);
}
:where([data-theme="dark"]) .custom-price-table {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .cpt-row {
    border-top: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .cpt-feature-col {
    background-color: var(--ml-surface);
}
:where([data-theme="dark"]) .plan-pill {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .plan-pill.plan-pill-disabled {
    background: var(--ml-surface-2);
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) .btn-plan {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .cpt-feature-value {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .cpt-feature-value.cell-text .cell-text-content {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .cpt-row:not(.cpt-head):nth-of-type(even) {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .faq-item {
    border-bottom: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .platform-badge .iconify {
    color: #6cefbd;
}

/* --- support.css --- */
:where([data-theme="dark"]) .support-back-btn:hover {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .support-hero {
    background: linear-gradient(135deg, var(--ml-surface-2) 0%, var(--ml-surface) 100%);
}
:where([data-theme="dark"]) .support-stat-divider {
    background: var(--ml-surface-3);
}
:where([data-theme="dark"]) .support-table-card {
    background: var(--ml-surface);
    border: 1.5px solid var(--ml-border);
}
:where([data-theme="dark"]) .support-table-card table.dataTable thead th {
    border-bottom: 1.5px solid var(--ml-border);
}
:where([data-theme="dark"]) .support-table-card table.dataTable tbody td {
    border-bottom: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .support-table-card table.dataTable tbody tr:hover td {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .support-table-card .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--ml-surface-2) !important;
}
:where([data-theme="dark"]) .donation-consent-label {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .btn-supporters {
    background: var(--ml-surface-2);
    color: var(--ml-text-2);
    border: 1.5px solid var(--ml-border);
}
:where([data-theme="dark"]) .support-table-card .dt-paging-button {
    border: 1.5px solid var(--ml-border) !important;
    background: var(--ml-surface) !important;
}
:where([data-theme="dark"]) .support-table-card .dt-paging-button.disabled,
:where([data-theme="dark"]) .support-table-card .dt-paging-button.disabled:hover {
    background: var(--ml-surface) !important;
    border-color: var(--ml-border) !important;
}
:where([data-theme="dark"]) div.dt-container .dt-processing {
    background: rgba(18, 20, 24, 0.95) !important;
}

/* --- notification.css --- */
:where([data-theme="dark"]) .notif-delete-all-btn {
    color: #e45858;
}
:where([data-theme="dark"]) .notif-delete-all-btn .iconify {
    color: #e45858;
}
:where([data-theme="dark"]) .notif-accordion-item {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .notif-accordion-header:hover {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .notif-accordion-delete-btn {
    color: #e45858;
}
:where([data-theme="dark"]) .notif-accordion-body-inner {
    border-top: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .notif-empty-icon {
    background: rgba(18, 20, 24, 0.5);
}
:where([data-theme="dark"]) .notif-empty-btn:hover {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .notif-badge {
    border: 2px solid var(--ml-border);
}
:where([data-theme="dark"]) .notif-dropdown {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .notif-dropdown-header {
    border-bottom: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .notif-dropdown-item {
    border-bottom: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .notif-dropdown-item:hover {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .notif-dropdown-footer {
    border-top: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .modal-icon-wrapper {
    background: rgba(223, 32, 32, 0.16);
    color: #e45858;
}
:where([data-theme="dark"]) .delete-confirm-modal .btn-outline-secondary {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border) !important;
    color: var(--ml-text-2) !important;
}
:where([data-theme="dark"]) .delete-confirm-modal .btn-outline-secondary:hover {
    background: var(--ml-surface-2);
    border-color: rgba(83, 123, 172, 0.35) !important;
}

/* --- bulk-select.css --- */
:where([data-theme="dark"]) .bulk-toggle {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .bulk-check {
    border: 2px solid var(--ml-border);
}

/* --- collection-show.css --- */
:where([data-theme="dark"]) .collection-show-page {
    background-color: var(--ml-surface-2);
}
:where([data-theme="dark"]) .collection-share-btn:hover {
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) .collection-report-btn:hover {
    border-color: rgba(223, 74, 32, 0.35);
}
:where([data-theme="dark"]) .collection-link-card {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .collection-link-image-wrapper {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .collection-link-desc {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .collection-link-footer {
    border-top: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .collection-link-category {
    background: var(--ml-surface-2);
    color: var(--ml-text-2);
}

/* --- link-detail.css --- */
:where([data-theme="dark"]) .link-detail-page {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .link-gallery-main {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .gallery-tabs {
    border-bottom: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .gallery-thumbnails::-webkit-scrollbar-thumb {
    background: var(--ml-surface-3);
}
:where([data-theme="dark"]) .gallery-thumbnail-video::before {
    border-left: 8px solid var(--ml-border);
}
:where([data-theme="dark"]) .link-info-description {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .link-info-btn-secondary {
    background: var(--ml-surface);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .link-info-btn-report {
    background: var(--ml-surface-2);
    color: #ec7e51;
    border: 1px solid rgba(223, 130, 32, 0.35);
}
:where([data-theme="dark"]) .link-info-btn-report:hover {
    background: rgba(223, 141, 32, 0.16);
    color: #ee8d6d;
}

/* --- admin.css --- */
:where([data-theme="dark"]) .admin-users-table-container {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .admin-users-table {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .admin-users-table th,
:where([data-theme="dark"]) .admin-users-table td {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .admin-users-table th {
    background: var(--ml-surface-2);
    border-bottom: 2px solid var(--ml-border);
}
:where([data-theme="dark"]) .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: var(--ml-surface-2);
    color: var(--ml-text);
}
:where([data-theme="dark"]) .dataTables_wrapper .dataTables_info {
    color: var(--ml-text);
}
:where([data-theme="dark"]) .feedback-badge--success {
    background: rgba(49, 206, 118, 0.16);
    color: #78e2a8;
}
:where([data-theme="dark"]) .feedback-badge--danger {
    background: rgba(223, 32, 32, 0.16);
}
:where([data-theme="dark"]) #admin-complaint-table tbody tr.admin-complaint-row--preview:hover td {
    background-color: var(--ml-surface-2);
}
:where([data-theme="dark"]) .btn-ban-user {
    background: rgba(223, 32, 32, 0.16);
    color: #e45858;
}
:where([data-theme="dark"]) .btn-unban-user {
    background: rgba(32, 223, 91, 0.16);
    color: #54e88b;
}
:where([data-theme="dark"]) .ban-modal {
    background: var(--ml-surface);
}
:where([data-theme="dark"]) .ban-modal-close:hover {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .ban-modal-icon {
    background: rgba(223, 32, 32, 0.16);
    color: #e45858;
}
:where([data-theme="dark"]) .ban-modal-icon:has(svg path[d*="9 12l"]) {
    background: rgba(32, 223, 91, 0.16);
    color: #54e88b;
}
:where([data-theme="dark"]) .ban-modal-title {
    color: var(--ml-text);
}
:where([data-theme="dark"]) .ban-modal-desc {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .ban-modal-message {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .ban-reason-wrap .form-label {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .btn-modal-cancel {
    border: 1.5px solid var(--ml-border);
    background: var(--ml-surface);
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .btn-modal-cancel:hover {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .admin-user-cell-name {
    color: var(--ml-text);
}
:where([data-theme="dark"]) .admin-user-cell-username {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .admin-user-cell-email {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .admin-complaint-details-cell {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .admin-revenue-filter {
    border: 1px solid var(--ml-border);
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .admin-complaint-preview-inner {
    background: var(--ml-surface-2);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .admin-complaint-preview-title {
    color: var(--ml-text);
}
:where([data-theme="dark"]) .admin-complaint-preview-buttons .btn-admin-complaint-dismiss {
    color: var(--ml-text);
}
:where([data-theme="dark"]) .admin-complaint-preview-buttons .btn-admin-complaint-dismiss:hover {
    color: var(--ml-text);
    background-color: var(--ml-surface-2);
}
:where([data-theme="dark"]) .btn-admin-complaint-delete {
    color: #e9aa72;
}
:where([data-theme="dark"]) .btn-admin-complaint-delete:hover {
    color: #eca26f;
}


/* ===== 3. Elle yazılan koyu tema düzeltmeleri ===== */

/* Sayfa zemini */
:where([data-theme="dark"]) body {
    background-color: var(--ml-bg);
    color: var(--ml-text);
}
:where([data-theme="dark"]) .panel-main,
:where([data-theme="dark"]) .checkout-layout {
    background-color: var(--ml-bg);
}

/* Açık temada var(--black) ile koyu olan zeminler koyu kalmalı
   (koyu temada --black metin rengi olarak açık renge döndü) */
:where([data-theme="dark"]) .panel-sidebar {
    background-color: var(--ml-sidebar);
    box-shadow: inset -1px 0 0 var(--ml-border);
}
:where([data-theme="dark"]) .site-footer {
    background-color: #0c0e10;
    border-top: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) .bulk-bar,
:where([data-theme="dark"]) .media-bulk-bar,
:where([data-theme="dark"]) .toast-notification,
:where([data-theme="dark"]) .link-detail-toast {
    background: var(--ml-surface-3);
    box-shadow: 0 0 0 1px var(--ml-border), 0 12px 32px rgba(0, 0, 0, 0.45);
}
:where([data-theme="dark"]) .top-link-rank {
    background-color: var(--ml-surface-3);
    color: #fff;
}
:where([data-theme="dark"]) .feature-hero-card {
    background: linear-gradient(135deg, var(--ml-ink) 0%, #1f2226 100%);
}
:where([data-theme="dark"]) .panel-limit-popup {
    background: var(--ml-surface-3);
    box-shadow: 0 0 0 1px var(--ml-border), 0 8px 32px rgba(0, 0, 0, 0.45);
}
:where([data-theme="dark"]) .panel-limit-bar-bg {
    background: #3a3f46;
}

/* Gölgeler koyu zeminde daha belirgin olsun ama "parlamasın" */
:where([data-theme="dark"]) .toast-box {
    box-shadow: 0 0 0 1px var(--ml-border), 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Navbar (herkese açık sayfalar) */
:where([data-theme="dark"]) .navbar {
    box-shadow: 0 1px 0 var(--ml-border);
}
:where([data-theme="dark"]) .navbar-sticky-container > hr {
    border-color: var(--ml-border) !important;
}

/* Logo: koyu temada beyaz varyant. Yalnızca gizleme yapılır; görünen logo
   sayfanın kendi display kuralını (ör. .checkout-logo img) korur. */
html:not([data-theme="dark"]) .logo-on-dark,
[data-theme="dark"] .logo-on-light {
    display: none !important;
}

/* Yeşil butonun hover'ı açık temada beyaz zemin + yeşil yazı -> koyu yüzey */
:where([data-theme="dark"]) .btn-green:hover,
:where([data-theme="dark"]) .cc-btn-primary:hover {
    background-color: transparent;
}

/* ===== Bootstrap bileşenleri ===== */
:where([data-theme="dark"]) .modal {
    --bs-modal-bg: var(--ml-surface);
    --bs-modal-color: var(--ml-text);
    --bs-modal-border-color: var(--ml-border);
    --bs-modal-header-border-color: var(--ml-border);
    --bs-modal-footer-border-color: var(--ml-border);
}
:where([data-theme="dark"]) .modal-content {
    box-shadow: 0 0 0 1px var(--ml-border), 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}
:where([data-theme="dark"]) .modal-backdrop {
    --bs-backdrop-bg: #000;
    --bs-backdrop-opacity: 0.65;
}
:where([data-theme="dark"]) .dropdown-menu {
    --bs-dropdown-bg: var(--ml-surface-2);
    --bs-dropdown-color: var(--ml-text);
    --bs-dropdown-border-color: var(--ml-border);
    --bs-dropdown-link-color: var(--ml-text);
    --bs-dropdown-link-hover-bg: var(--ml-surface-3);
    --bs-dropdown-header-color: var(--ml-text-2);
    --bs-dropdown-divider-bg: var(--ml-border);
}
:where([data-theme="dark"]) .dropdown-menu.border-0 {
    box-shadow: 0 0 0 1px var(--ml-border), 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}
:where([data-theme="dark"]) .form-control,
:where([data-theme="dark"]) .form-select,
:where([data-theme="dark"]) .input-group-text {
    background-color: var(--ml-input);
    color: var(--ml-text);
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) .form-control:focus,
:where([data-theme="dark"]) .form-select:focus {
    background-color: var(--ml-input);
    color: var(--ml-text);
}
:where([data-theme="dark"]) .form-control::placeholder,
:where([data-theme="dark"]) textarea::placeholder,
:where([data-theme="dark"]) input::placeholder {
    color: var(--ml-text-3);
}
:where([data-theme="dark"]) .form-control:disabled,
:where([data-theme="dark"]) .form-select:disabled,
:where([data-theme="dark"]) .form-control[readonly] {
    background-color: var(--ml-surface-2);
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .form-check-input:not(:checked) {
    background-color: var(--ml-input);
    border-color: #49505a;
}
:where([data-theme="dark"]) input:-webkit-autofill,
:where([data-theme="dark"]) input:-webkit-autofill:hover,
:where([data-theme="dark"]) input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ml-text);
    -webkit-box-shadow: 0 0 0 1000px var(--ml-input) inset;
    caret-color: var(--ml-text);
}
:where([data-theme="dark"]) .card {
    --bs-card-bg: var(--ml-surface);
    --bs-card-border-color: var(--ml-border);
    --bs-card-cap-bg: var(--ml-surface-2);
}
:where([data-theme="dark"]) .list-group {
    --bs-list-group-bg: var(--ml-surface);
    --bs-list-group-border-color: var(--ml-border);
    --bs-list-group-color: var(--ml-text);
}
:where([data-theme="dark"]) .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ml-text);
    --bs-table-border-color: var(--ml-border);
}
:where([data-theme="dark"]) .accordion {
    --bs-accordion-bg: var(--ml-surface);
    --bs-accordion-border-color: var(--ml-border);
    --bs-accordion-btn-bg: var(--ml-surface);
    --bs-accordion-active-bg: var(--ml-surface-2);
    --bs-accordion-color: var(--ml-text);
    --bs-accordion-btn-color: var(--ml-text);
    --bs-accordion-active-color: var(--ml-text);
}
/* Bootstrap yardımcı sınıfları (!important kullandıkları için özgüllükle ezilir) */
[data-theme="dark"] .bg-white { background-color: var(--ml-surface) !important; }
[data-theme="dark"] .bg-light { background-color: var(--ml-surface-2) !important; }
[data-theme="dark"] .text-dark { color: var(--ml-text) !important; }
[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary { color: var(--ml-text-2) !important; }
[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom { border-color: var(--ml-border) !important; }
[data-theme="dark"] .btn-light {
    --bs-btn-bg: var(--ml-surface-2);
    --bs-btn-border-color: var(--ml-border);
    --bs-btn-color: var(--ml-text);
    --bs-btn-hover-bg: var(--ml-surface-3);
    --bs-btn-hover-border-color: var(--ml-border);
    --bs-btn-hover-color: var(--ml-text);
    --bs-btn-active-bg: var(--ml-surface-3);
    --bs-btn-active-color: var(--ml-text);
}

/* ===== Quill editörü ===== */
:where([data-theme="dark"]) .ql-toolbar.ql-snow,
:where([data-theme="dark"]) .ql-container.ql-snow {
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) .ql-toolbar.ql-snow {
    background: var(--ml-surface-2);
}
:where([data-theme="dark"]) .ql-container.ql-snow {
    background: var(--ml-input);
    color: var(--ml-text);
}
:where([data-theme="dark"]) .ql-editor.ql-blank::before {
    color: var(--ml-text-3);
}
:where([data-theme="dark"]) .ql-snow .ql-stroke {
    stroke: var(--ml-text-2);
}
:where([data-theme="dark"]) .ql-snow .ql-fill,
:where([data-theme="dark"]) .ql-snow .ql-stroke.ql-fill {
    fill: var(--ml-text-2);
}
:where([data-theme="dark"]) .ql-snow .ql-picker {
    color: var(--ml-text-2);
}
:where([data-theme="dark"]) .ql-snow .ql-picker-options {
    background-color: var(--ml-surface-2);
    border-color: var(--ml-border) !important;
}
:where([data-theme="dark"]) .ql-snow .ql-tooltip {
    background-color: var(--ml-surface-2);
    border-color: var(--ml-border);
    color: var(--ml-text);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
:where([data-theme="dark"]) .ql-snow .ql-tooltip input[type=text] {
    background: var(--ml-input);
    color: var(--ml-text);
    border-color: var(--ml-border);
}
:where([data-theme="dark"]) .ql-snow .ql-editor a,
:where([data-theme="dark"]) .ql-snow .ql-tooltip a {
    color: #5ad6a6;
}

/* ===== DataTables 2 ===== */
:where([data-theme="dark"]) div.dt-container {
    color: var(--ml-text);
}
:where([data-theme="dark"]) div.dt-container .dt-input,
:where([data-theme="dark"]) div.dt-container .dt-search input,
:where([data-theme="dark"]) div.dt-container .dt-length select {
    background-color: var(--ml-input);
    color: var(--ml-text);
    border: 1px solid var(--ml-border);
}
:where([data-theme="dark"]) div.dt-container .dt-paging .dt-paging-button {
    color: var(--ml-text) !important;
}
:where([data-theme="dark"]) div.dt-container .dt-paging .dt-paging-button.disabled,
:where([data-theme="dark"]) div.dt-container .dt-paging .dt-paging-button.disabled:hover {
    color: rgba(255, 255, 255, 0.3) !important;
}
:where([data-theme="dark"]) div.dt-container .dt-paging .dt-paging-button:not(.disabled):not(.current):hover {
    background: var(--ml-surface-3) !important;
    border-color: var(--ml-border) !important;
    color: var(--ml-text) !important;
}
:where([data-theme="dark"]) table.dataTable > thead > tr > th,
:where([data-theme="dark"]) table.dataTable > thead > tr > td {
    border-bottom-color: var(--ml-border);
}
:where([data-theme="dark"]) table.dataTable > tbody > tr > th,
:where([data-theme="dark"]) table.dataTable > tbody > tr > td {
    border-top-color: var(--ml-border);
}
:where([data-theme="dark"]) table.dataTable > tfoot > tr > th,
:where([data-theme="dark"]) table.dataTable > tfoot > tr > td {
    border-top-color: var(--ml-border);
}
:where([data-theme="dark"]) table.dataTable > tbody > tr {
    background-color: transparent;
}

/* Sınıfsız form alanları: tarayıcının varsayılan koyu gri alanı yerine tema rengi
   (tamamı :where içinde -> özgüllük 0, sayfa CSS'indeki her kural bunu ezer) */
:where([data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
       [data-theme="dark"] textarea,
       [data-theme="dark"] select) {
    background-color: var(--ml-input);
    color: var(--ml-text);
}

/* Kaydırma çubukları */
:where([data-theme="dark"]) * {
    scrollbar-color: #3a3f46 transparent;
}

/* ===== 4. Tema geçiş düğmesi (her iki temada) ===== */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(233, 233, 233, 1);
    background: transparent;
    color: var(--black);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.theme-toggle:hover {
    color: var(--green);
    border-color: var(--green);
}
.theme-toggle:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}
.theme-toggle .theme-toggle-sun { display: none; }
:where([data-theme="dark"]) .theme-toggle {
    border-color: var(--ml-border);
    color: var(--ml-text);
}
:where([data-theme="dark"]) .theme-toggle:hover {
    color: #fbbf24;
    border-color: #fbbf24;
}
:where([data-theme="dark"]) .theme-toggle .theme-toggle-moon { display: none; }
:where([data-theme="dark"]) .theme-toggle .theme-toggle-sun { display: inline-block; }
/* Herkese açık mobil navbar'da düğme yeşil menü düğmesiyle aynı boyda */
.navbar .theme-toggle { width: 42px; height: 42px; }
@media (max-width: 576px) {
    .panel-theme-toggle { width: 36px; height: 36px; }
}
/* Ödeme başlığı: düğme başlık yüksekliğini değiştirmesin */
.checkout-header .checkout-theme-toggle {
    width: 32px;
    height: 32px;
    margin: -5px 0;
}

/* "Gizli" etiketi — panel kartları ve sahibine görünen herkese açık kartlar */
.ml-hidden-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
    color: var(--ml-text-2, #475569);
    background: var(--ml-fill-subtle, #f1f5f9);
    border: 1px solid var(--ml-border, #e2e8f0);
}
.ml-hidden-tag .iconify { color: inherit !important; flex-shrink: 0; }

:where([data-theme="dark"]) .bulk-icon-unhide::after { box-shadow: 0 0 0 1.5px var(--ml-surface-3); }

/* ===== Ortak arama / sıralama / filtre çubuğu (components/list_controls.twig) ===== */
.ml-list-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
}
.ml-list-search,
.ml-list-select {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 40px;
    padding: 0 0.75rem;
    margin: 0;
    border: 1px solid var(--ml-border, #e2e8f0);
    border-radius: 10px;
    background: var(--ml-surface, #fff);
    color: var(--ml-text-2, #475569);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ml-list-search { flex: 1 1 220px; max-width: 320px; cursor: text; }
.ml-list-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ml-text, #1e293b);
    font-size: 14px;
}
.ml-list-select select {
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ml-text, #1e293b);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding-right: 0.25rem;
    max-width: 190px;
}
.ml-list-select select option { color: #1e293b; background: #fff; }
.ml-list-search:focus-within,
.ml-list-select:focus-within { border-color: var(--green, #0d9361); box-shadow: 0 0 0 3px rgba(13, 147, 97, 0.12); }
.ml-list-select.is-active { border-color: var(--green, #0d9361); background: rgba(13, 147, 97, 0.06); }
.ml-list-select .iconify, .ml-list-search .iconify { flex-shrink: 0; color: var(--green, #0d9361); }
.ml-list-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    height: 40px;
    padding: 0 0.8rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ml-text-2, #64748b);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.ml-list-reset:hover { color: var(--ml-text, #1e293b); background: var(--ml-fill-subtle, #f1f5f9); }
.ml-list-reset[hidden] { display: none; }
.ml-list-loading { pointer-events: none; }
.ml-list-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 260px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ml-text-2, #64748b);
}
.ml-list-spinner .spinner-border { width: 2.5rem; height: 2.5rem; }
.ml-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--ml-text-2, #64748b);
}
.ml-list-empty .iconify { color: var(--ml-text-3, #94a3b8); margin-bottom: 0.75rem; }
.ml-list-empty-title { margin: 0 0 0.25rem; font-weight: 700; color: var(--ml-text, #1e293b); }
.ml-list-empty-desc { margin: 0 0 0.75rem; font-size: 14px; }
.ml-list-empty .ml-list-reset { border: 1px solid var(--ml-border, #e2e8f0); }
:where([data-theme="dark"]) .ml-list-select select option { color: #e5e7eb; background: #212429; }

/* Aranabilir açılır liste (kategori) */
.ml-combo { position: relative; user-select: none; -webkit-user-select: none; }
.ml-combo-search input { user-select: text; -webkit-user-select: text; }
.ml-combo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--ml-text, #1e293b);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    max-width: 190px;
}
.ml-combo-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-combo-btn .iconify { color: var(--ml-text-3, #94a3b8) !important; }
.ml-combo-pop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1060;
    width: 240px;
    padding: 0.5rem;
    border: 1px solid var(--ml-border, #e2e8f0);
    border-radius: 12px;
    background: var(--ml-surface, #fff);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    cursor: default;
}
.ml-combo-pop.is-right { left: auto; right: 0; }
.ml-combo-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    height: 36px;
    padding: 0 0.6rem;
    margin-bottom: 0.4rem;
    border: 1px solid var(--ml-border, #e2e8f0);
    border-radius: 8px;
    background: var(--ml-fill-subtle, #f8fafc);
}
.ml-combo-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ml-text, #1e293b); font-size: 14px; }
.ml-combo-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.ml-combo-list li {
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    font-size: 14px;
    color: var(--ml-text, #1e293b);
    cursor: pointer;
}
.ml-combo-list li:hover { background: var(--ml-fill-subtle, #f1f5f9); }
.ml-combo-list li[aria-selected="true"] { color: var(--green, #0d9361); font-weight: 600; background: rgba(13, 147, 97, 0.08); }
.ml-combo-empty { margin: 0; padding: 0.6rem; font-size: 13px; color: var(--ml-text-3, #94a3b8); text-align: center; }
:where([data-theme="dark"]) .ml-combo-pop { box-shadow: 0 0 0 1px var(--ml-border), 0 12px 32px rgba(0, 0, 0, 0.45); }

/* Panel: başlık satırında, arama kutusunun yanında (ayrı satır açmaz) */
.ml-list-controls.is-inline { margin: 0; flex-wrap: nowrap; }
.ml-list-controls.is-inline .ml-list-select,
.ml-list-controls.is-inline .ml-list-reset { height: 45px; flex-shrink: 0; }
.ml-list-controls.is-inline .ml-list-select select { max-width: 160px; }
.ml-list-controls.is-inline .ml-list-reset { padding: 0 0.6rem; }

@media (max-width: 576px) {
    /* Arama tam satır; seçimler alt satırda yatay kaydırılabilir şerit */
    .ml-list-controls { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
    .ml-list-controls::-webkit-scrollbar { display: none; }
    .ml-list-controls:has(.ml-list-search) { flex-wrap: wrap; overflow: visible; }
    .ml-list-search { flex: 1 1 100%; max-width: none; }
    .ml-list-select, .ml-list-reset { flex-shrink: 0; }
    .ml-list-select select { max-width: 150px; }
    /* Arama varken (herkese açık sayfalar) seçimler alt satırda yan yana iki sütun */
    .ml-list-controls:has(.ml-list-search) .ml-list-select { flex: 1 1 calc(50% - 0.25rem); min-width: 0; }
    .ml-list-controls:has(.ml-list-search) .ml-list-select select { max-width: none; width: 100%; min-width: 0; text-overflow: ellipsis; }
    .ml-list-controls:has(.ml-list-search) .ml-combo-btn { max-width: none; width: 100%; justify-content: space-between; }
    /* Kaydırılabilir şeritte açılır liste kesilmesin */
    .ml-list-controls:has(.ml-combo.is-open) { overflow: visible; flex-wrap: wrap; }
    .ml-combo-pop { width: min(260px, calc(100vw - 32px)); }
    .ml-list-controls.is-inline { width: 100%; }
}
.ml-list-controls[hidden] { display: none !important; }
