/* Add a fixed button to the bottom left */
.theme-toggle-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

/* Dark mode overrides for Bootstrap elements */
body.dark-mode {
    background-color: #212529 !important;
    color: #f8f9fa !important;
}

body.dark-mode .card {
    background-color: #343a40;
    color: #f8f9fa;
    border-color: #495057;
}

body.dark-mode .card-header {
    border-bottom-color: #495057;
}

body.dark-mode .form-control {
    background-color: #495057;
    color: #f8f9fa;
    border-color: #6c757d;
}

body.dark-mode .form-control::placeholder {
    color: #adb5bd;
}

body.dark-mode .table {
    color: #f8f9fa;
}

body.dark-mode .table td,
body.dark-mode .table th {
    border-color: #495057;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .bg-white {
    background-color: #343a40 !important;
}

body.dark-mode .bg-light {
    background-color: #212529 !important;
}

body.dark-mode .text-dark {
    color: #f8f9fa !important;
}

.c-pointer {
    cursor: pointer;
}

.profile-picture {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 2px solid #ddd;
}

/* Mobile-Optimierung */
body { padding-bottom: env(safe-area-inset-bottom); }
.theme-toggle-btn { bottom: calc(20px + env(safe-area-inset-bottom)); left: calc(20px + env(safe-area-inset-left)); }
@media (max-width: 576px) {
    .btn, .form-control, .nav-link { min-height: 44px; }
    .table-responsive-auto { overflow-x: auto; }
    table.table { display: block; overflow-x: auto; }
}
@media (display-mode: standalone) {
    body { overscroll-behavior-y: contain; }
}

/* OAuth 2.0 Consent & Client Portal styles */
.oauth-app-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background-color: #0d6efd;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-mode .form-select {
    background-color: #495057;
    color: #f8f9fa;
    border-color: #6c757d;
}

body.dark-mode .list-group-item {
    background-color: #2b3035;
    color: #f8f9fa;
    border-color: #495057;
}

body.dark-mode .oauth-account-banner {
    background-color: #2b3035 !important;
    color: #f8f9fa;
}

body.dark-mode .oauth-client-item {
    border-color: #495057 !important;
}

body.dark-mode .text-muted {
    color: #adb5bd !important;
}

