@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Root Variables --- */
:root {
    --theme-font: 'Inter', 'SF UI Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --theme-bg: #FAFBFD;
    --theme-surface: #FFFFFF;
    --theme-surface-hover: #F8F9FC;
    --theme-border: rgba(0, 0, 0, 0.08);
    --theme-border-hover: rgba(0, 0, 0, 0.15);
    --theme-text-primary: #1A1D26;
    --theme-text-secondary: #6B7280;
    --theme-text-muted: #9CA3AF;
    --theme-accent: #2563EB;
    --theme-accent-light: #EFF6FF;
    --theme-accent-hover: #1D4ED8;
    --theme-success: #059669;
    --theme-error: #DC2626;
    --theme-error-bg: #FEF2F2;
    --theme-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --theme-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --theme-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
    --theme-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.1);
    --theme-radius-sm: 0.5rem;
    --theme-radius-md: 0.75rem;
    --theme-radius-lg: 1rem;
    --theme-radius-xl: 1.25rem;
    --theme-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Overrides --- */
body {
    background: var(--theme-bg) !important;
    font-family: var(--theme-font) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    background: transparent !important;
    max-width: 1480px;
    margin: 0 auto !important;
    padding: 2rem 4vw !important;
}

/* --- Header --- */
header {
    padding: 1rem 1.5rem;
    background: var(--theme-surface);
    border-radius: var(--theme-radius-lg);
    box-shadow: var(--theme-shadow-sm);
    border: 1px solid var(--theme-border);
    margin-bottom: 2rem;
    transition: var(--theme-transition);
}

header:hover {
    box-shadow: var(--theme-shadow-md);
}

.logo img {
    height: 2.2rem;
    transition: var(--theme-transition);
}

.address_link {
    font-family: var(--theme-font) !important;
    font-weight: 500;
    color: var(--theme-text-secondary) !important;
    font-size: 0.9rem;
    transition: var(--theme-transition);
    text-decoration: none;
}

.address_link:hover {
    color: var(--theme-accent) !important;
}

.contacts img {
    height: 2.4rem;
    transition: var(--theme-transition);
    opacity: 0.7;
    filter: saturate(0.8);
}

.contacts img:hover {
    opacity: 1;
    filter: saturate(1);
    transform: translateY(-2px);
}

.contacts {
    gap: 0.5rem !important;
}

/* --- Theme Toggle --- */
.theme-toggle {
    font-family: var(--theme-font) !important;
    border-radius: var(--theme-radius-sm) !important;
    border: 1px solid var(--theme-border) !important;
    background: var(--theme-surface) !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: var(--theme-text-secondary) !important;
    transition: var(--theme-transition) !important;
    box-shadow: var(--theme-shadow-sm);
}

.theme-toggle:hover {
    border-color: var(--theme-accent) !important;
    color: var(--theme-accent) !important;
    box-shadow: var(--theme-shadow-md) !important;
    background: var(--theme-accent-light) !important;
}

/* --- Section Title --- */
main {
    margin-top: 0 !important;
}

/* --- Form Grid --- */
.form_grid {
    gap: 1.25rem !important;
    background: var(--theme-surface);
    padding: 2rem;
    border-radius: var(--theme-radius-xl);
    box-shadow: var(--theme-shadow-md);
    border: 1px solid var(--theme-border);
}

/* --- Labels --- */
.label {
    font-family: var(--theme-font) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    color: var(--theme-text-secondary);
    text-transform: uppercase;
}

#desktop-version .label {
    padding-left: 5px !important;
}

.form_field_info {
    margin-bottom: 0.6rem !important;
}

/* --- Custom Input --- */
.custom_input {
    font-family: var(--theme-font) !important;
    background: var(--theme-bg) !important;
    border: 1.5px solid var(--theme-border) !important;
    border-radius: var(--theme-radius-md) !important;
    padding: 1rem 1.25rem !important;
    font-size: 0.95rem !important;
    color: var(--theme-text-primary) !important;
    transition: var(--theme-transition) !important;
    box-shadow: var(--theme-shadow-sm);
}

.custom_input::placeholder {
    color: var(--theme-text-muted) !important;
    font-weight: 400;
}

.custom_input:hover {
    background: var(--theme-surface) !important;
    border-color: var(--theme-accent) !important;
    color: var(--theme-accent) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--theme-shadow-sm) !important;
}

.custom_input:focus {
    border-color: var(--theme-accent) !important;
    background: var(--theme-surface) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--theme-shadow-sm) !important;
    outline: none;
}

.form_field.focused:valid .custom_input,
.form_field:focus-within .custom_input,
.files_valid #file_list_wrapper {
    background-color: var(--theme-surface) !important;
    border-color: var(--theme-accent) !important;
    color: var(--theme-text-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--theme-shadow-sm) !important;
}

