/* AISCR Brand Colors */
:root {
    --navy: #1F4E78;
    --turquoise: #2EC4B6;
    --green: #00FF00;
    --yellow: #FFFF00;
    --red: #FF0000;
    --light-grey: #F5F5F5;
    --dark-grey: #333333;
    --white: #FFFFFF;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* Demo Mode Banner */
#demo-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-weight: bold;
    z-index: 10001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#demo-banner button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
    transition: background 0.3s;
}

#demo-banner button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Adjust body padding when demo banner is present */
body:has(#demo-banner) {
    padding-top: 50px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--navy);
    color: white;
    transition: width 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header h2 i {
    color: var(--turquoise);
}

.toggle-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: rgba(46, 196, 182, 0.2);
    color: var(--turquoise);
    border-left-color: var(--turquoise);
}

.nav-item i {
    width: 25px;
    font-size: 1.2em;
    margin-right: 15px;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar.collapsed .nav-item i {
    margin-right: 0;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--navy);
}

.sidebar-footer .download-link {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
}

.sidebar-footer .download-link:last-child {
    margin-bottom: 10px;
}

/* Reset button styles removed - now in tools menu */

.download-link {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--turquoise);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
    font-weight: 500;
}

.download-link:hover {
    background: #26b3a7;
}

.download-link i {
    margin-right: 10px;
}

.sidebar.collapsed .download-link span {
    display: none;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Header */
.header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 200px;
}

.header-left h1 {
    font-size: 1.8em;
    color: var(--navy);
    margin: 0;
}

.header-left #currentDate {
    font-size: 0.85em;
    color: #666;
    font-weight: normal;
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 15px;
    color: #999;
}

.search-box input {
    padding: 10px 15px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 25px;
    width: 280px;
    max-width: 100%;
    font-size: 0.9em;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--turquoise);
    box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.1);
}

.notifications {
    position: relative;
    cursor: pointer;
    font-size: 1.3em;
    color: #666;
    transition: color 0.3s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
}

.notifications:hover {
    background: #f0f0f0;
}

.notifications:hover {
    color: var(--navy);
}

/* Currency Selector */
.currency-selector {
    position: relative;
    flex-shrink: 0;
}

.currency-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
    color: #333;
    white-space: nowrap;
    min-width: 120px;
}

.currency-display:hover {
    border-color: var(--turquoise);
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.currency-display i:first-child {
    color: var(--turquoise);
    font-size: 1.1em;
}

.currency-display span {
    font-weight: 600;
    color: var(--navy);
}

.currency-display i:last-child {
    font-size: 0.8em;
    color: #999;
    transition: transform 0.3s;
}

.currency-dropdown.active ~ .currency-display i:last-child,
.currency-display:hover i:last-child {
    transform: rotate(180deg);
}

.currency-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: none;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

.currency-dropdown.active {
    display: block;
}

.currency-dropdown-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--navy), var(--turquoise));
    color: white;
    border-bottom: 2px solid #f0f0f0;
}

.currency-dropdown-header h4 {
    margin: 0;
    font-size: 1.1em;
}

.currency-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.currency-list::-webkit-scrollbar {
    width: 6px;
}

.currency-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.currency-list::-webkit-scrollbar-thumb {
    background: var(--navy);
    border-radius: 10px;
}

.currency-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    background: #f8f9fa;
}

.currency-option:hover {
    background: #e9ecef;
    border-color: var(--turquoise);
    transform: translateX(5px);
}

.currency-option.active {
    background: linear-gradient(135deg, rgba(31, 78, 120, 0.1), rgba(46, 196, 182, 0.1));
    border-color: var(--turquoise);
}

.currency-option-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.currency-option-info strong {
    color: var(--navy);
    font-size: 1em;
}

.currency-option-info span {
    color: #666;
    font-size: 0.85em;
}

.currency-option-symbol {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--turquoise);
    min-width: 60px;
    text-align: right;
}

/* Responsive Currency Selector */
@media (max-width: 768px) {
    .currency-selector {
        margin-right: 10px;
    }
    
    .currency-display {
        padding: 6px 12px;
        font-size: 0.85em;
    }
    
    .currency-display span {
        display: none;
    }
    
    .currency-dropdown {
        width: calc(100vw - 40px);
        right: -20px;
    }
}

