html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="dark"] body {
    background: #0b1120 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] .main-content,
html[data-theme="dark"] .content,
html[data-theme="dark"] main,
html[data-theme="dark"] section {
    color: #e5e7eb;
}

html[data-theme="dark"] .top-bar,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .chart-card,
html[data-theme="dark"] .detail-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .card-body-custom,
html[data-theme="dark"] .card-header-custom,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .register-card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-content-custom,
html[data-theme="dark"] .cart-sidebar,
html[data-theme="dark"] .info-box,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .box,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .bg-white {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: #263244 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28) !important;
}

html[data-theme="dark"] .sidebar {
    background: linear-gradient(135deg, #020617 0%, #0f172a 100%) !important;
}

html[data-theme="dark"] .main-header {
    background: #0f172a !important;
    border-bottom: 1px solid #263244 !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .34) !important;
}

html[data-theme="dark"] .logo h1 {
    color: #f8fafc !important;
}

html[data-theme="dark"] .logo small {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .main-nav a {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .main-nav a:hover,
html[data-theme="dark"] .main-nav a.active {
    color: #818cf8 !important;
}

html[data-theme="dark"] .btn-login {
    color: #c7d2fe !important;
    border-color: #818cf8 !important;
    background: transparent !important;
}

html[data-theme="dark"] .btn-login:hover {
    background: #4f46e5 !important;
    color: #fff !important;
}

html[data-theme="dark"] .features-section,
html[data-theme="dark"] .angebote,
html[data-theme="dark"] .kontakt-section {
    background: #0b1120 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 48%, #4c1d95 100%) !important;
}

html[data-theme="dark"] .hero p {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .section-title h2 {
    background: linear-gradient(135deg, #818cf8 0%, #c4b5fd 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

html[data-theme="dark"] .section-title p,
html[data-theme="dark"] .offer-subsection > p {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .offer-tile,
html[data-theme="dark"] .domain-offer,
html[data-theme="dark"] .service-offer,
html[data-theme="dark"] .configurator,
html[data-theme="dark"] .config-summary,
html[data-theme="dark"] .kontakt-form input,
html[data-theme="dark"] .kontakt-form textarea,
html[data-theme="dark"] .newsletter-form input {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: #263244 !important;
}

html[data-theme="dark"] .offer-tile:hover {
    border-color: #818cf8 !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .26) !important;
}

html[data-theme="dark"] .offer-tile strong,
html[data-theme="dark"] .domain-offer strong,
html[data-theme="dark"] .service-offer strong,
html[data-theme="dark"] .offer-subsection h3,
html[data-theme="dark"] .feature-card h3 {
    color: #f8fafc !important;
}

html[data-theme="dark"] .offer-tile span,
html[data-theme="dark"] .domain-offer span,
html[data-theme="dark"] .domain-offer small,
html[data-theme="dark"] .service-offer span,
html[data-theme="dark"] .feature-card p,
html[data-theme="dark"] .kontakt-section p {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .main-footer {
    background: #020617 !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .page-title h2,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .info-value,
html[data-theme="dark"] .spec-value,
html[data-theme="dark"] .value,
html[data-theme="dark"] label {
    color: #f8fafc !important;
}

html[data-theme="dark"] p,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .form-text,
html[data-theme="dark"] small,
html[data-theme="dark"] .label,
html[data-theme="dark"] .spec-label {
    color: #94a3b8 !important;
}

html[data-theme="dark"] table,
html[data-theme="dark"] .table {
    color: #e5e7eb !important;
    --bs-table-color: #e5e7eb;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #172033;
    --bs-table-hover-bg: #1e293b;
    --bs-table-border-color: #263244;
}

html[data-theme="dark"] th,
html[data-theme="dark"] td {
    border-color: #263244 !important;
}

html[data-theme="dark"] thead,
html[data-theme="dark"] .table-dark {
    background: #020617 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #64748b !important;
}

html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .user-dropdown {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: #263244 !important;
}

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

html[data-theme="dark"] .alert,
html[data-theme="dark"] .alert-warning {
    background: #241a05 !important;
    color: #fde68a !important;
    border-color: #92400e !important;
}

html[data-theme="dark"] .alert-danger {
    background: #2a1014 !important;
    color: #fecaca !important;
    border-color: #991b1b !important;
}

html[data-theme="dark"] .alert-success {
    background: #052e1b !important;
    color: #bbf7d0 !important;
    border-color: #047857 !important;
}

html[data-theme="dark"] code,
html[data-theme="dark"] pre {
    background: #020617 !important;
    color: #f8fafc !important;
    border-color: #263244 !important;
}

html[data-theme="dark"] .test-card,
html[data-theme="dark"] .info {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: #263244 !important;
}

html[data-theme="dark"] td code,
html[data-theme="dark"] .table code,
html[data-theme="dark"] .info code {
    background: #020617 !important;
    color: #f8fafc !important;
    border: 1px solid #475569 !important;
    border-radius: 6px;
    padding: 3px 7px;
    font-weight: 700;
}

html[data-theme="dark"] .progress-bar-custom {
    background: #263244 !important;
}

html[data-theme="dark"] .progress-fill {
    background: linear-gradient(90deg, #667eea, #22d3ee) !important;
}

html[data-theme="dark"] .vm-card {
    background: #111827 !important;
    color: #e5e7eb !important;
    border: 1px solid #263244 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28) !important;
}

html[data-theme="dark"] .vm-body {
    background: #111827 !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] .vm-card .spec-item {
    border-bottom-color: #263244 !important;
}

html[data-theme="dark"] .vm-card .spec-label {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .vm-card .spec-value {
    color: #f8fafc !important;
}

html[data-theme="dark"] .top-bar,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .card-body-custom,
html[data-theme="dark"] .card-header-custom,
html[data-theme="dark"] .modal-content-custom,
html[data-theme="dark"] .vm-card,
html[data-theme="dark"] .backup-vm-card,
html[data-theme="dark"] .create-shortcut {
    background: #151f32 !important;
    color: #e5e7eb !important;
    border-color: #2d3b52 !important;
}

html[data-theme="dark"] .card-header-custom,
html[data-theme="dark"] .top-bar {
    background: #18243a !important;
}

html[data-theme="dark"] .card-body-custom.bg-white,
html[data-theme="dark"] .card-header-custom.bg-white,
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .p-3.bg-light {
    background: #1b2940 !important;
    color: #e5e7eb !important;
    border-color: #2d3b52 !important;
}

html[data-theme="dark"] .create-shortcut:hover {
    background: #1e2d46 !important;
    border-color: #818cf8 !important;
}

html[data-theme="dark"] .create-shortcut strong,
html[data-theme="dark"] .dashboard-card strong,
html[data-theme="dark"] .card-body-custom strong,
html[data-theme="dark"] .table strong {
    color: #f8fafc !important;
}

html[data-theme="dark"] .create-shortcut small,
html[data-theme="dark"] .resource-price-pill,
html[data-theme="dark"] .page-title p {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .resource-price-pill {
    background: #202f49 !important;
    border-color: #3b4b66 !important;
}

html[data-theme="dark"] .modal-header-custom {
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .modal-body-custom,
html[data-theme="dark"] .modal-footer-custom {
    background: #151f32 !important;
    color: #e5e7eb !important;
    border-color: #2d3b52 !important;
}

html[data-theme="dark"] .table-responsive {
    color: #e5e7eb !important;
}

html[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: transparent !important;
    color: #e5e7eb !important;
}

html[data-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: #22314d !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .badge.bg-secondary {
    background-color: #475569 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .alert-info {
    background: #102a43 !important;
    color: #bfdbfe !important;
    border-color: #2563eb !important;
}

html[data-theme="dark"] .btn-outline-primary {
    color: #c7d2fe !important;
    border-color: #6366f1 !important;
}

html[data-theme="dark"] .btn-outline-primary:hover {
    background: #4f46e5 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .system-info {
    background: #111827 !important;
    color: #e5e7eb !important;
    border: 1px solid #263244 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .28) !important;
}

html[data-theme="dark"] .system-info h4 {
    color: #f8fafc !important;
}

html[data-theme="dark"] .system-info .info-item {
    background: #182235 !important;
    color: #e5e7eb !important;
    border: 1px solid #2d3b52 !important;
}

html[data-theme="dark"] .system-info .info-label,
html[data-theme="dark"] .system-info .detail-item .label {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .system-info .info-value,
html[data-theme="dark"] .system-info .detail-item .value {
    color: #f8fafc !important;
}

html[data-theme="dark"] .system-info .detail-card {
    background: #111827 !important;
    color: #e5e7eb !important;
    border: 1px solid #2d3b52 !important;
}

html[data-theme="dark"] .system-info .detail-title {
    color: #f8fafc !important;
}

.theme-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 10000;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
    backdrop-filter: blur(12px);
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.theme-toggle.theme-toggle-floating {
    position: fixed;
    right: 18px;
    bottom: 18px;
    display: inline-flex !important;
}

.theme-toggle:hover {
    transform: translateY(-1px);
}

html[data-theme="dark"] .theme-toggle {
    background: rgba(15, 23, 42, .92);
    color: #f8fafc;
    border-color: rgba(148, 163, 184, .45);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle.theme-toggle-inline {
    position: static;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    box-shadow: none;
    backdrop-filter: none;
}

.mobile-menu-wrapper .theme-toggle.theme-toggle-inline {
    width: 42px;
    height: 42px;
    margin-top: 6px;
}

@media (max-width: 768px) {
    .theme-toggle {
        top: auto;
        right: 12px;
        bottom: 12px;
        width: 40px;
        height: 40px;
    }

    .theme-toggle.theme-toggle-floating {
        right: 12px;
        bottom: 12px;
    }
}
