:root,
[data-bs-theme=light] {
    --bs-primary-rgb: 131, 45, 112;
    --bs-secondary-rgb: 99, 39, 86;
    --bs-success-rgb: 131, 45, 112;
    --bs-link-color-rgb: 131, 45, 112;

    .btn-outline-primary {
        --bs-btn-color: #832D70;
        --bs-btn-border-color: #832D70;
        --bs-btn-hover-bg: #832D70;
        --bs-btn-hover-border-color: #832D70;
        --bs-btn-active-bg: #832D70;
        --bs-btn-active-border-color: #832D70;
        --bs-btn-disabled-color: #832D70;
        --bs-btn-disabled-border-color: #832D70;
    }

    body {
        background-color: #F5F5F5;
    }

    .bg-primary {
        background-color: #832D70 !important;
    }

    .btn-primary {
        --bs-btn-bg: #832D70;
        --bs-btn-border-color: #832D70;
        --bs-btn-hover-bg: #5e1f50;
        --bs-btn-hover-border-color: #5e1f50;
        --bs-btn-active-bg: #5e1f50;
        --bs-btn-active-border-color: #5e1f50;
        --bs-btn-disabled-bg: #832D70;
        --bs-btn-disabled-border-color: #832D70;
        --bs-link-color: #832D70 !important;
        --bs-link-hover-color: #5e1f50 !important;
    }

    .pagination {
        --bs-pagination-color: #832D70;
        --bs-pagination-hover-color: #5e1f50;
        --bs-pagination-focus-color: #5e1f50;
        --bs-pagination-active-bg: #832D70;
        --bs-pagination-active-border-color: #832D70;
    }
}

.announcement-list .list-group-item:nth-child(odd) {
    background-color: #f8f9fa;
}

.announcement-list .list-group-item:nth-child(even) {
    background-color: #ffffff;
}

.announcement-list .list-group-item {
    border: none;
    padding: 12px 15px;
}

/* Header */
.has-search .form-control {
    padding-left: 2.375rem;
    color: #9F9999;
}

.has-search .form-control-feedback {
    position: absolute;
    z-index: 2;
    display: block;
    width: 2.375rem;
    height: 2.375rem;
    line-height: 2.375rem;
    text-align: center;
    pointer-events: none;
    color: #9F9999;
}

button.profile-btn,
button.bell-icon {
    border: none;
    background: none;
}

.bell-icon .badge-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #dc3545;
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

@media (max-width: 768px) {
    header .row {
        flex-wrap: wrap;
    }

    .has-search {
        margin-top: 15px;
    }


}

@media (max-width: 576px) {
    header {
        padding: 15px 10px;
    }

    h1.h3 {
        font-size: 1.25rem;
    }

    .text-muted {
        font-size: 0.875rem;
    }

    .profile-img {
        width: 32px;
        height: 32px;
    }

    .has-search .form-control {
        font-size: 0.875rem;
    }
}

.modal-content {
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: none;
}

.notification-item {
    border-bottom: 1px solid #EDF2F6;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-box {
    height: 60px;
}

.label {
    font-weight: 600;
    margin-bottom: 4px;
}

.modal-dialog.modal-dialog-scrollable {
    height: 80vh;
    position: fixed;
    top: 60px;
    right: 90px;
    transform: translateY(-50%);
    width: auto;
    max-width: 400px;
    margin: 0;
}

.modal-body {
    padding: 0px;
    background-color: #f8f9fa;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5) !important;
    width: 100%;
    height: 100%;
}

.modal-dialog {
    display: flex;
    justify-content: center;
}

@media (max-width: 576px) {
    div#announcementModal {
        padding-left: 30px;
        padding-right: 30px !important;
    }
}

/* Sidebar */
#sidebar {
    width: 100px;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    z-index: 1000;
}

@media (max-width: 524px) {
    #sidebar {
        height: 123vh;
    }
}

#sidebar .sidebar-text {
    opacity: 0;
    visibility: hidden;
    width: 0;
}