.notifications .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--red);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Notification Panel */
.notification-panel {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

.notification-panel.active {
    display: flex;
}

.notification-panel-header {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--navy), var(--turquoise));
    color: white;
}

.notification-panel-header h3 {
    margin: 0;
    font-size: 1.2em;
}

.clear-all-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.clear-all-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--navy);
    border-radius: 10px;
}

.no-notifications {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-notifications i {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.5;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    background: #f8f9fa;
    position: relative;
}

.notification-item:hover {
    background: #e9ecef;
    border-color: var(--turquoise);
    transform: translateX(5px);
}

.notification-item.read {
    opacity: 0.7;
    background: #ffffff;
}

.notification-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 1.2em;
}

.notification-item-icon.success {
    background: #28a745;
}

.notification-item-icon.warning {
    background: #ffc107;
}

.notification-item-icon.error {
    background: #dc3545;
}

.notification-item-icon.info {
    background: var(--turquoise);
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.notification-item-header strong {
    color: var(--navy);
    font-size: 0.95em;
}

.notification-time {
    font-size: 0.75em;
    color: #999;
    white-space: nowrap;
}

.notification-item-content p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.notification-delete {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0;
    align-self: flex-start;
}

.notification-item:hover .notification-delete {
    opacity: 1;
}

.notification-delete:hover {
    background: #dc3545;
    color: white;
}

/* Toast Notifications */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    min-width: 300px;
    max-width: 400px;
    z-index: 10002;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    border-left: 4px solid var(--turquoise);
}

.notification-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-toast.notification-success {
    border-left-color: #28a745;
}

.notification-toast.notification-warning {
    border-left-color: #ffc107;
}

.notification-toast.notification-error {
    border-left-color: #dc3545;
}

.notification-toast.notification-info {
    border-left-color: var(--turquoise);
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 1.2em;
}

.notification-success .toast-icon {
    background: #28a745;
}

.notification-warning .toast-icon {
    background: #ffc107;
}

.notification-error .toast-icon {
    background: #dc3545;
}

.notification-info .toast-icon {
    background: var(--turquoise);
}

.toast-content {
    flex: 1;
}

.toast-content strong {
    display: block;
    color: var(--navy);
    margin-bottom: 5px;
    font-size: 0.95em;
}

.toast-content p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
    align-self: flex-start;
}

.toast-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Responsive Notification Panel */
@media (max-width: 768px) {
    .notification-panel {
        width: calc(100vw - 40px);
        right: -20px;
        max-height: 70vh;
    }
    
    .notification-toast {
        min-width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }
}

/* Tools Menu */
.tools-menu {
    position: relative;
    flex-shrink: 0;
}

.tools-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1em;
}

.tools-btn:hover {
    background: #f0f0f0;
    border-color: var(--turquoise);
    color: var(--navy);
    transform: rotate(90deg);
}

.tools-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: none;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

.tools-dropdown.active {
    display: block;
}

.tools-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.95em;
}

.tools-item:hover {
    background: #f0f0f0;
    color: var(--navy);
}

.tools-item i {
    width: 20px;
    text-align: center;
    color: var(--turquoise);
    font-size: 1.1em;
}

.tools-item span {
    flex: 1;
}

.tools-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 5px 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 25px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.user-profile:hover {
    background: #f0f0f0;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-profile span {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

/* Page Content */
.page-content {
    padding: 30px;
}

.page {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5em;
}

.kpi-content h3 {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.kpi-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--navy);
    margin: 5px 0;
}

.kpi-change {
    font-size: 0.85em;
    color: #666;
}

.kpi-change.positive {
    color: var(--green);
}

.kpi-change.negative {
    color: var(--red);
}

