/* Keep auth pages readable in dark mode */
html[data-theme="dark"] body {
    background-color: #0f172a !important;
    color: #e5e7eb;
}

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

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

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

html[data-theme="dark"] .form-control {
    background-color: #0b1220;
    border-color: #334155;
    color: #f8fafc;
}

html[data-theme="dark"] .form-control:focus {
    background-color: #0b1220;
    border-color: var(--bs-primary);
    color: #ffffff;
}

html[data-theme="dark"] .form-control::placeholder {
    color: #94a3b8;
}

html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-control[readonly] {
    background-color: #111827;
    color: #cbd5e1;
}

html[data-theme="dark"] .form-floating > label,
html[data-theme="dark"] .form-check-label,
html[data-theme="dark"] .form-label {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .form-floating > .form-control:focus ~ label,
html[data-theme="dark"] .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #93c5fd !important;
}

html[data-theme="dark"] .modal-content {
    background-color: #111827;
    color: #e5e7eb;
    border-color: #334155;
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
    border-color: #334155;
}

html[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(1);
}

html[data-theme="dark"] a:not(.btn) {
    color: #93c5fd;
}
