/* Government Professional Design - Green Color Scheme - Updated */
:root {
    --primary-green: #10b981;
    --dark-green: #059669;
    --light-green: #34d399;
    --dark-green-alt: #047857;
    --sidebar-bg: #f0fdf4;
    --dark-grey: #1e293b;
    --light-grey: #d1fae5;
    --border-color: #a7f3d0;
    --accent-green: #6ee7b7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f9fafb;
    color: var(--dark-grey);
}

.sidebar {
    width: 300px;
    min-height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, var(--sidebar-bg) 100%);
    border-right: 2px solid var(--light-grey);
    position: fixed;
    left: 0;
    top: 0;
    padding: 0;
    box-shadow: 2px 0 12px rgba(16, 185, 129, 0.08);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* Logo removed from sidebar - now in header */

.sidebar-profile {
    padding: 30px 25px;
    text-align: center;
    flex: 1;
}

.profile-header {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.sidebar-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.avatar-border {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    opacity: 0.2;
    z-index: -1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.05); opacity: 0.3; }
}

.sidebar-avatar i {
    font-size: 45px;
    color: white;
}

.profile-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background: var(--primary-green);
    border-radius: 50%;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.profile-badge i {
    font-size: 14px;
    color: white;
}

.sidebar-welcome {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 500;
}

.sidebar-username {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-grey);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-username i {
    color: var(--primary-green);
    cursor: pointer;
    transition: transform 0.3s;
}

.sidebar-username i:hover {
    transform: rotate(180deg);
}

.sidebar-user-info {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: left;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #ecfdf5;
    transition: all 0.3s;
}

.info-row:hover {
    background: #f0fdf4;
    margin: 0 -10px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 8px;
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-row i {
    font-size: 18px;
    color: var(--primary-green);
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 13px;
    color: var(--dark-grey);
    font-weight: 500;
}

.sidebar-actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 20px;
    border-top: 2px solid var(--light-grey);
    background: white;
}

.sidebar-action-btn {
    padding: 12px;
    border-radius: 10px;
    background: #f0fdf4;
    border: 2px solid var(--border-color);
    color: var(--dark-green);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.sidebar-action-btn i {
    font-size: 20px;
}

.sidebar-action-btn:hover {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    border-color: transparent;
}

.main-content {
    margin-left: 300px;
    padding: 25px 35px;
    min-height: 100vh;
    background: #f9fafb;
}

.main-header {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border-radius: 14px;
    padding: 18px 28px;
    margin-bottom: 28px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
}

.header-left-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 20px;
    border-right: 2px solid var(--light-grey);
}

.logo-img {
    max-width: 160px;
    max-height: 55px;
    object-fit: contain;
    transition: transform 0.3s;
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark-green);
    letter-spacing: 1px;
}

.main-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
}

.title-icon {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.title-text {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.header-icons {
    display: flex;
    gap: 10px;
}

.header-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: white;
    border: 2px solid var(--border-color);
    color: var(--dark-grey);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.header-icon-btn:hover {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.logout-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
}

/* Notification Dropdown */
.notification-wrapper {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    max-height: 360px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 2px solid var(--border-color);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

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

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

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

.notification-header {
    padding: 10px 14px;
    border-bottom: 2px solid var(--light-grey);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.notification-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-grey);
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary-green);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 4px;
    transition: all 0.3s;
}

.mark-all-read:hover {
    background: var(--light-grey);
    color: var(--dark-green);
}

.notification-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 2px 0;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f0fdf4;
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}

.notification-item {
    display: flex;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s;
    position: relative;
    cursor: pointer;
}

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

.notification-item.unread {
    background: #f0fdf4;
    border-left: 3px solid var(--primary-green);
}

.notification-item:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary-green);
    border-radius: 50%;
}

.notification-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.notification-icon.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
    color: var(--dark-green);
}

.notification-icon.warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
    color: #f59e0b;
}

.notification-icon.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
    color: #2563eb;
}


.notification-content {
    flex: 1;
    min-width: 0;
    padding-right: 4px;
}

.notification-content h4 {
    margin: 0 0 2px 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--dark-grey);
    line-height: 1.3;
}

.notification-content p {
    margin: 0 0 3px 0;
    font-size: 10px;
    color: #64748b;
    line-height: 1.4;
}

