/* Site-wide dark mode + shared utilities (loaded from includes/header.php) */

.dark-mode body {
    background: #111 !important;
    color: #eee !important;
}

.dark-mode .card,
.dark-mode .card-body {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #eee !important;
}

.dark-mode .navbar,
.dark-mode footer {
    background: #000 !important;
    color: #fff !important;
}

.dark-mode .navbar-light .navbar-brand,
.dark-mode .navbar-light .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
}

.dark-mode .navbar-light .nav-link:hover,
.dark-mode .navbar-light .navbar-brand:hover {
    color: #fff !important;
}

.dark-mode .bg-light,
.dark-mode .bg-white {
    background-color: #1a1a1a !important;
    color: #eee !important;
}

.dark-mode .text-muted {
    color: #9ca3af !important;
}

.dark-mode .border,
.dark-mode .card {
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.dark-mode .list-group-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: #eee;
}

.dark-mode .breadcrumb {
    background: rgba(255, 255, 255, 0.06) !important;
}

.dark-mode .breadcrumb-item,
.dark-mode .breadcrumb-item a {
    color: #cbd5e1 !important;
}

.dark-mode .breadcrumb-item.active {
    color: #e5e7eb !important;
}

.dark-mode .alert {
    border-color: rgba(255, 255, 255, 0.15);
}

.dark-mode .form-control,
.dark-mode .form-select {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.15);
    color: #eee;
}

.dark-mode .form-control:focus,
.dark-mode .form-select:focus {
    background: #111827;
    color: #fff;
}

.dark-mode .modal-content {
    background: #1a1a1a;
    color: #eee;
    border-color: rgba(255, 255, 255, 0.12);
}

.dark-mode .table {
    --bs-table-bg: transparent;
    color: #eee;
}

.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.04);
}

.dark-mode section.py-5,
.dark-mode .py-5.bg-light {
    background-color: #151515 !important;
}

.dark-mode .ratio iframe {
    filter: brightness(0.85) contrast(1.05);
}

/* Footer theme toggle (when navbar has no button) */
#themeToggleFooter {
    position: fixed;
    z-index: 1080;
    bottom: 1rem;
    left: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    font-size: 1.1rem;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

html[dir="ltr"] #themeToggleFooter {
    left: auto;
    right: 1rem;
}

.dark-mode #themeToggleFooter {
    background: rgba(250, 204, 21, 0.15);
    border-color: rgba(250, 204, 21, 0.35);
}
