/* 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;
}

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

.btn-outline-custom {
    background-color: rgba(248, 247, 247, 1);
    color: rgba(211, 171, 85, 1);
    border: rgba(211, 171, 85, 1) 1px solid;
    padding: 15px 22px;
    border-radius: 50px;
}

.btn-outline-custom:hover {
    background-color: rgba(211, 171, 85, 1);
    color: rgba(248, 247, 247, 1);
}

/* Notification Cards */
.notification-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid transparent;
}

.notification-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.notification-card.unread {
    border-left-color: #2196f3;
    background: linear-gradient(to right, #e3f2fd 0%, #ffffff 5%);
}

.notification-card.read {
    opacity: 0.85;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.notification-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    flex-shrink: 0;
}

.notification-icon-wrapper.login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.notification-icon-wrapper.user-plus {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.notification-icon-wrapper.edit {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.notification-icon-wrapper.check-circle {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.notification-icon-wrapper.x-circle {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.notification-icon-wrapper.bell {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.notification-icon-wrapper i {
    font-size: 24px;
    color: white;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 700;
    font-size: 16px;
    color: #212121;
    margin-bottom: 8px;
    line-height: 1.4;
}

.notification-message {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.notification-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

/* Mobile: prevent footer/time from overflowing */
@media (max-width: 576px) {
    .notification-card {
        padding: 14px;
    }

    .notification-icon-wrapper {
        width: 40px;
        height: 40px;
        margin-left: 10px;
    }

    .notification-icon-wrapper i {
        font-size: 20px;
    }

    .notification-title {
        font-size: 14px;
    }

    .notification-message {
        font-size: 13px;
    }

    .notification-footer {
        flex-wrap: wrap;
        gap: 10px;
    }

    .notification-time {
        flex-wrap: wrap;
        row-gap: 4px;
        max-width: 100%;
    }
}

.notification-time {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notification-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.notification-badge.unread {
    background-color: #e3f2fd;
    color: #1976d2;
}

.notification-badge.read {
    background-color: #f5f5f5;
    color: #757575;
}

.notification-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.notification-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.notification-empty p {
    font-size: 16px;
    margin: 0;
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid #f0f0f0;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-weight: 500;
    padding: 12px 24px;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: #b7924f;
    color: #b7924f;
}

.nav-tabs .nav-link.active {
    color: #b7924f;
    border-bottom-color: #b7924f;
    background-color: transparent;
}

/* Pagination */
.custom-pagination .page-link {
    border: none;
    border-radius: 50px;
    padding: 10px 5;
    text-align: center;
    margin: auto 1rem;
    color: black;
    background-color: transparent;
    transition: all 0.3s ease;
}

.custom-pagination .page-link:hover {
    background-color: rgba(211, 171, 85, 1);
    color: white;
}

.custom-pagination .page-item.active .page-link {
    background-color: rgba(211, 171, 85, 1);
    color: white;
    font-weight: bold;
}

.custom-pagination .page-item.disabled .page-link {
    background-color: transparent;
    color: #aaa;
    border: none;
    cursor: default;
}

/* 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;
    }
}

/* Loading Indicator */
#loadingIndicator,
#loadingIndicatorUnread,
#loadingIndicatorRead {
    width: 100%;
    padding: 20px;
    color: #b7924f;
    font-weight: bold;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}