.form_field.focused:invalid .custom_input {
    border-color: var(--theme-error) !important;
    background-color: var(--theme-error-bg) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

/* File list placeholder text should be muted like other placeholders */
#file_list {
    color: var(--theme-text-muted) !important;
}

.files_valid #file_list_wrapper #file_list {
    color: var(--theme-text-primary) !important;
}

/* --- Custom Select --- */
.custom-select-container {
    font-family: var(--theme-font) !important;
    background: var(--theme-bg) !important;
    border: 1.5px solid var(--theme-border) !important;
    border-radius: var(--theme-radius-md) !important;
    font-size: 0.95rem !important;
    transition: var(--theme-transition) !important;
    box-shadow: var(--theme-shadow-sm);
}

.custom-select-container:hover {
    background: var(--theme-surface) !important;
    border-color: var(--theme-accent) !important;
    color: var(--theme-accent) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--theme-shadow-sm) !important;
}

.custom-select-opener {
    padding: 1rem 1.25rem !important;
    color: var(--theme-text-muted) !important;
}

.custom-select-opener::after {
    background-color: var(--theme-text-muted) !important;
    right: 1.25rem !important;
}

.custom-select-opener::before {
    border-left-color: var(--theme-border) !important;
    right: 3.5rem !important;
}

.custom-select-container.is-open {
    background-color: var(--theme-surface) !important;
    border-color: var(--theme-accent) !important;
    color: var(--theme-accent) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--theme-shadow-lg) !important;
    z-index: 10;
}

.custom-select-container.is-open .custom-select-opener {
    border-bottom-color: rgba(37, 99, 235, 0.15) !important;
}

.custom-select-container.is-open .custom-select-opener::after {
    background-color: var(--theme-accent) !important;
}

.custom-select-container.is-open .custom-select-opener::before {
    border-left-color: rgba(37, 99, 235, 0.15) !important;
}

.custom-select-panel {
    color: var(--theme-text-primary) !important;
    font-family: var(--theme-font) !important;
}

.custom-select-panel::-webkit-scrollbar-thumb {
    background-color: var(--theme-accent) !important;
    border-radius: 1rem;
}

.custom-select-panel::-webkit-scrollbar-track {
    background-color: var(--theme-accent-light) !important;
}

.custom-select-option {
    transition: var(--theme-transition);
    border-radius: var(--theme-radius-sm);
}

.custom-select-option.has-focus {
    background-color: var(--theme-accent-light) !important;
}

.custom-select-option.is-selected {
    color: var(--theme-accent) !important;
    font-weight: 500;
}

.form_field:focus-within .custom-select-container,
.form_field.focused:valid .custom-select-container {
    background-color: var(--theme-surface) !important;
    border-color: var(--theme-accent) !important;
    color: var(--theme-accent) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--theme-shadow-sm) !important;
}

.form_field.focused:valid .custom-select-opener,
.form_field:focus-within .custom-select-opener {
    color: var(--theme-accent) !important;
}

.form_field.focused:invalid .custom-select-container {
    background: var(--theme-error-bg) !important;
    border-color: var(--theme-error) !important;
    color: var(--theme-error) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

/* --- Custom Input Button (Ausstattung) --- */
.custom_input_button {
    font-family: var(--theme-font) !important;
    background: var(--theme-bg) !important;
    border: 1.5px solid var(--theme-border) !important;
    border-radius: var(--theme-radius-md) !important;
    padding: 1rem 1.25rem !important;
    font-size: 0.95rem !important;
    color: var(--theme-text-muted) !important;
    transition: var(--theme-transition) !important;
    box-shadow: var(--theme-shadow-sm);
    cursor: pointer;
}

.custom_input_button:hover,
.form_field.focused .custom_input_button {
    background: var(--theme-surface) !important;
    border-color: var(--theme-accent) !important;
    color: var(--theme-accent) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--theme-shadow-sm) !important;
}

.ausstattung_invalid .custom_input_button {
    border-color: var(--theme-error) !important;
    background-color: var(--theme-error-bg) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.ausstattung_invalid .custom_input_after::before {
    border-left-color: var(--theme-error) !important;
}

.ausstattung_invalid .custom_input_after::after {
    background-color: var(--theme-error) !important;
}

.ausstattung_invalid .validation_mark {
    background-image: url('/assets/images/invalid.svg') !important;
}

.custom_input_after::before {
    border-left-color: var(--theme-border) !important;
    right: 3.5rem !important;
}

.custom_input_after::after {
    right: 1.25rem !important;
}

/* --- Toggle Switch --- */
.toggle {
    font-family: var(--theme-font) !important;
    color: var(--theme-text-muted) !important;
    font-size: 0.85rem !important;
    top: 50% !important;
    transform: translateY(-50%);
    right: 1rem !important;
    gap: 0.4rem !important;
}

.toggle_checked {
    color: #3A68B5 !important;
}

/* Ensure the LEISTUNG input with toggle doesn't overlap text.
   The toggle contains: PS + gap + switch(2.6rem) + gap + Kw + right(1rem) ≈ 7rem total */
#leistung {
    padding-right: 8rem !important;
}

