/* Additional dark mode fixes - Load this AFTER dark-mode.css */

/* Force cards to be dark with maximum specificity */
[data-theme="dark"] body .card,
[data-theme="dark"] body .container .card,
[data-theme="dark"] body main .card,
[data-theme="dark"] body .row .card,
[data-theme="dark"] body .col-md-4 .card,
[data-theme="dark"] body .col-md-8 .card,
[data-theme="dark"] body .col-md-6 .card {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] body .card-body,
[data-theme="dark"] body .container .card-body,
[data-theme="dark"] body main .card-body,
[data-theme="dark"] body .row .card-body,
[data-theme="dark"] body .col-md-4 .card-body,
[data-theme="dark"] body .col-md-8 .card-body,
[data-theme="dark"] body .col-md-6 .card-body {
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] body .card-title,
[data-theme="dark"] body .card h5 {
    color: #e0e0e0 !important;
}

[data-theme="dark"] body .card p,
[data-theme="dark"] body .card strong {
    color: #e0e0e0 !important;
}

/* Force all form inputs to be dark - Maximum specificity - OVERRIDE BOOTSTRAP */
html[data-theme="dark"] input,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="time"],
html[data-theme="dark"] input[type="datetime-local"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] input.form-control,
html[data-theme="dark"] textarea.form-control,
html[data-theme="dark"] select.form-select,
html[data-theme="dark"] select.form-control,
html[data-theme="dark"] body input,
html[data-theme="dark"] body input[type="text"],
html[data-theme="dark"] body input[type="email"],
html[data-theme="dark"] body input[type="password"],
html[data-theme="dark"] body input[type="number"],
html[data-theme="dark"] body input[type="tel"],
html[data-theme="dark"] body input[type="url"],
html[data-theme="dark"] body input[type="search"],
html[data-theme="dark"] body input[type="date"],
html[data-theme="dark"] body input[type="time"],
html[data-theme="dark"] body textarea,
html[data-theme="dark"] body select,
html[data-theme="dark"] body .form-control,
html[data-theme="dark"] body .form-select,
html[data-theme="dark"] body input.form-control,
html[data-theme="dark"] body textarea.form-control,
html[data-theme="dark"] body select.form-select,
html[data-theme="dark"] .modal input,
html[data-theme="dark"] .modal textarea,
html[data-theme="dark"] .modal select,
html[data-theme="dark"] .modal .form-control,
html[data-theme="dark"] .modal .form-select,
html[data-theme="dark"] .card input,
html[data-theme="dark"] .card textarea,
html[data-theme="dark"] .card select,
html[data-theme="dark"] .card .form-control,
html[data-theme="dark"] .card .form-select,
html[data-theme="dark"] .container input,
html[data-theme="dark"] .container textarea,
html[data-theme="dark"] .container select,
html[data-theme="dark"] .container .form-control,
html[data-theme="dark"] .container .form-select {
    background-color: #3a3a3a !important;
    background: #3a3a3a !important;
    border-color: #505050 !important;
    color: #e0e0e0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] body input::placeholder,
html[data-theme="dark"] body textarea::placeholder,
html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] body .form-control::placeholder {
    color: #b0b0b0 !important;
    opacity: 1 !important;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] body input:focus,
html[data-theme="dark"] body textarea:focus,
html[data-theme="dark"] body select:focus,
html[data-theme="dark"] body .form-control:focus,
html[data-theme="dark"] body .form-select:focus,
html[data-theme="dark"] .modal input:focus,
html[data-theme="dark"] .modal textarea:focus,
html[data-theme="dark"] .modal select:focus,
html[data-theme="dark"] .card input:focus,
html[data-theme="dark"] .card textarea:focus,
html[data-theme="dark"] .card select:focus {
    background-color: #3a3a3a !important;
    background: #3a3a3a !important;
    border-color: #007bff !important;
    color: #e0e0e0 !important;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25) !important;
    outline: none !important;
}
