@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #B23D33;
    --primary-dark: #f07266;
    --secondary: #d1ba5c;
    --accent: #e2c966;
    --bg-color: #fcfcfc;
    --surface: #ffffff;
    --text-main: #2d3748;
    --text-muted: #718096;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 88px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 30px rgba(178, 61, 51, 0.15);
    --border-radius-lg: 20px;
    --border-radius-md: 12px;
    --border-radius-md: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-hover: linear-gradient(135deg, var(--primary-dark) 0%, #B08D0B 100%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    font-size: 0.9375rem;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-size: 0.9375rem;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
nav {
    position: relative;
    z-index: 2005;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    height: 100vh;
    padding: 30px 15px;
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-x: hidden;
}

.top-nav-left {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.top-logo {
    width: 140px;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.1));
}

.menu {
    padding: 0;
    margin: 0;
    flex: 1;
}

.menu-category {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 25px 20px 10px;
}

.menu li {
    list-style: none;
    margin: 4px 15px;
    border-radius: var(--border-radius-md);
    transition: var(--transition);
}

.menu li a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    font-weight: 500;
    border-radius: var(--border-radius-md);
    transition: var(--transition);
    gap: 12px;
}

.menu li a svg {
    width: 18px;
    height: 18px;
    transition: var(--transition);
    color: var(--primary); /* Force primary color on icons like the reference */
}

.menu li a:hover {
    background: rgba(178, 61, 51, 0.05);
    color: var(--primary);
}

.menu li a:hover svg {
    color: var(--primary);
}

.menu li.active {
    background: var(--gradient-primary);
    box-shadow: 0 4px 12px rgba(178, 61, 51, 0.2);
}

.menu li.active a {
    color: white;
}

.menu li.active a svg {
    color: white;
}

/* MAIN CONTENT */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2px 5px;
    background: var(--bg-color);
    transition: var(--transition);
}

/* TOPBAR */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.topbar h2,
.topbar h3 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--text-main);
    font-weight: 600;
}

.topbar p {
    margin: 4px 0 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-main);
    text-decoration: none;
    margin-right: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.back-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateX(-3px);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.search {
    padding: 12px 24px;
    width: 350px;
    border-radius: 30px;
    border: none;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
}

.fiscal-year-form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    padding: 8px 16px;
    border-radius: 30px;
    box-shadow: var(--shadow-sm);
}

.fiscal-year-form label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.fiscal-year-form select {
    border: none;
    background: transparent;
    font-weight: 600;
    color: var(--text-main);
    font-family: 'Poppins';
    outline: none;
    cursor: pointer;
}

.sidebar-toggle {
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    color: var(--text-main);
    margin-right: 15px;
}

.sidebar-toggle:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.profile {
    display: flex;
    align-items: center;
    background: var(--surface);
    padding: 6px 6px 6px 20px;
    border-radius: 100px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    gap: 12px;
    border: 1px solid rgba(0,0,0,0.02);
}

.profile:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.profile .text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.profile .text h4 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.profile .text p {
    margin: 0;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.profile img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

/* NOTIFICATION COMPONENTS */
.notification-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    cursor: pointer;
    transition: var(--transition);
}

.notification-wrapper:hover {
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #e53e3e;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: var(--surface);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-hover);
    display: none;
    flex-direction: column;
    z-index: 2010;
    margin-top: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.notification-dropdown.active {
    display: flex;
}

.notification-header {
    padding: 15px 20px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
}

.notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid #edf2f7;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: rgba(178, 61, 51, 0.03);
    border-left: 3px solid var(--primary);
}