/* Ensure the custom_input_wrapper properly contains the toggle */
.custom_input_wrapper {
    position: relative !important;
}

.switch {
    width: 2.6rem !important;
    height: 1.5rem !important;
}

.slider:before {
    height: 1.1rem !important;
    width: 1.1rem !important;
}

input:checked + .slider:before {
    transform: translateX(1.1rem) !important;
}

.slider {
    background-color: #3A68B5 !important;
    border-radius: 1rem !important;
}

.slider:before {
    border-radius: 50% !important;
}

/* --- Search Filter --- */
.search_filter {
    font-family: var(--theme-font) !important;
    background-color: var(--theme-surface) !important;
    color: var(--theme-accent) !important;
    border-radius: var(--theme-radius-md) var(--theme-radius-md) 0 0 !important;
}

/* --- File Upload --- */
#file_button {
    font-family: var(--theme-font) !important;
    background: rgba(58, 104, 181, 0.08) !important;
    border: 1.5px solid #3A68B5 !important;
    border-radius: var(--theme-radius-sm) !important;
    color: #3A68B5 !important;
    font-weight: 500 !important;
    font-size: 0.8rem !important;
    padding: 0.25rem 0.75rem !important;
    transition: var(--theme-transition) !important;
    cursor: pointer;
}

#file_button:hover {
    background: #3A68B5 !important;
    border-color: #3A68B5 !important;
    color: #FFFFFF !important;
    box-shadow: var(--theme-shadow-md) !important;
}

.remove_file_btn svg {
    fill: var(--theme-accent) !important;
    transition: var(--theme-transition);
}

.remove_file_btn:hover svg {
    fill: var(--theme-error) !important;
}

/* --- Submit Button --- */
.custom_submit,
#submit_btn {
    font-family: var(--theme-font) !important;
    background: #3A68B5 !important;
    border: none !important;
    border-radius: var(--theme-radius-md) !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.05em !important;
    padding: 1.1rem 3rem !important;
    transition: var(--theme-transition) !important;
    box-shadow: 0 2px 8px rgba(58, 104, 181, 0.2);
    cursor: pointer;
}

#submit_btn:hover {
    background: #2F5694 !important;
    box-shadow: 0 4px 16px rgba(47, 86, 148, 0.3) !important;
    transform: translateY(-1px);
}

#submit_btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(47, 86, 148, 0.3) !important;
}

