/* -------------------- GLOBAL STYLES -------------------- */
body {
    background-color: #ebf6f8;
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* -------------------- TOP NAVBAR -------------------- */
.top-navbar {
    background: #ffffff;
    border-bottom: 1px solid #dbe4f0;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.main-navbar .nav-link.active,
.main-navbar .dropdown-item.active {
    color: #39b0ce !important;
    background-color: #e7f3ff;
}
.mobile-nav-link.active,
.mobile-sub-link.active {
    color: #39b0ce;
    background-color: rgba(57, 176, 206, 0.1);
}
.main-navbar .navbar-nav {
    display: flex;
    gap: 12px;
}

.date-display {
    background: #f5e8dc;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 250;
    color: #1360a8;
    display: flex;
    align-items: center;
}

.date-display i {
    margin-right: 6px;
    color: #1360a8;
}

/* Top navbar icons (bell, profile) */
.icon-btn,
.profile-icon {
    border: none;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #1360a8;
    cursor: pointer;
    transition: 0.2s;
    margin-left: 12px;
}

.icon-btn:hover,
.profile-icon:hover {
    color: #39b0ce;
}

.icon-btn .badge {
    font-size: 0.55rem;
    padding: 3px 5px;
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(40%, -40%);
}
/* -------------------- MOBILE NOTIFICATION DROPDOWN (CENTERED) -------------------- */
@media (max-width: 576px) {
    /* Center the dropdown on screen */
    .dropdown-menu.custom-notif-dropdown {
        position: fixed !important;
        top: 70px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 90% !important;
        max-width: 400px;
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        z-index: 2000;
    }

    /* Make list scrollable if long */
    .notification-list {
        max-height: 60vh;
        overflow-y: auto;
    }

    /* Center content inside items */
    .notification-item {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 10px 12px;
        gap: 10px;
    }

    .notif-avatar {
        width: 36px;
        height: 36px;
        margin-right: 0;
        flex-shrink: 0;
    }

    .notif-content {
        flex: 1;
    }

    /* Adjust header & footer */
    .custom-notif-dropdown .p-3 {
        padding: 12px !important;
    }

    .view-all-btn {
        font-size: 0.9rem;
        padding: 8px 0;
    }
}

/* Fix spacing of icons in top navbar */
.top-navbar .d-flex.align-items-center {
    gap: 12px;
}

/* -------------------- DESKTOP NAVBAR -------------------- */
.main-navbar {
    background: #ffffff;
    border-bottom: 1px solid #dbe4f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    padding: 10px 0;
}

.main-navbar .nav-link,
.main-navbar .dropdown-item {
    color: #1360a8 !important;
    font-size: 0.95rem;
    font-weight: 500;
    transition: 0.2s;
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link:focus,
.main-navbar .dropdown-item:hover,
.main-navbar .dropdown-item:focus {
    color: #39b0ce !important;
    background-color: #e7f3ff;
}

.main-navbar .dropdown-menu {
    border-radius: 10px;
    min-width: 180px;
    padding: 0.25rem 0;
}

.main-navbar .nav-link i {
    margin-right: 6px;
}

/* -------------------- MOBILE MENU -------------------- */
.mobile-nav-link,
.mobile-sub-link {
    color: #1360a8;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 14px;
    border-radius: 6px;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus,
.mobile-sub-link:hover,
.mobile-sub-link:focus {
    color: #39b0ce;
    background-color: rgba(57, 176, 206, 0.1);
}

/* Sub-links indentation */
.mobile-sub-link {
    padding-left: 28px;
}

/* Dropdown arrow rotation for mobile menu */
.dropdown-arrow {
    transition: transform 0.3s;
    transform: rotate(0deg);
}

.collapse.show + .dropdown-arrow,
.nav-item .collapse.show ~ .dropdown-arrow,
.dropdown-arrow.rotate {
    transform: rotate(180deg);
}

/* -------------------- NOTIFICATIONS -------------------- */
.custom-notif-dropdown {
    width: 330px !important;
    border-radius: 10px;
    padding: 0;
}

.notification-list li {
    border-bottom: 1px solid #e8eff5;
}

.notification-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    text-decoration: none;
    transition: 0.2s;
}

.notification-item:hover {
    background-color: #f1f8ff;
}

.notif-avatar {
    width: 38px;
    height: 38px;
    background: #dceaff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 12px;
}

.notif-content strong {
    font-size: 0.9rem;
    color: #043f74;
}

.small-date {
    font-size: 0.75rem;
}

/* Profile dropdown */
.dropdown-menu-end {
    min-width: 230px;
    border-radius: 10px;
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 991.98px) {
    .navbar-brand-desktop {
        display: none;
    }

    #dateTime {
        display: none;
    }
}

@media (min-width: 992px) {
    .btn-mobile-menu {
        display: none;
    }
}

#calendar .fc-toolbar-chunk {
    display: flex;
    flex-wrap: wrap;
    /* allows buttons to wrap on small screens */
    justify-content: space-between;
}

#calendar .fc-button {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
    margin-bottom: 0.2rem;
}

@media (min-width: 576px) {
    #calendar .fc-button {
        font-size: 0.9rem !important;
        padding: 0.4rem 0.75rem !important;
        margin-bottom: 0;
    }
}

#calendar {
    max-width: 100%;
    overflow-x: auto;
    /* allows horizontal scroll if necessary */
}

.fc .fc-col-header-cell-cushion {
    font-size: 0.8rem;
    /* smaller day names for mobile */
}

.fc .fc-daygrid-event {
    font-size: 0.75rem;
    /* smaller event text on mobile */
}

.custom-alert {
    background-color: #d9f0ff;
    border-color: #b0e0ff;
    color: #004085;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-radius: 8px;
}

.custom-alert a {
    color: #0d6efd;
    text-decoration: underline;
    font-weight: 500;
}

.custom-alert i {
    font-size: 1.2rem;
}

.card-custom {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 20px;
}

/* Search input */
.search-input {
    max-width: 200px;
}

.table-custom th {
    background-color: #f0f8ff;
    color: #004085;
    font-weight: 600;
}

.table-custom td {
    vertical-align: middle;
}

/* Action icons */
.action-btns {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    /* default: no wrap on desktop */
}

.action-btns i {
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.action-btns i:hover {
    transform: scale(1.2);
}

.action-btns .text-danger:hover {
    color: #dc3545 !important;
}

.action-btns .text-primary:hover {
    color: #0d6efd !important;
}

.action-btns .text-success:hover {
    color: #198754 !important;
}

/* Mobile responsiveness */
@media (max-width: 576px) {
    .action-btns {
        flex-wrap: wrap;
        /* wrap icons in a single row */
        justify-content: start;
    }

    .action-btns i {
        margin-bottom: 5px;
        /* small spacing between wrapped icons */
    }
}

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

.profile-card {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background-color: #ffffff;
}

.profile-header {
    height: 120px;
    background: linear-gradient(90deg, #a8d0f0, #6baae3, #2d85e8, #f6a65c);
    position: relative;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #fff;
    position: absolute;
    bottom: -40px;
    left: 20px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #555;
}

.profile-body {
    padding: 60px 20px 20px 20px;
    /* padding-top accounts for avatar overlap */
}

.profile-name {
    font-weight: 600;
    font-size: 1.2rem;
}

.profile-details {
    color: #555;
    font-size: 0.9rem;
    margin-top: 5px;
}

.profile-details i {
    margin-right: 5px;
    color: #6c757d;
}
