html {
    background: #f6f4f0;
}

html[data-theme="dark"] {
    background: #101010;
}

body {
    color: #171717;
    background: #f6f4f0;
}

html[data-theme="dark"] body {
    color: #f4f4f4;
    background: #101010;
}

main {
    color: inherit;
}

.navbar > .container {
    gap: 0.6rem;
}

.navbar-toggler {
    order: 4;
}

.navbar-collapse {
    order: 5;
}

.theme-toggle {
    order: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 40px;
    margin-left: auto;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 6px;
    background: #151515;
    color: #fff;
    font-weight: 600;
    line-height: 1;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus {
    background: #000;
    color: #fff;
    border-color: #000;
}

html[data-theme="dark"] .theme-toggle {
    border-color: rgba(255, 255, 255, 0.35);
    background: #fff;
    color: #151515;
}

html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .theme-toggle:focus {
    background: #f2f2f2;
    color: #000;
    border-color: #fff;
}

.footer {
    color: #171717 !important;
    background: #f6f4f0;
    border-color: rgba(0, 0, 0, 0.14) !important;
}

.footer a {
    color: #171717 !important;
}

html[data-theme="dark"] .footer {
    color: #fff !important;
    background: #101010;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .footer a {
    color: #fff !important;
}

.table {
    --bs-table-color: #171717;
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(0, 0, 0, 0.18);
    color: #171717;
}

.table th {
    color: #171717;
}

html[data-theme="dark"] .table {
    --bs-table-color: #f4f4f4;
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(255, 255, 255, 0.38);
    --bs-table-striped-color: #f4f4f4;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.055);
    color: #f4f4f4;
}

html[data-theme="dark"] .table th {
    color: #fff;
}

html[data-theme="dark"] .table-light {
    --bs-table-color: #f4f4f4;
    --bs-table-bg: #202020;
    --bs-table-border-color: rgba(255, 255, 255, 0.28);
}

html[data-theme="dark"] .table-success {
    --bs-table-color: #123021;
    --bs-table-bg: #d1e7dd;
    --bs-table-border-color: #badbcc;
    --bs-table-striped-color: #123021;
    --bs-table-striped-bg: #c7dbd2;
}

html[data-theme="dark"] .table-warning {
    --bs-table-color: #332701;
    --bs-table-bg: #fff3cd;
    --bs-table-border-color: #ffecb5;
    --bs-table-striped-color: #332701;
    --bs-table-striped-bg: #f2e7c3;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] #appointment-details,
html[data-theme="dark"] .bg-light {
    color: #f4f4f4 !important;
    background-color: #1b1b1b !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .form-text {
    color: rgba(255, 255, 255, 0.68) !important;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    color: #f4f4f4;
    background-color: #1f1f1f;
    border-color: rgba(255, 255, 255, 0.3);
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
    color: #fff;
    background-color: #222;
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 0 0 0.18rem rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .form-control::placeholder {
    color: rgba(255, 255, 255, 0.56);
}

html[data-theme="dark"] .fc {
    color: #f4f4f4;
}

html[data-theme="dark"] .fc-theme-standard td,
html[data-theme="dark"] .fc-theme-standard th,
html[data-theme="dark"] .fc-theme-standard .fc-scrollgrid {
    border-color: rgba(255, 255, 255, 0.24);
}

html[data-theme="dark"] .fc .fc-button {
    background-color: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.28);
}

html[data-theme="dark"] .fc .fc-button-primary:not(:disabled).fc-button-active,
html[data-theme="dark"] .fc .fc-button-primary:not(:disabled):active {
    background-color: #fff;
    color: #111;
    border-color: #fff;
}

@media (min-width: 576px) {
    .navbar-collapse {
        order: 3;
    }

    .theme-toggle {
        order: 4;
        margin-left: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .theme-toggle-text {
        display: none;
    }

    .theme-toggle {
        width: 40px;
        padding-inline: 0;
    }
}