.kpi-change.warning {
    color: var(--yellow);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chart-card h3 {
    color: var(--navy);
    margin-bottom: 20px;
    font-size: 1.2em;
}

.chart-card canvas {
    max-height: 300px;
}

.risk-summary {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.risk-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.risk-label {
    font-weight: 500;
    color: #666;
}

.risk-value {
    font-size: 1.5em;
    font-weight: bold;
}

/* Activity Card */
.activity-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.activity-card h3 {
    color: var(--navy);
    margin-bottom: 20px;
    font-size: 1.2em;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.activity-item i {
    font-size: 1.5em;
}

.activity-content p {
    margin-bottom: 5px;
    color: #333;
}

.activity-time {
    font-size: 0.85em;
    color: #999;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-header h2 {
    color: var(--navy);
    font-size: 1.8em;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--navy);
    color: white;
}

.btn-primary:hover {
    background: #163a5a;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--turquoise);
    color: white;
}

.btn-secondary:hover {
    background: #26b3a7;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--navy);
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
}

.data-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table td {
    padding: 15px;
    color: #666;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    display: inline-block;
}

.status-green {
    background: rgba(0, 255, 0, 0.1);
    color: #00aa00;
}

.status-yellow {
    background: rgba(255, 255, 0, 0.1);
    color: #ccaa00;
}

.status-red {
    background: rgba(255, 0, 0, 0.1);
    color: #cc0000;
}

.status-blue {
    background: rgba(31, 78, 120, 0.1);
    color: var(--navy);
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.report-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s;
}

.report-card:hover {
    transform: translateY(-5px);
}

.report-card i {
    font-size: 3em;
    color: var(--turquoise);
    margin-bottom: 15px;
}

.report-card h3 {
    color: var(--navy);
    margin-bottom: 10px;
}

.report-card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }
    
    .header {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-left {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .header-right {
        width: 100%;
        gap: 10px;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .search-box {
        flex: 1;
        min-width: 150px;
    }
    
    .search-box input {
        width: 100%;
        max-width: 200px;
    }
    
    .currency-selector {
        order: 1;
    }
    
    .search-box {
        order: 2;
        flex: 1;
    }
    
    .notifications {
        order: 3;
    }
    
    .user-profile {
        order: 4;
    }
    
    .user-profile span {
        display: none;
    }
    
    .tools-dropdown {
        width: calc(100vw - 40px);
        right: -20px;
    }
    
    .kpi-grid,
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .page-content {
        padding: 15px;
    }
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.action-btn.edit {
    background: var(--turquoise);
    color: white;
}

.action-btn.delete {
    background: var(--red);
    color: white;
}

.action-btn:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--navy);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: white;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--navy);
    font-weight: 500;
    font-size: 0.95em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--turquoise);
    box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--turquoise);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* Project Monitoring Styles */
.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.monitor-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.monitor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.monitor-header h3 {
    color: var(--navy);
    margin: 0;
    font-size: 1.3em;
}

.monitor-progress {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar.large {
    height: 35px;
}

.progress-fill {
    height: 100%;
    border-radius: 15px;
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.monitor-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 0.9em;
}

.detail-item i {
    color: var(--turquoise);
    width: 20px;
}

.monitor-actions {
    display: flex;
    gap: 10px;
}

.monitoring-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.summary-card h3 {
    color: var(--navy);
    margin-bottom: 15px;
    font-size: 1.1em;
}

.summary-progress {
    margin-top: 15px;
}

.summary-text {
    display: block;
    margin-top: 10px;
    font-weight: 600;
    color: var(--navy);
}

.summary-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--turquoise);
    margin: 10px 0;
}

.summary-label {
    color: #666;
    font-size: 0.9em;
}

/* Filter Tabs (CCPS-inspired) */
.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.filter-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-tab:hover {
    background: #f0f0f0;
    color: var(--navy);
}

.filter-tab.active {
    background: var(--navy);
    color: white;
    border-bottom: 3px solid var(--turquoise);
}

.portfolio-search {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start;
}

.volunteer-badge {
    color: var(--turquoise);
    margin-left: 8px;
    font-size: 0.9em;
}