/* --- Modal --- */
.modal {
    background: rgba(250, 251, 253, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal_content h2 {
    font-family: var(--theme-font) !important;
    font-weight: 700 !important;
    color: var(--theme-text-primary) !important;
    font-size: 1.5rem !important;
    letter-spacing: -0.01em !important;
}

.modal_content > p {
    font-family: var(--theme-font) !important;
    color: var(--theme-text-secondary) !important;
    font-size: 0.95rem !important;
}

.close {
    background: var(--theme-surface) !important;
    border: 1.5px solid var(--theme-border) !important;
    border-radius: var(--theme-radius-sm) !important;
    transition: var(--theme-transition) !important;
    box-shadow: var(--theme-shadow-sm);
}

.close:hover {
    border-color: var(--theme-accent) !important;
    box-shadow: var(--theme-shadow-md) !important;
}

.modal_content_block {
    background: var(--theme-bg) !important;
    border: 1.5px solid var(--theme-border) !important;
    border-radius: var(--theme-radius-lg) !important;
    box-shadow: var(--theme-shadow-sm);
}

.column h3 {
    font-family: var(--theme-font) !important;
    color: var(--theme-text-primary) !important;
    font-weight: 600 !important;
}

/* --- Checkbox --- */
.custom_checkbox_container {
    font-family: var(--theme-font) !important;
    color: var(--theme-text-primary) !important;
    font-size: 0.9rem !important;
}

.custom_checkbox_checkmark {
    border-color: var(--theme-border) !important;
    border-width: 1.5px !important;
    border-radius: var(--theme-radius-sm) !important;
    transition: var(--theme-transition) !important;
}

.custom_checkbox:checked ~ .custom_checkbox_checkmark {
    background-color: var(--theme-accent) !important;
    border-color: var(--theme-accent) !important;
}

.custom_checkbox:checked ~ .custom_ckeckbox_label {
    color: var(--theme-accent) !important;
}

/* --- Validation Marks --- */
.form_field.focused:valid .validation_mark {
    filter: hue-rotate(10deg) saturate(1.2);
}

/* --- Background Mode Toggle --- */
.bg-mode-toggle {
    font-family: var(--theme-font) !important;
    border-radius: var(--theme-radius-sm) !important;
    border: 1px solid var(--theme-border) !important;
    background: var(--theme-surface) !important;
    box-shadow: var(--theme-shadow-md) !important;
    font-weight: 500 !important;
    transition: var(--theme-transition) !important;
}

.bg-mode-toggle:hover {
    border-color: var(--theme-accent) !important;
    box-shadow: var(--theme-shadow-lg) !important;
}

/* --- Background Adjustments --- */
html[data-bg="active"] .container {
    background: rgba(255, 255, 255, 0.50) !important;
    backdrop-filter: blur(16px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.2) !important;
}

html[data-bg="active"] .form_grid {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

html[data-bg="active"] header {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* --- Smooth Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--theme-text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--theme-text-secondary);
}

[data-theme="dark"] {
    --theme-bg: #2B3241;
    --theme-surface: #374154;
    --theme-surface-hover: #424D61;
    --theme-border: rgba(255, 255, 255, 0.08);
    --theme-border-hover: rgba(255, 255, 255, 0.15);
    --theme-text-primary: #F0F1F3;
    --theme-text-secondary: #9CA3AF;
    --theme-text-muted: #8D95A4;
    --theme-accent: #3B82F6;
    --theme-accent-light: rgba(59, 130, 246, 0.1);
    --theme-accent-hover: #60A5FA;
    --theme-error: #EF4444;
    --theme-error-bg: rgba(239, 68, 68, 0.1);
    --theme-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --theme-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --theme-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
    --theme-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] body {
    background: var(--theme-bg) !important;
}

[data-theme="dark"] header {
    background: #465168 !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

[data-theme="dark"] .form_grid {
    background: #3F4A60 !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}

[data-theme="dark"] .address_link {
    color: var(--theme-text-secondary) !important;
}

[data-theme="dark"] .label {
    color: var(--theme-text-secondary) !important;
}

[data-theme="dark"] .custom_input {
    background: var(--theme-bg) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text-primary) !important;
}

[data-theme="dark"] .custom_input:hover {
    background: var(--theme-surface) !important;
    border-color: var(--theme-accent) !important;
    color: var(--theme-accent) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), var(--theme-shadow-sm) !important;
}

[data-theme="dark"] .custom_input::placeholder {
    color: var(--theme-text-muted) !important;
}

[data-theme="dark"] .custom_input:focus,
[data-theme="dark"] .form_field.focused:valid .custom_input,
[data-theme="dark"] .form_field:focus-within .custom_input {
    background: var(--theme-surface) !important;
    border-color: var(--theme-accent) !important;
    color: var(--theme-text-primary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), var(--theme-shadow-sm) !important;
}

[data-theme="dark"] .form_field.focused:invalid .custom_input {
    background: var(--theme-error-bg) !important;
    border-color: var(--theme-error) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

[data-theme="dark"] .custom-select-container {
    background: var(--theme-bg) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text-muted) !important;
}

[data-theme="dark"] .custom-select-container:hover {
    background: var(--theme-surface) !important;
    border-color: var(--theme-accent) !important;
    color: var(--theme-accent) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), var(--theme-shadow-sm) !important;
}

[data-theme="dark"] .custom-select-opener {
    color: var(--theme-text-muted) !important;
}

[data-theme="dark"] .custom-select-opener::after {
    background-color: var(--theme-text-muted) !important;
}

[data-theme="dark"] .custom-select-opener::before {
    border-left-color: var(--theme-border) !important;
}

[data-theme="dark"] .custom-select-container.is-open {
    background: var(--theme-surface) !important;
    border-color: var(--theme-accent) !important;
    color: var(--theme-accent) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), var(--theme-shadow-lg) !important;
}

[data-theme="dark"] .custom-select-container.is-open .custom-select-opener {
    border-bottom-color: rgba(59, 130, 246, 0.15) !important;
}

[data-theme="dark"] .custom-select-container.is-open .custom-select-opener::after {
    background-color: var(--theme-accent) !important;
}

[data-theme="dark"] .custom-select-container.is-open .custom-select-opener::before {
    border-left-color: rgba(59, 130, 246, 0.15) !important;
}

[data-theme="dark"] .custom-select-panel {
    color: var(--theme-text-primary) !important;
}

[data-theme="dark"] .custom-select-option.has-focus {
    background-color: var(--theme-accent-light) !important;
}

[data-theme="dark"] .custom-select-option.is-selected {
    color: var(--theme-accent) !important;
}

[data-theme="dark"] .form_field:focus-within .custom-select-container,
[data-theme="dark"] .form_field.focused:valid .custom-select-container {
    background: var(--theme-surface) !important;
    border-color: var(--theme-accent) !important;
    color: var(--theme-accent) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), var(--theme-shadow-sm) !important;
}