.notification-item .title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.notification-item .message {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.notification-item .time {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.notification-footer {
    padding: 12px;
    text-align: center;
    border-top: 1px solid #edf2f7;
}

.notification-footer a {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

/* MOBILE LOGO COMPONENT */
.mobile-logo-container {
    display: none;
    /* Hidden on desktop */
    align-items: center;
    gap: 8px;
}

.mobile-logo-container img {
    height: 28px;
    width: auto;
}

.mobile-logo-container span {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
}

.mobile-logo-container span .portal-text {
    color: var(--primary);
}

/* COLLAPSED STATE STYLES */
.dashboard.collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
    padding: 30px 10px;
}

.dashboard.collapsed .main {
    margin-left: var(--sidebar-collapsed-width);
}

.dashboard.collapsed .top-logo {
    width: 45px;
    transition: var(--transition);
}

.dashboard.collapsed .menu li a span,
.dashboard.collapsed .sidebar-footer a span {
    display: none;
}

.dashboard.collapsed .menu li a {
    justify-content: center;
    padding: 14px 10px;
    gap: 0;
}

.dashboard.collapsed .menu li a svg {
    margin: 0;
}

.dashboard.collapsed .sidebar-footer a {
    justify-content: center;
    padding: 12px 10px;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    background: var(--surface);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    margin-right: 20px;
}

.sidebar-toggle:hover {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.profile span {
    font-weight: 600;
    font-size: 0.95rem;
}

.logout-link {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    margin-left: 16px;
    transition: var(--transition);
}

.logout-link:hover {
    opacity: 0.8;
}

/* CARDS GRID */
.cards,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.card,
.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    min-height: 1px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card::before,
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.card:hover,
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card:hover::before,
.stat-card:hover::before {
    opacity: 1;
}

.card p,
.stat-card p {
    margin: 0 0 8px 0;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.card h2,
.stat-card h2 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--text-main);
    font-weight: 700;
}

.card .box-container {
    background: transparent;
}

/* BUDGET SECTIONS */
.budget-section {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm) !important;
    margin-bottom: 30px;
    transition: var(--transition);
}

.budget-section:hover {
    box-shadow: var(--shadow-hover) !important;
}

.budget-section h3 {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    color: var(--text-main);
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
}

.budget-section h3::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gradient-primary);
    margin-right: 12px;
}

.budget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.budget-item {
    margin-bottom: 12px;
}

.budget-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-color);
    border-radius: var(--border-radius-md);
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
    border: 1px solid transparent;
}

.budget-link:hover {
    background: #fff;
    border-color: rgba(102, 126, 234, 0.2);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.budget-item-name {
    font-weight: 600;
    display: flex;
    align-items: center;
}

.budget-item-amount {
    font-weight: 700;
    color: var(--primary);
    background: rgba(178, 61, 51, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.95rem;
}

.budget-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px dashed #e2e8f0;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
}

.budget-total span:last-child {
    color: var(--secondary);
}

/* TRANSACTIONS & DATA TABLES */
.transactions {
    background: var(--surface);
    border-radius: var(--border-radius-lg);
    padding: 10px;
    box-shadow: var(--shadow-sm);
    margin-top: 30px;
    border: none;
}

.transactions h3 {
    margin: 0 0 24px 0;
    color: var(--text-main);
    font-size: 1.4rem;
}

.transactions table,
.budget-detail-table,
.budget-table,
.activity-box table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: none;
}

.transactions table th,
.budget-detail-table th,
.budget-table th,
.activity-box table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 16px;
    border-bottom: 2px solid #e2e8f0;
    text-align: center;
}

.transactions table td,
.budget-detail-table td,
.budget-table td,
.activity-box table td {
    padding: 15px;
    border-bottom: 1px solid #edf2f7;
    color: var(--text-main);
    font-weight: 500;
    text-align: center;
}

.transactions table tbody tr,
.budget-table tbody tr,
.activity-box table tbody tr {
    transition: var(--transition);
}

.transactions table tbody tr:hover,
.budget-table tbody tr:hover,
.activity-box table tbody tr:hover {
    background-color: var(--bg-color);
}

.budget-row {
    cursor: pointer;
}

/* Added hover effect for interactive rows - targeting cells directly for visibility */
.budget-row:hover td {
    background-color: #eceef0 !important;
    transition: background-color 0.2s ease;
}

.budget-details {
    display: none;
}

.budget-details.show {
    display: table-row;
}

.budget-detail-cell {
    padding: 20px !important;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0 !important;
}

.budget-detail-cell h4 {
    margin: 0 0 16px 0;
    color: var(--primary);
}

.expand-icon {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.2rem;
    width: 40px;
    text-align: center !important;
}