#sidebar .nav {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 0;
    margin: 0;
    list-style: none;
    align-items: center;
    justify-content: center;
    height: 100%;
}

#sidebar .nav-link {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 8px;
    color: #AEAEAE;
    text-decoration: none;
    transition: color 0.3s ease;
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

#sidebar .nav-link i {
    font-size: 1.5rem;
    color: inherit;
    transition: color 0.3s ease, transform 0.3s ease;
}

#sidebar .nav-link::before {
    content: '';
    position: absolute;
    width: 45px;
    height: 45px;
    background-color: #832D70;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease, background-color 0.3s ease;
    z-index: 0;
}

#sidebar .nav-link:hover::before,
#sidebar .nav-link.active {
    transform: scale(1);
}

#sidebar .nav-link:hover i,
#sidebar .nav-link.active i {
    color: white;
    z-index: 1;
}

/* Dashboard Page */
.svg-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 20px;
}

.folder-card {
    text-align: start;
    position: relative;
    flex: 1;
    max-width: 300px;
}

.folder-content {
    position: absolute;
    bottom: 20px;
    left: 24px;
    right: 0;
    padding: 10px;
    color: white;
}

.folder-content i {
    font-size: 24px;
    color: white;
}

.folder-content h4 {
    font-size: 18px;
    margin: 0;
}

.folder-content p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

svg {
    width: 200px;
    height: 150px;
}

@media (min-width: 768px) {
    .folder-content i {
        font-size: 32px;
    }

    .folder-content p {
        font-size: 14px;
    }

    .folder-content h4 {
        font-size: 20px;
    }

    svg {
        width: 210px;
        height: 180px;
    }
}

@media (min-width: 1024px) {
    .folder-content {
        left: 12px;
        bottom: 36px;
    }

    .folder-content i {
        font-size: 32px;
    }

    .folder-content p {
        font-size: 12px;
    }

    .folder-content h4 {
        font-size: 16px;
    }

    svg {
        width: 175px;
        height: 201px;
    }
}

@media (min-width: 1400px) {
    .folder-content {
        bottom: 20px;
        left: 24px;
    }

    .folder-content i {
        font-size: 32px;
    }

    .folder-content p {
        font-size: 16px;
    }

    .folder-content h4 {
        font-size: 24px;
    }

    svg {
        width: 258px;
        height: 201px;
    }
}

@media (max-width: 1023px) {
    .right-column {
        background-color: #F5F5F5;
    }
}

.invoice-section {
    .invoice-container {
        background-color: white;
        border-radius: 12px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

        .invoice-title {
            font-size: 20px;
            font-weight: 600;
        }

        .invoice-table {
            margin: 0;
            border-collapse: separate;
            border-spacing: 0 10px;
            width: 100%;

            tbody {
                border-style: hidden;
            }

            tbody tr {
                border-bottom: 1px solid #EDF2F6;

                &:last-child {
                    border-bottom: transparent;
                }
            }

            .badge {
                font-size: 13px;
                padding: 4px 10px;
                border-radius: 8px;
                display: inline-block;
                font-weight: 500;
                text-align: center;
                white-space: nowrap;
                border: 1px solid transparent;
                /* Default border to avoid layout shifting */
            }

        }
    }

    .table-light-color th {
        color: #AEAEAE;
    }
}

.third-section-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;

    .card-body {
        .table {
            border-collapse: separate;
            border-spacing: 0 10px;

            thead {
                tr {
                    th {
                        color: #AEAEAE;
                    }
                }

            }
        }
    }
}

.event-type {
    color: #832D70 !important;
    background-color: #F3EAF1 !important;
    border-radius: 60px !important;
}

.custom-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background-size: cover;

    .card-body {
        position: relative;
        z-index: 1;
    }
}

.btn-warning {
    background-color: #FC9A3A;
    border-radius: 8px;
}

.flatpickr-calendar.animate.inline {
    width: 100% !important;
    box-shadow: none;
}