[data-theme="dark"] .form_field.focused:valid .custom-select-opener,
[data-theme="dark"] .form_field:focus-within .custom-select-opener {
    color: var(--theme-accent) !important;
}

[data-theme="dark"] .form_field.focused:invalid .custom-select-container {
    background: var(--theme-error-bg) !important;
    border-color: var(--theme-error) !important;
    color: var(--theme-error) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

[data-theme="dark"] .custom_input_button {
    background: var(--theme-bg) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text-muted) !important;
}

[data-theme="dark"] .custom_input_button:hover,
[data-theme="dark"] .form_field.focused .custom_input_button {
    background: var(--theme-surface) !important;
    border-color: var(--theme-accent) !important;
    color: var(--theme-accent) !important;
}

[data-theme="dark"] .ausstattung_invalid .custom_input_button {
    border-color: var(--theme-error) !important;
    background-color: var(--theme-error-bg) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

[data-theme="dark"] .ausstattung_invalid .custom_input_after::before {
    border-left-color: var(--theme-error) !important;
}

[data-theme="dark"] .ausstattung_invalid .custom_input_after::after {
    background-color: var(--theme-error) !important;
}

[data-theme="dark"] .custom_input_after::before {
    border-left-color: var(--theme-border) !important;
}

[data-theme="dark"] .toggle {
    color: var(--theme-text-muted) !important;
}

[data-theme="dark"] .toggle_checked {
    color: #3A68B5 !important;
}

[data-theme="dark"] .slider {
    background-color: #3A68B5 !important;
}

[data-theme="dark"] .slider:before {
    background-color: var(--theme-bg) !important;
}

[data-theme="dark"] .search_filter {
    background-color: var(--theme-surface) !important;
    color: #3A68B5 !important;
}

[data-theme="dark"] #file_button {
    background: rgba(58, 104, 181, 0.1) !important;
    border-color: #3A68B5 !important;
    color: #3A68B5 !important;
}

[data-theme="dark"] #file_button:hover {
    background: #3A68B5 !important;
    border-color: #3A68B5 !important;
    color: #FFFFFF !important;
}

[data-theme="dark"] .custom_submit,
[data-theme="dark"] #submit_btn {
    background: #3A68B5 !important;
    border: none !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(58, 104, 181, 0.2);
}

[data-theme="dark"] #submit_btn:hover {
    background: #2F5694 !important;
    box-shadow: 0 4px 16px rgba(47, 86, 148, 0.3) !important;
}

[data-theme="dark"] .modal {
    background: rgba(15, 17, 23, 0.95) !important;
    backdrop-filter: blur(12px) !important;
}

[data-theme="dark"] .modal_content h2 {
    color: var(--theme-text-primary) !important;
}

[data-theme="dark"] .modal_content > p {
    color: var(--theme-text-secondary) !important;
}

[data-theme="dark"] .close {
    background: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
}

[data-theme="dark"] .close:hover {
    border-color: var(--theme-accent) !important;
}

[data-theme="dark"] .modal_content_block {
    background: var(--theme-bg) !important;
    border-color: var(--theme-border) !important;
}

[data-theme="dark"] .column h3 {
    color: var(--theme-text-primary) !important;
}

[data-theme="dark"] .custom_checkbox_container {
    color: var(--theme-text-primary) !important;
}

[data-theme="dark"] .custom_checkbox_checkmark {
    border-color: var(--theme-border) !important;
}

[data-theme="dark"] .custom_checkbox:checked ~ .custom_checkbox_checkmark {
    background-color: var(--theme-accent) !important;
    border-color: var(--theme-accent) !important;
}

[data-theme="dark"] .custom_checkbox:checked ~ .custom_ckeckbox_label {
    color: var(--theme-accent) !important;
}

[data-theme="dark"] .remove_file_btn svg {
    fill: var(--theme-accent) !important;
}

[data-theme="dark"] .remove_file_btn:hover svg {
    fill: var(--theme-error) !important;
}

[data-theme="dark"] .contacts img {
    opacity: 0.6;
}

[data-theme="dark"] .contacts img:hover {
    opacity: 1;
}

/* --- Dark Theme Toggle --- */
[data-theme="dark"] .theme-toggle {
    background: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text-secondary) !important;
}

[data-theme="dark"] .theme-toggle:hover {
    border-color: var(--theme-accent) !important;
    color: var(--theme-accent) !important;
    background: var(--theme-accent-light) !important;
}

[data-theme="dark"] .bg-mode-toggle {
    background: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text-secondary) !important;
}

[data-theme="dark"] .bg-mode-toggle:hover {
    border-color: var(--theme-accent) !important;
}