.notification-time {
    font-size: 9px;
    color: #94a3b8;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.notification-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

.notification-footer {
    padding: 8px 14px;
    border-top: 2px solid var(--light-grey);
    text-align: center;
    background: #f9fafb;
}

.view-all-notifications {
    color: var(--primary-green);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 5px;
}

.view-all-notifications:hover {
    background: var(--light-grey);
    color: var(--dark-green);
    text-decoration: none;
}

/* Settings Dropdown */
.settings-wrapper {
    position: relative;
}

.settings-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    max-height: 360px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 2px solid var(--border-color);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

.settings-dropdown.show {
    display: flex;
}

.settings-header {
    padding: 10px 14px;
    border-bottom: 2px solid var(--light-grey);
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.settings-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-grey);
}

.settings-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 2px 0;
}

.settings-list::-webkit-scrollbar {
    width: 6px;
}

.settings-list::-webkit-scrollbar-track {
    background: #f0fdf4;
}

.settings-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.settings-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}

.settings-item {
    display: flex;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.settings-item:hover {
    background: #f0fdf4;
    text-decoration: none;
    color: inherit;
}

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

.settings-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
    color: var(--dark-green);
}

.settings-content {
    flex: 1;
    min-width: 0;
    padding-right: 4px;
}

.settings-content h4 {
    margin: 0 0 2px 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--dark-grey);
    line-height: 1.3;
}

.settings-content p {
    margin: 0;
    font-size: 10px;
    color: #64748b;
    line-height: 1.4;
}

.settings-item i.bi-chevron-right {
    font-size: 12px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: all 0.3s;
}

.settings-item:hover i.bi-chevron-right {
    color: var(--primary-green);
    transform: translateX(2px);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.module-card {
    background: white;
    border-radius: 14px;
    padding: 26px 22px;
    border: 2px solid var(--border-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--dark-green));
    transform: scaleX(0);
    transition: transform 0.4s;
}

.module-card:hover::before {
    transform: scaleX(1);
}

.module-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

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

.module-icon {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s ease;
    position: relative;
}

.card-dark-green .module-icon {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.12), rgba(5, 150, 105, 0.06));
    border: 2px solid rgba(5, 150, 105, 0.2);
}

.card-light-green .module-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.06));
    border: 2px solid rgba(16, 185, 129, 0.2);
}

/* Green icon container on hover - Same as CFMIS text color */
.module-card:hover .card-dark-green .module-icon,
.module-card.card-dark-green:hover .module-icon {
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green)) !important;
    background-color: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
    border: 2px solid var(--primary-green) !important;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4) !important;
}

.module-card:hover .card-light-green .module-icon,
.module-card.card-light-green:hover .module-icon {
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green)) !important;
    background-color: var(--primary-green) !important;
    border-color: var(--primary-green) !important;
    border: 2px solid var(--primary-green) !important;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4) !important;
}

.module-icon i {
    font-size: 28px;
    color: var(--dark-grey);
    transition: all 0.35s;
    position: relative;
    z-index: 10;
}

.module-card:hover .card-dark-green .module-icon i,
.module-card.card-dark-green:hover .module-icon i {
    color: #ffffff !important;
    transform: scale(1.15);
}

.module-card:hover .card-light-green .module-icon i,
.module-card.card-light-green:hover .module-icon i {
    color: #ffffff !important;
    transform: scale(1.15);
}

.module-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 45px;
    max-height: 45px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: all 0.35s;
    position: relative;
    z-index: 10;
}

.module-card:hover .module-icon img {
    transform: scale(1.15);
    filter: brightness(0) invert(1) drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.card-number {
    font-size: 22px;
    font-weight: 800;
    color: #d1fae5;
    transition: all 0.35s;
    letter-spacing: -1px;
}

.module-card:hover .card-number {
    color: var(--primary-green);
    transform: scale(1.1);
}

.module-short-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark-grey);
    margin: 0 0 8px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.module-full-name {
    font-size: 11px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
}

@media (max-width: 1400px) {
    .modules-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive Notification & Settings Dropdown */
@media (max-width: 768px) {
    .notification-dropdown,
    .settings-dropdown {
        width: calc(100vw - 40px);
        right: -10px;
        max-width: 300px;
    }
    
    .notification-item,
    .settings-item {
        padding: 8px 12px;
    }
    
    .notification-content h4,
    .settings-content h4 {
        font-size: 11px;
    }
    
    .notification-content p,
    .settings-content p {
        font-size: 9px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px 18px;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
}
