﻿html, body {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

body.sidebar-open {
    overflow: hidden;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1040;
}

body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background-color: #212529;
    color: #f8f9fa;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    gap: 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1050;
}

body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.05rem;
}

.sidebar-brand-link i {
    font-size: 1.4rem;
}

.sidebar-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0.35rem;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.sidebar-theme {
    margin-bottom: 1rem;
}

.sidebar-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: rgba(248, 249, 250, 0.75);
    font-size: 0.9rem;
}

.sidebar-switch span:first-child {
    line-height: 1.3;
}

.sidebar-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sidebar-switch-slider {
    position: relative;
    display: inline-block;
    width: 2.4rem;
    height: 1.3rem;
    background-color: rgba(248, 249, 250, 0.3);
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

.sidebar-switch-slider::before {
    content: '';
    position: absolute;
    top: 0.16rem;
    left: 0.18rem;
    width: 0.98rem;
    height: 0.98rem;
    border-radius: 50%;
    background-color: #212529;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.sidebar-switch input:checked + .sidebar-switch-slider {
    background-color: #0d6efd;
}

.sidebar-switch input:checked + .sidebar-switch-slider::before {
    transform: translateX(1.05rem);
    background-color: #ffffff;
}

.sidebar-fab {
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    border: none;
    background-color: #212529;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    z-index: 1060;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sidebar-fab:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.35);
    outline-offset: 2px;
}

body.sidebar-open .sidebar-fab {
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
}

.sidebar-section + .sidebar-section {
    margin-top: 1.5rem;
}

.sidebar-section-title {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: rgba(248, 249, 250, 0.6);
    margin-bottom: 0.5rem;
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-item + .sidebar-item {
    margin-top: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.6rem;
    text-decoration: none;
    color: rgba(248, 249, 250, 0.75);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background-color: rgba(248, 249, 250, 0.12);
    color: #ffffff;
}

.sidebar-link i {
    font-size: 1.1rem;
}

.sidebar-link.is-active {
    background-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.sidebar-footer {
    border-top: 1px solid rgba(248, 249, 250, 0.12);
    padding-top: 1.25rem;
}

.sidebar-profile-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.sidebar-profile-title i {
    font-size: 1.3rem;
}

.sidebar-link.text-danger {
    color: #f07178;
}

.sidebar-link.text-danger:hover {
    color: #ffccd2;
}

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: 0;
    background-color: #f8f9fa;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 3.5rem 1rem 2rem;
}

main {
    flex: 1;
}

.container {
    max-width: 85% !important;
}

@media (max-width: 768px) {
    .container {
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

footer .bcanner {
    background-color: #aa1a8d;
    text-align: center;
    padding-top: 15px;
    width: 100%;
    height: 65px;
}

footer .bcanner img {
    display: inline-block;
    padding-bottom: 5px;
}

body.theme-dark {
    background-color: #12171f;
    color: #f1f3f5;
    --bs-body-bg: #12171f;
    --bs-body-color: #f1f3f5;
    --bs-heading-color: #ffffff;
    --bs-border-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .app-content {
    background-color: #12171f;
    color: inherit;
}

body.theme-dark .app-main {
    background-color: transparent;
    color: inherit;
}

body.theme-dark main,
body.theme-dark .container {
    color: inherit;
}

body.theme-dark .sidebar {
    background-color: #0f141c;
    color: #f1f3f5;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

body.theme-dark .sidebar-section-title {
    color: rgba(241, 243, 245, 0.5);
}

body.theme-dark .sidebar-link {
    color: rgba(241, 243, 245, 0.7);
}

body.theme-dark .sidebar-link:hover,
body.theme-dark .sidebar-link:focus {
    background-color: rgba(13, 110, 253, 0.18);
    color: #ffffff;
}

body.theme-dark .sidebar-link.is-active {
    background-color: rgba(13, 110, 253, 0.35);
    color: #ffffff;
}

body.theme-dark .sidebar-profile-title {
    color: #ffffff;
}

body.theme-dark .sidebar-link.text-danger {
    color: #ff8a8a;
}

body.theme-dark .sidebar-link.text-danger:hover {
    color: #ffe7e7;
}

body.theme-dark .sidebar-switch {
    color: rgba(241, 243, 245, 0.75);
}

body.theme-dark .sidebar-switch-slider {
    background-color: rgba(13, 110, 253, 0.35);
}

body.theme-dark .sidebar-switch-slider::before {
    background-color: #0f141c;
}

body.theme-dark .sidebar-fab {
    background-color: #0f141c;
    color: #f1f3f5;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.55);
}

body.theme-dark .bcanner {
    background-color: #7a1370;
}

body.theme-dark .card,
body.theme-dark .modal-content,
body.theme-dark .dropdown-menu {
    background-color: #18202a;
    color: #f1f3f5;
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .dropdown-item {
    color: #f1f3f5;
}

body.theme-dark .dropdown-item:hover,
body.theme-dark .dropdown-item:focus {
    color: #ffffff;
    background-color: rgba(13, 110, 253, 0.3);
}

body.theme-dark .form-control,
body.theme-dark .form-select {
    background-color: #121923;
    color: #f1f3f5;
    border-color: rgba(255, 255, 255, 0.16);
}

body.theme-dark .form-control::placeholder {
    color: rgba(241, 243, 245, 0.5);
}

body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

body.theme-dark .btn-close {
    filter: invert(1);
}

body.theme-dark .alert {
    color: #f1f3f5;
}

body.theme-dark .table {
    --bs-table-bg: #161f2a;
    --bs-table-striped-bg: #1c2734;
    --bs-table-striped-color: #f1f3f5;
    --bs-table-hover-bg: #22303f;
    --bs-table-hover-color: #ffffff;
    --bs-table-color: #f1f3f5;
    --bs-table-border-color: rgba(255, 255, 255, 0.12);
    color: #f1f3f5;
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .table thead {
    background-color: #1f2835;
    color: #ffffff;
}

body.theme-dark .table > :not(caption) > * > * {
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: var(--bs-table-striped-bg);
    color: var(--bs-table-striped-color);
}

body.theme-dark .table-hover > tbody > tr:hover > * {
    background-color: var(--bs-table-hover-bg);
    color: var(--bs-table-hover-color);
}

body.theme-dark .text-dark,
body.theme-dark .text-body,
body.theme-dark .text-black,
body.theme-dark .table .text-dark,
body.theme-dark .table .text-body,
body.theme-dark .table .text-black,
body.theme-dark .nav-link.text-dark {
    color: #f1f3f5 !important;
}

body.theme-dark .text-muted,
body.theme-dark .table .text-muted {
    color: rgba(241, 243, 245, 0.6) !important;
}

body.theme-dark .bg-white,
body.theme-dark .table .bg-white,
body.theme-dark .bg-light,
body.theme-dark .table .bg-light {
    background-color: #1f2835 !important;
    color: #f1f3f5 !important;
}

body.theme-dark .table .bg-secondary {
    background-color: #273344 !important;
    color: #ffffff !important;
}

body.theme-dark .table .badge.bg-light,
body.theme-dark .badge.bg-light {
    background-color: rgba(255, 255, 255, 0.18) !important;
    color: #f1f3f5 !important;
}

body.theme-dark .table .badge.bg-dark,
body.theme-dark .badge.bg-dark {
    background-color: #0f141c !important;
    color: #f1f3f5 !important;
}

body.theme-dark .table-secondary,
body.theme-dark .table .table-secondary {
    background-color: #273344 !important;
    color: #f1f3f5 !important;
}

body.theme-dark .table-secondary > th,
body.theme-dark .table-secondary > td,
body.theme-dark .table .table-secondary > th,
body.theme-dark .table .table-secondary > td {
    color: #f1f3f5 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark h5,
body.theme-dark h6 {
    color: #ffffff;
}

body.theme-dark a {
    color: #91b8ff;
}

body.theme-dark a:hover,
body.theme-dark a:focus {
    color: #c7dcff;
}

@media (max-width: 991px) {
    .bcanner {
        display: none !important;
    }
}

@media (min-width: 992px) {
    body.sidebar-open .sidebar-backdrop {
        opacity: 0;
        visibility: hidden;
    }

    .sidebar {
        transform: none;
        box-shadow: none;
    }

    .app-content {
        margin-left: 260px;
    }

    .app-main {
        padding: 2rem 2.5rem 2.5rem;
    }

    .sidebar-fab {
        display: none;
    }
}







body.theme-dark .btn-success,
body.theme-dark .btn-success:focus,
body.theme-dark .btn-success:hover {
    color: #ffffff !important;
}