/* --- Dark Background Mode --- */
html[data-bg="active"][data-theme="dark"] .container {
    background: rgba(15, 17, 23, 0.55) !important;
}

html[data-bg="active"][data-theme="dark"] .form_grid {
    background: rgba(26, 29, 40, 0.70) !important;
}

html[data-bg="active"][data-theme="dark"] header {
    background: rgba(26, 29, 40, 0.70) !important;
}

/* --- Dark Theme Scrollbar --- */
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--theme-text-muted);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--theme-text-secondary);
}

/* --- Loading Screen --- */
[data-theme="dark"] #loading {
    background-color: var(--theme-bg) !important;
}

/* --- Subtle Animations --- */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form_grid {
    animation: fade-in 0.5s ease-out;
}

header {
    animation: fade-in 0.4s ease-out;
}

.mobile_container {
    background: var(--theme-bg) !important;
    font-family: var(--theme-font) !important;
}

.mobile_fixed-header {
    background: linear-gradient(var(--theme-bg) 0%, var(--theme-bg) 87%, transparent 100%) !important;
    padding: 1.5rem 0 1.5rem !important;
}

.mobile_contacts > a > img {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

#mobile_reset {
    background: var(--theme-surface) !important;
    box-shadow: var(--theme-shadow-sm) !important;
    border: 1px solid var(--theme-border) !important;
}

.grey_text {
    font-family: var(--theme-font) !important;
    color: var(--theme-text-muted) !important;
}

.mobile_custom-button {
    background: var(--theme-bg) !important;
    border: 1.5px solid var(--theme-border) !important;
    border-radius: var(--theme-radius-md) !important;
    transition: var(--theme-transition) !important;
    box-shadow: var(--theme-shadow-sm);
}

.mobile_custom-button::after {
    background: var(--theme-accent) !important;
}

.mobile_custom-button.focused {
    background: var(--theme-error-bg) !important;
    border-color: var(--theme-error) !important;
}

.mobile_custom-button.focused .mobile_button-name {
    color: var(--theme-error) !important;
}

.mobile_custom-button.valid {
    background: var(--theme-accent-light) !important;
    border-color: var(--theme-accent) !important;
}

.mobile_custom-button.valid .mobile_button-name {
    color: var(--theme-accent) !important;
}

.mobile_button-name {
    font-family: var(--theme-font) !important;
    color: var(--theme-accent) !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.mobile_button-value {
    font-family: var(--theme-font) !important;
    color: var(--theme-text-muted) !important;
}

.mobile_button-value.filled {
    color: var(--theme-text-primary) !important;
}

/* --- Mobile Input --- */
.mobile_custom-input .label {
    font-family: var(--theme-font) !important;
    color: var(--theme-accent) !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.03em;
}

.mobile_custom-input input,
.mobile_custom-input textarea {
    font-family: var(--theme-font) !important;
    background: var(--theme-bg) !important;
    color: var(--theme-text-primary) !important;
    border: 1.5px solid var(--theme-border) !important;
    border-radius: var(--theme-radius-md) !important;
    transition: var(--theme-transition) !important;
    box-shadow: var(--theme-shadow-sm);
}

.mobile_custom-input input::placeholder {
    color: var(--theme-text-muted) !important;
}

.mobile_custom-input input:focus,
.mobile_custom-input textarea:focus {
    border-color: var(--theme-accent) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), var(--theme-shadow-sm) !important;
}

.mobile_custom-input input:focus,
.mobile_custom-input textarea:focus,
.mobile_custom-input input:not(:placeholder-shown),
.mobile_custom-input textarea:not(:placeholder-shown) {
    background: var(--theme-surface) !important;
}

.mobile_custom-input input.focused:invalid {
    background: var(--theme-error-bg) !important;
    border-color: var(--theme-error) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.mobile_custom-input input.focused:invalid + .label {
    color: var(--theme-error) !important;
}

/* --- Mobile Files --- */
#mobile_files_field {
    background: var(--theme-bg) !important;
    border: 1.5px solid var(--theme-border) !important;
    border-radius: var(--theme-radius-md) !important;
    font-family: var(--theme-font) !important;
    color: var(--theme-text-muted) !important;
    box-shadow: var(--theme-shadow-sm);
}

/* --- Mobile Toggle --- */
.mobile_toggle {
    font-family: var(--theme-font) !important;
    color: var(--theme-text-muted) !important;
}

.mobile_toggle_checked {
    color: #3A68B5 !important;
}

.mobile_slider {
    background: #3A68B5 !important;
    border-radius: 0.5rem !important;
}

.mobile_slider:before {
    background-color: var(--theme-surface) !important;
}

/* --- Mobile Header --- */
.mobile_header {
    font-family: var(--theme-font) !important;
    color: var(--theme-accent) !important;
    font-weight: 700 !important;
}

