/* Shared Dashboard Styles */
*,
::after,
::before {
    box-sizing: border-box;
}

body {
    overflow: auto;
    background-color: rgba(248, 247, 247, 1);
}

/* Sidebar Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #b7924f, #d4af37);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #d4af37, #b7924f);
}

/* Navbar Utilities */
.mw-95 {
    max-width: 95%;
}

/* Sidebar Logo - Always Visible */
.sidebar .logo {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background-color: #fff;
    box-shadow: 0px 14px 10px rgba(8, 15, 52, 0.06);
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 10000;
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}

.sidebar .logo img {
    max-width: 152px;
    height: auto;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 0.8rem;
}

.sidebar ul li a {
    color: rgba(39, 58, 65, 1);
    text-decoration: none;
    font-size: 16px;
    padding: 0.7rem;
}

.sidebar ul li.active a {
    color: #b7924f !important;
    font-weight: bold;
}

.sidebar ul li a:hover {
    color: #b7924f;
}

.sidebar .nav-link.active {
    color: #b7924f;
}

.sidebar .icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease-in-out;
}

.sidebar ul li.active .icon,
.sidebar ul li:hover .icon {
    filter: brightness(0) saturate(100%) invert(64%) sepia(29%) saturate(343%) hue-rotate(8deg) brightness(95%) contrast(90%);
    transform: scale(1.05);
}

.sidebar .nav-item:hover {
    background-color: rgba(249, 248, 244, 1);
    border-radius: 8px;
}

.sidebar .nav-item.active {
    background-color: rgba(249, 248, 244, 1);
    border-radius: 8px;
}

/* Close Button */
.sidebar-close {
    display: none;
    position: absolute;
    top: 2%;
    left: 0;
    font-size: 2rem;
    color: black;
}

/* custom container */

.custom-container {
    padding: 0 20rem 0 0;
}

/* navbar */
.search-bar {
    padding-right: 1rem;
    width: 100%;
}

.search-bar input {
    background-color: rgba(39, 58, 65, 0.05);
    border: none;
    padding: 0.7rem;
}

.search-bar input::placeholder {
    color: rgba(156, 156, 156, 1);
    font-size: 14px;
    padding: 0.5rem;
}

.search-bar input {
    background-color: #f7f7f7;
    border: none;
    padding-right: 2.5rem;
}

.search-bar input:focus {
    box-shadow: none;
    background-color: #f7f7f7;
}

.search-bar i {
    color: rgba(158, 158, 158, 1);
    font-size: 16px;
}

/* Content */
.content {
    margin-right: 270px;
    padding: 1rem 3rem;
    transition: margin-left 0.3s ease-in-out;
}

/* Table */
.user-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.active-status p {
    background-color: rgba(23, 89, 65, 0.2);
    color: rgba(23, 89, 65, 1);
    border-radius: 16px;
    padding: 0.5rem;
}

@media (max-width: 767.98px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .programmes-table {
        font-size: 14px;
    }

    .pagination-controls select {
        width: 80px;
    }
}

/* Responsive Sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.show {
        transform: translateX(0%);
    }

    .sidebar-close {
        display: block;
    }

    .content {
        margin-right: 0 !important;
        padding: 0.5rem;
    }

    .custom-container {
        padding: 0;
    }

    .search-bar {
        width: 100%;
    }

    .calendar {
        max-width: 100%;
        width: 100%;
    }

    .custom-card {
        min-width: 120px;
    }
}

/* content */

.card-title {
    font-size: 2rem;
    color: rgba(211, 171, 85, 1);
}

.card-footer {
    background: linear-gradient(135deg,
            rgba(39, 58, 65, 1) 0%,
            rgba(39, 58, 65, 0.95) 100%);
    color: white;
    padding: 1rem 0.75rem;
    border-radius: 0px 0px 20px 20px !important;
    margin-top: auto;
}

.card-footer a:hover {
    text-decoration: none;
}

.card-footer a:hover p {
    color: rgba(211, 171, 85, 1) !important;
    transition: color 0.2s ease;
}