.view-details-btn {
    background: none;
    border: none;
    color: var(--turquoise);
    cursor: pointer;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.view-details-btn:hover {
    background: rgba(46, 196, 182, 0.1);
}

.volunteer-count {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 0.85em;
    margin-right: 8px;
}

.btn-apply {
    background: var(--turquoise);
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.btn-apply:hover {
    background: #26b3a7;
    transform: scale(1.05);
}

.project-detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.project-detail-section:last-child {
    border-bottom: none;
}

.project-detail-section h3 {
    color: var(--navy);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-detail-section h3 i {
    color: var(--turquoise);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.9em;
}

.detail-item span {
    color: #333;
}

/* Export Dropdown Styles */
.export-dropdown {
    position: relative;
    display: inline-block;
}

.export-dropdown .export-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 1000;
    margin-top: 5px;
    overflow: hidden;
}

.export-dropdown:hover .export-menu {
    display: block;
}

.export-dropdown .export-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
}

.export-dropdown .export-menu a:hover {
    background: #f5f5f5;
}

.export-dropdown .export-menu a i {
    width: 20px;
    color: var(--navy);
}

.export-dropdown .export-menu a:first-child i {
    color: #dc3545;
}

.export-dropdown .export-menu a:nth-child(2) i {
    color: #2b579a;
}

.export-dropdown .export-menu a:nth-child(3) i {
    color: #217346;
}

/* Export Buttons in Reports */
.export-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-export {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.btn-export.pdf {
    background: #dc3545;
}

.btn-export.pdf:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-export.word {
    background: #2b579a;
}

.btn-export.word:hover {
    background: #1e3f6e;
    transform: translateY(-2px);
}

.btn-export.excel {
    background: #217346;
}

.btn-export.excel:hover {
    background: #1a5a37;
    transform: translateY(-2px);
}

/* Analytics Section */
.analytics-section {
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.analytics-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.analytics-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--turquoise);
}

.analytics-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 2em;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.analytics-card h3 {
    color: var(--navy);
    margin-bottom: 10px;
    font-size: 1.3em;
}

.analytics-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.analytics-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.analytics-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* Export Section */
.export-section {
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Analytics Modal */
.analytics-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.analytics-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

.analytics-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, var(--navy), var(--turquoise));
    color: white;
    border-radius: 12px 12px 0 0;
}

.analytics-modal-header h3 {
    margin: 0;
    font-size: 1.5em;
}

.close-modal {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.analytics-modal-body {
    padding: 30px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Reset Options Modal */
.reset-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.reset-option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    width: 100%;
}

.reset-option-btn:hover {
    border-color: var(--turquoise);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.reset-option-btn.danger {
    border-color: #dc3545;
}

.reset-option-btn.danger:hover {
    background: #fff5f5;
    border-color: #c82333;
}

.reset-option-btn.warning {
    border-color: #ffc107;
}

.reset-option-btn.warning:hover {
    background: #fffbf0;
    border-color: #e0a800;
}

.reset-option-btn.info {
    border-color: var(--turquoise);
}

.reset-option-btn.info:hover {
    background: #f0fdfc;
    border-color: var(--navy);
}

.reset-option-btn i {
    font-size: 2em;
    width: 50px;
    text-align: center;
}

.reset-option-btn.danger i {
    color: #dc3545;
}

.reset-option-btn.warning i {
    color: #ffc107;
}

.reset-option-btn.info i {
    color: var(--turquoise);
}

.reset-option-btn div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.reset-option-btn strong {
    font-size: 1.1em;
    color: var(--navy);
    display: block;
}

.reset-option-btn span {
    font-size: 0.9em;
    color: #666;
    display: block;
}

/* Risk Heat Map Styles */
.heatmap-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-top: 20px;
}

.heatmap-visualization {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
}

#heatmapCanvas {
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    max-width: 100%;
    height: auto;
}

.heatmap-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    color: var(--navy);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
    line-height: 1.6;
}

.info-card li:last-child {
    border-bottom: none;
}

.info-card li strong {
    color: var(--navy);
}

.risk-summary {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.risk-summary h3 {
    color: var(--navy);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#riskSummaryStats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.summary-stat {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.summary-stat-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--navy);
    display: block;
}

.summary-stat-label {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.summary-stat.red .summary-stat-value {
    color: var(--red);
}

.summary-stat.yellow .summary-stat-value {
    color: var(--yellow);
}

.summary-stat.green .summary-stat-value {
    color: var(--green);
}

@media (max-width: 1024px) {
    .heatmap-container {
        grid-template-columns: 1fr;
    }
    
    .heatmap-visualization {
        overflow-x: auto;
    }
    
    #heatmapCanvas {
        min-width: 600px;
    }
}

/* Responsive Design for Export */
@media (max-width: 768px) {
    .export-buttons {
        flex-direction: column;
    }
    
    .btn-export {
        width: 100%;
        justify-content: center;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-actions {
        flex-direction: column;
    }
    
    .analytics-actions .btn {
        width: 100%;
    }
    
    .analytics-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .analytics-modal-body {
        padding: 20px;
    }
}