/* --- Mobile Modal --- */
.mobile_modal {
    background: rgba(250, 251, 253, 0.9) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

.mobile_modal_content {
    background: var(--theme-surface) !important;
    border-radius: var(--theme-radius-xl) !important;
    box-shadow: var(--theme-shadow-xl) !important;
    border: 1px solid var(--theme-border);
}

.mobile_modal_filter {
    font-family: var(--theme-font) !important;
    border-bottom-color: var(--theme-border) !important;
    color: var(--theme-text-primary) !important;
    background: transparent !important;
}

.mobile_modal_filter:focus {
    border-color: var(--theme-accent) !important;
}

.mobile_modal_filter::placeholder {
    color: var(--theme-text-muted) !important;
}

.mobile_alphabet_letter .mobile_letter {
    font-family: var(--theme-font) !important;
    color: var(--theme-accent) !important;
}

.mobile_alphabet_letter hr,
.mobile_modal_name hr {
    border-bottom-color: var(--theme-border) !important;
}

/* --- Mobile Ausstattung --- */
.mobile_aussttatung_list {
    background: var(--theme-bg) !important;
    border: 1.5px solid var(--theme-border) !important;
    border-top: none !important;
    border-radius: 0 0 var(--theme-radius-md) var(--theme-radius-md) !important;
}

.mobile_aussttatung_list li label {
    font-family: var(--theme-font) !important;
    background: var(--theme-accent-light) !important;
    color: var(--theme-accent) !important;
    border-radius: var(--theme-radius-sm) !important;
}

/* --- Mobile Submit --- */
.mobile_submit_btn {
    font-family: var(--theme-font) !important;
    background: #3A68B5 !important;
    border: none !important;
    border-radius: var(--theme-radius-md) !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    box-shadow: 0 2px 8px rgba(58, 104, 181, 0.3) !important;
    transition: var(--theme-transition) !important;
}

/* --- Mobile Scroll Arrow --- */
.mobile_scroll_arrow {
    filter: none !important;
}

/* --- Mobile Dark Theme --- */
[data-theme="dark"] .mobile_container {
    background: var(--theme-bg) !important;
}

[data-theme="dark"] .mobile_fixed-header {
    background: linear-gradient(var(--theme-bg) 0%, var(--theme-bg) 87%, transparent 100%) !important;
}

[data-theme="dark"] .mobile_contacts > a > img {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] #mobile_reset {
    background: var(--theme-surface) !important;
    box-shadow: var(--theme-shadow-sm) !important;
    border-color: var(--theme-border) !important;
}

[data-theme="dark"] .mobile_custom-button {
    background: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
}

[data-theme="dark"] .mobile_custom-button.focused {
    background: var(--theme-error-bg) !important;
    border-color: var(--theme-error) !important;
}

[data-theme="dark"] .mobile_custom-button.valid {
    background: var(--theme-accent-light) !important;
    border-color: rgba(59, 130, 246, 0.2) !important;
}

[data-theme="dark"] .mobile_button-name {
    color: var(--theme-accent) !important;
}

[data-theme="dark"] .mobile_button-value {
    color: var(--theme-text-muted) !important;
}

[data-theme="dark"] .mobile_button-value.filled {
    color: var(--theme-text-primary) !important;
}

[data-theme="dark"] .mobile_custom-input .label {
    color: var(--theme-accent) !important;
}

[data-theme="dark"] .mobile_custom-input input,
[data-theme="dark"] .mobile_custom-input textarea {
    background: var(--theme-surface) !important;
    color: var(--theme-text-primary) !important;
    border-color: var(--theme-border) !important;
}

[data-theme="dark"] .mobile_custom-input input::placeholder {
    color: var(--theme-text-muted) !important;
}

[data-theme="dark"] .mobile_custom-input input:focus,
[data-theme="dark"] .mobile_custom-input textarea:focus {
    border-color: var(--theme-accent) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), var(--theme-shadow-sm) !important;
}

[data-theme="dark"] .mobile_custom-input input:focus,
[data-theme="dark"] .mobile_custom-input textarea:focus,
[data-theme="dark"] .mobile_custom-input input:not(:placeholder-shown),
[data-theme="dark"] .mobile_custom-input textarea:not(:placeholder-shown) {
    background: var(--theme-bg) !important;
}

[data-theme="dark"] .mobile_custom-input input.focused:invalid {
    background: var(--theme-error-bg) !important;
    border-color: var(--theme-error) !important;
}

[data-theme="dark"] #mobile_files_field {
    background: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text-muted) !important;
}

[data-theme="dark"] .mobile_toggle {
    color: var(--theme-text-muted) !important;
}

[data-theme="dark"] .mobile_toggle_checked {
    color: #3A68B5 !important;
}

[data-theme="dark"] .mobile_slider {
    background: #3A68B5 !important;
}