/* BADGES & STATUS */
[class^="status-"],
[class^="type-"] {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.status-active {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}

.status-inactive {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

.type-dtp {
    background: rgba(178, 61, 51, 0.15);
    color: var(--primary-dark);
}

.type-nonacademic {
    background: rgba(155, 89, 182, 0.15);
    color: #8e44ad;
}

/* STATISTICS LAYOUT */
.middle {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.chart-box,
.activity-box {
    background: var(--surface);
    border: none;
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.chart-box:hover,
.activity-box:hover {
    box-shadow: var(--shadow-hover);
}

.chart-box h4,
.activity-box h4 {
    margin: 0 0 24px 0;
    color: var(--text-main);
    font-size: 1.2rem;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chart-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.chart-label {
    min-width: 80px;
    font-weight: 600;
    color: var(--text-muted);
}

.chart-bar {
    height: 12px;
    background: var(--gradient-primary);
    border-radius: 6px;
    min-width: 20px;
    position: relative;
    overflow: hidden;
}

.chart-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.chart-value {
    min-width: 100px;
    text-align: right;
    font-weight: 700;
    color: var(--text-main);
}

/* FORMS AND INPUTS */
select,
input[type="text"],
input[type="email"],
input[type="password"] {
    font-family: 'Poppins', sans-serif;
    outline: none;
}

.year-select-form select,
.year-filter-form select {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    appearance: auto;
}

.year-select-form select:focus,
.year-filter-form select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(178, 61, 51, 0.15);
}

/* RESPONSIVENESS */
@media (max-width: 1024px) {

    .cards,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 2001;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
        display: flex;
        visibility: hidden;
    }

    .dashboard.mobile-active .sidebar {
        left: 0;
        visibility: visible;
    }

    /* Overlay for mobile drawer */
    .dashboard::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 2000;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .dashboard.mobile-active::after {
        opacity: 1;
        visibility: visible;
    }

    .main {
        margin-left: 0;
        padding: 15px;
        padding-top: 140px;
        /* Space for taller fixed header */
    }

    .topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1500;
        height: 140px;
        /* Taller for two rows */
        display: block !important;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid #edf2f7;
    }

    .topbar>div:first-child {
        display: block;
        /* Remove flex from parent container */
    }

    .sidebar-toggle {
        display: flex !important;
        position: absolute;
        top: 15px;
        left: 15px;
    }

    .mobile-logo-container {
        display: flex;
        align-items: center;
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
    }

    .topbar>div:first-child>div:not(.sidebar-toggle):not(.mobile-logo-container) {
        display: block !important;
        /* Restore greeting visibility */
        position: absolute;
        top: 75px;
        left: 15px;
    }

    .topbar>div:first-child>div:not(.sidebar-toggle):not(.mobile-logo-container) h2,
    .topbar>div:first-child>div:not(.sidebar-toggle):not(.mobile-logo-container) h3 {
        font-size: 1.2rem !important;
        /* Smaller title on mobile */
    }

    .topbar>div:first-child>div:not(.sidebar-toggle):not(.mobile-logo-container) p {
        font-size: 0.8rem !important;
    }

    .topbar-right {
        display: flex;
        align-items: center;
        gap: 15px;
        position: absolute;
        top: 15px;
        right: 15px;
    }

    .search {
        display: none !important;
    }

    .fiscal-year-form,
    .fiscal-year-form select {
        display: flex !important;
    }

    .fiscal-year-form {
        position: absolute;
        top: 70px;
        /* Push to the second row */
        right: 0;
        /* Right edge matches topbar-right */
        white-space: nowrap;
        padding: 6px 12px;
    }

    .profile {
        margin-left: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }

    .profile span {
        display: none;
        /* Hide name on very small headers */
    }

    .cards,
    .stats-grid,
    .middle {
        grid-template-columns: 1fr;
    }
}

/* FORM CONTROLS */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
    background: #f8fafc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(178, 61, 51, 0.1);
}

.btn {
    background: var(--gradient-primary);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(178, 61, 51, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(178, 61, 51, 0.3);
    background: var(--primary-dark);
}

.btn:active {
    transform: translateY(0);
}


/* NOTIFICATIONS SYSTEM */
.notification-wrapper {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}

.notification-wrapper:hover {
    background: #edf2f7;
    transform: translateY(-1px);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 15px);
    right: -10px;
    width: 350px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    overflow: hidden;
    border: 1px solid #edf2f7;
    animation: fadeInDown 0.3s ease;
}

.notification-dropdown.active {
    display: block;
}

.notification-header {
    padding: 15px 20px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.notification-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 700;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid #edf2f7;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: rgba(178, 61, 51, 0.03);
    border-left: 3px solid var(--primary);
}

.notification-item .title {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

.notification-item .message {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
}

.notification-item .time {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-top: 5px;
}

.notification-footer {
    padding: 12px;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
}

.notification-footer a {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.notification-footer a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* MODALS */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 55, 72, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.close-modal {
    position: absolute;
    right: 24px;
    top: 24px;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary);
    transform: rotate(90deg);
}
/* Status Badges */
.status-badge { padding: 6px 14px; border-radius: 20px; font-weight: 600; font-size: 0.85rem; display: inline-block; }
.status-pending { background: #fffaf0; color: #f6ad55; border: 1px solid #fbd38d; }
.status-approved { background: #f0fff4; color: #48bb78; border: 1px solid #9ae6b4; }
.status-badge.status-rejected { 
    background: #fff5f5; 
    color: #f56565; 
    border: 1px solid #feb2b2; 
}