.custom-card {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
    padding: 0 !important;
    border: 2px solid rgba(219, 219, 219, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.custom-card:hover {
    border-color: rgba(183, 146, 79, 0.5);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.calendar {
    background: rgba(255, 255, 255, 1);
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 0;
    width: fit-content;
    /* max-width: 350px; */
    text-align: center;
    border: none;
}

.btn-custom {
    background-color: rgba(211, 171, 85, 1);
    color: rgba(248, 247, 247, 1);
    border: none;
    padding: 15px 35px;
    width: 100%;
    border-radius: 50px;
}

.btn-custom:hover {
    background-color: rgb(211, 160, 51);
    color: rgba(248, 247, 247, 1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.calendar-header {
    gap: 10px;
}

.calendar-header select {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    border: 1px solid rgba(39, 58, 65, 0.1);
    background-color: rgba(39, 58, 65, 0.05);
    color: rgba(39, 58, 65, 1);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.calendar-header select:hover {
    background-color: rgba(39, 58, 65, 0.1);
    border-color: rgba(183, 146, 79, 0.3);
}

.calendar-header select:focus {
    outline: none;
    border-color: rgba(183, 146, 79, 0.5);
    box-shadow: 0 0 0 3px rgba(183, 146, 79, 0.1);
}

.calendar-days,
.calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-days {
    margin-bottom: 8px;
}

.calendar-days div {
    font-weight: 600;
    padding: 8px 4px;
    font-size: 13px;
    color: rgba(39, 58, 65, 0.7);
    text-align: center;
}

.calendar-dates div {
    padding: 0.5rem;
    border-radius: 50%;
    margin: 2px;
    transition: background-color 0.2s;
}

.calendar-dates div:hover {
    background-color: #f0f0f0;
    cursor: pointer;
}

.current-day {
    color: white !important;
    font-weight: bold;
}

.other-month {
    color: #999;
}

.past-events-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 1.5rem;
}

.past-events-box:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.past-events-box h6 {
    font-weight: bold;
    margin-bottom: 15px;
}

.past-event-item {
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
}

.past-event-item:hover {
    background-color: rgba(183, 146, 79, 0.05);
    border-color: rgba(183, 146, 79, 0.2);
    transform: translateX(-5px);
}

.past-event-item .text {
    text-align: right;
}

.past-event-item .icon {
    font-size: 20px;
    min-width: 30px;
    text-align: center;
    transition: transform 0.2s ease;
}

.past-event-item:hover .icon {
    transform: scale(1.2);
}

.modal-body input::placeholder,
.modal-body textarea::placeholder {
    color: rgba(123, 123, 123, 0.5);
    font-size: 16px;
    font-weight: 400;
    text-align: right;
}

.modal-body input[type="text"],
input[type="date"],
input[type="tel"],
select,
option {
    padding: 1rem;
    border-radius: 10px;
}

.modal-body label {
    margin-bottom: 1rem;
}

form label[for="imageUpload"] img {
    filter: brightness(0) saturate(100%) invert(42%) sepia(52%) saturate(759%) hue-rotate(14deg) brightness(93%) contrast(88%);
}

.form-control {
    border-radius: 12px;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(39, 58, 65, 0.1);
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: rgba(183, 146, 79, 0.5);
    box-shadow: 0 0 0 3px rgba(183, 146, 79, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.custom-select,
.form-select {
    background-position: left 0.75rem center;
    background-size: 16px 16px;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(39, 58, 65, 0.1);
    transition: all 0.2s ease;
}

[dir="rtl"] .custom-select,
[dir="rtl"] .form-select {
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-select:focus {
    border-color: rgba(183, 146, 79, 0.5);
    box-shadow: 0 0 0 3px rgba(183, 146, 79, 0.1);
}

.form-check-input:checked {
    background-color: rgb(211, 160, 51);
    border-color: rgb(211, 160, 51);
}

.event-day {
    background: linear-gradient(135deg,
            rgba(183, 146, 79, 1) 0%,
            rgba(211, 171, 85, 1) 100%);
    border-radius: 50%;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(183, 146, 79, 0.4);
    position: relative;
}

.event-day:hover {
    background: linear-gradient(135deg,
            rgba(211, 171, 85, 1) 0%,
            rgba(183, 146, 79, 1) 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(183, 146, 79, 0.6);
}

.event-day::after {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: #dc3545;
    border-radius: 50%;
    border: 2px solid white;
}