[data-theme="dark"] .mobile_slider:before {
    background-color: var(--theme-bg) !important;
}

[data-theme="dark"] .mobile_header {
    color: var(--theme-accent) !important;
}

[data-theme="dark"] .mobile_modal {
    background: rgba(15, 17, 23, 0.9) !important;
}

[data-theme="dark"] .mobile_modal_content {
    background: var(--theme-surface) !important;
    box-shadow: var(--theme-shadow-xl) !important;
    border-color: var(--theme-border) !important;
}

[data-theme="dark"] .mobile_modal_filter {
    border-bottom-color: var(--theme-border) !important;
    color: var(--theme-text-primary) !important;
}

[data-theme="dark"] .mobile_modal_filter:focus {
    border-color: var(--theme-accent) !important;
}

[data-theme="dark"] .mobile_alphabet_letter .mobile_letter {
    color: var(--theme-accent) !important;
}

[data-theme="dark"] .mobile_aussttatung_list {
    background: var(--theme-bg) !important;
    border-color: var(--theme-border) !important;
}

[data-theme="dark"] .mobile_aussttatung_list li label {
    background: var(--theme-accent-light) !important;
    color: var(--theme-accent) !important;
}

/* --- Background Mode Mobile Dark --- */
html[data-bg="active"][data-theme="dark"] .mobile_container {
    background: rgba(15, 17, 23, 0.55) !important;
}

html[data-bg="active"][data-theme="dark"] .mobile_fixed-header {
    background: linear-gradient(rgba(15, 17, 23, 0.75) 0%, rgba(15, 17, 23, 0.75) 87%, transparent 100%) !important;
}

html[data-bg="active"] .mobile_container {
    background: rgba(250, 251, 253, 0.45) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

html[data-bg="active"] .mobile_fixed-header {
    background: linear-gradient(rgba(250, 251, 253, 0.75) 0%, rgba(250, 251, 253, 0.75) 87%, transparent 100%) !important;
}

/* --- Mobile Scroll Info Bar --- */
#mobile_scroll-info {
    font-family: var(--theme-font) !important;
    background: var(--theme-accent) !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.03em;
    border-radius: 0 !important;
    box-shadow: 0 -2px 12px rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] #mobile_scroll-info {
    background: var(--theme-accent) !important;
    box-shadow: 0 -2px 12px rgba(59, 130, 246, 0.3);
}

/* --- Mobile Submit Button --- */
#mobile_submit {
    font-family: var(--theme-font) !important;
    background: #3A68B5 !important;
    border-radius: var(--theme-radius-md) !important;
    font-weight: 600 !important;
    font-size: 1.3rem !important;
    letter-spacing: 0.05em !important;
    box-shadow: 0 2px 8px rgba(58, 104, 181, 0.3) !important;
}

[data-theme="dark"] #mobile_submit {
    background: #3A68B5 !important;
    color: #FFFFFF !important;
}

/* --- Mobile Ausstattung Button Name --- */
.mobile_aussttatung_button-name {
    font-family: var(--theme-font) !important;
    color: var(--theme-accent) !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.03em;
}

[data-theme="dark"] .mobile_aussttatung_button-name {
    color: var(--theme-accent) !important;
}

/* --- Mobile Modal Buttons --- */
.mobile_modal_buttons button,
.mobile_modal_buttons input {
    font-family: var(--theme-font) !important;
}

[data-theme="dark"] .mobile_modal_buttons button,
[data-theme="dark"] .mobile_modal_buttons input {
    color: var(--theme-accent) !important;
}

/* --- Mobile Radio Variant --- */
.mobile_radio_variant label {
    font-family: var(--theme-font) !important;
}

[data-theme="dark"] .mobile_radio_variant label {
    color: var(--theme-text-secondary) !important;
}

[data-theme="dark"] .mobile_radio_variant input:checked + label {
    color: var(--theme-accent) !important;
}

/* --- Mobile Custom Checkbox --- */
.mobile_custom_checkbox {
    border-radius: var(--theme-radius-sm) !important;
}

[data-theme="dark"] .mobile_custom_checkbox {
    background: var(--theme-accent-light) !important;
}

/* --- Mobile Modal Name --- */
.mobile_modal_name h3 {
    font-family: var(--theme-font) !important;
}

[data-theme="dark"] .mobile_modal_name h3 {
    color: var(--theme-accent) !important;
}

/* --- Unbekannte --- */
#unbekannte {
    font-family: var(--theme-font) !important;
}

/* --- Mobile Disclaimer --- */
.mobile_disclaimer {
    font-family: var(--theme-font) !important;
    color: var(--theme-text-muted) !important;
}

[data-theme="dark"] .mobile_disclaimer {
    color: var(--theme-text-muted) !important;
}