span.flatpickr-prev-month {
    display: none;
}

span.flatpickr-next-month {
    display: none;
}

.current-date {
    font-size: 14px;
    color: #b0b0b0;
    margin-bottom: 5px;
}

.flatpickr-current-month {
    display: flex ! important;
    justify-content: space-between;
    align-items: center;
}

.flatpickr-monthDropdown-months {
    margin-right: auto;
    /* Push it to the left */
}

.flatpickr-current-month {
    left: 0 !important;
    width: 100% !important;
}

.flatpickr-rContainer {
    width: 100% !important;
}

.flatpickr-days {
    width: 100% !important;
}

.dayContainer {
    min-width: 100% !important;
    max-width: 100% !important;
}

span.flatpickr-day.selected {
    background-color: #FC9A3A;
    border-color: black;
    border-radius: 0;
}

span.flatpickr-day.selected:hover {
    background-color: #FC9A3A;
}

span.flatpickr-day {
    display: flex;
    align-items: center;
    max-width: none !important;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.today-label {
    font-size: 18px;
    font-weight: 600;
}

.arrows {
    display: flex;
    gap: 10px;
}

.arrow {
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
}

.arrow:hover {
    background: #333;
}

.calendar {
    margin-top: 10px;
}

.flatpickr-day {
    transition: background-color 0.2s;
}

.flatpickr-day:hover {
    background-color: #f0f0f0;
    border-radius: 0;
}

.flatpickr-day.today {
    font-weight: bold;
    color: #000;
}

.timeline-line {
    width: 2px;
    height: 100%;
    background-color: #FC9A3A;
    position: absolute;
    top: 0;
    left: 20px;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-indicator {
    width: 16px;
    height: 16px;
    background-color: #FC9A3A;
    border: 3px solid white;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

.start-indicator {
    background-color: white;
    border: 3px solid #FC9A3A;
}

.start-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: #FC9A3A;
    border-radius: 50%;
}

.participants img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-left: -8px;
    border: 2px solid white;
}

.card-title {
    font-size: 18px;
    font-weight: 500;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideInRight 0.5s ease-out;
}

.user-bookings-section {
    padding: 20px;
    background-color: #F3EAF1;
    border-radius: 10px;
}

.user-booking-card {
    transition: all 0.3s ease-in-out;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    background: #ffffff;
}

.user-booking-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
}

.user-booking-title {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-booking-title i {
    font-size: 1.5rem;
}

.user-booking-detail {
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 5px;
}

.user-booking-badge {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
}

/* settings page */
.nav-tabs .nav-link {
    color: #222831;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    background-color: #F3EAF1;
    color: #832D70;
    border-radius: 8px;
}

.form-check-input:checked {
    background-color: #832D70 !important;
    border-color: #832D70 !important;
}

.form-check-input {
    border-color: #832D70 !important;
    background-color: #F3EAF1 !important;
}

.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 .25rem #832d701c;
}

.nav-link:hover {
    border: none;
}

.nav-tabs {
    --bs-nav-tabs-border-width: initial;
    --bs-nav-tabs-border-color: initial;
    --bs-nav-tabs-border-radius: initial;
    --bs-nav-tabs-link-hover-border-color: initial;
    --bs-nav-tabs-link-active-color: initial;
    --bs-nav-tabs-link-active-bg: initial;
    --bs-nav-tabs-link-active-border-color: initial;
    --border-bottom: initial;
}

.badge-custom {
    color: #832D70 !important;
    background-color: #F3EAF1 !important;
    border-radius: 60px !important;
    border: 1px solid #832D70 !important;
}

.bg-info {
    color: #0095FF !important;
    background-color: #F0F9FF !important;
    border-radius: 60px !important;
    border: 1px solid #0095FF !important;
}

.bg-success {
    color: #00E58F !important;
    background-color: #F0FDF4 !important;
    border-radius: 60px !important;
    border: 1px solid #00E58F !important;
}