:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.sidebar {
    background: #3498db;
    color: white;
    padding: 1rem 0;
    height: 100vh;
    position: fixed;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}

.dropdown-menu {
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.dropdown-header {
    font-size: 0.95rem;
    color: #0d6efd;
}


#sidebar.collapsed {
  display: none; /* or slide it away using transform, etc. */
    width: 70px;
}
.toggle-sidebar {
    background: transparent;
    border: none;
    color: #7f8c8d;
    font-size: 1.25rem;
    cursor: pointer;
}

.sidebar-header {
    padding: 0.5rem 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-menu {
    padding: 15px 0;
}

.menu-group {
    margin-bottom: 0.25rem;
}

.menu-group-title {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    color: #fff;
    font-weight: 500;
}


.menu-group-title i:first-child {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    color: #fff;
}

.menu-group-title .dropdown-arrow {
    margin-left: auto;
    transition: transform 0.3s;
    font-size: 0.8rem;
    color: #fff;
}

.submenu {
    display: none;
    margin-left: 1.5rem;
    padding-left: 1.5rem;
    list-style: none;
    border-left: 1px solid #eee;
}

.submenu .nav-item {
    margin: 0.25rem 0;
}

.submenu .nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.submenu .nav-link:hover {
    color: #2c3e50;
    background-color: #f8f9fa;
}

.submenu .nav-link.active {
    color: #fff;
    background-color: #3498db;
    font-weight: 500;
}

.submenu .nav-link i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* Active state for parent menu items */
.menu-group-title.active {
    background-color: #f8f9fa;
}

/* Animation for dropdown */
.submenu {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    margin: 0 10px;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.name-title{
    color:#fff;
    text-decoration: none;
}
.main-content {
    margin-left: 250px;
    transition: all 0.3s;
}

.main-content.expanded {
    margin-left: 0;
}

.topbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.card {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: none;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}


.text-purple { color: #6f42c1 !important; }
.bg-purple { background-color: #6f42c1 !important; }
.text-teal { color: #20c997 !important; }
.bg-teal { background-color: #20c997 !important; }

.stat-card {
    text-align: center;
    padding: 5px;
}

.stat-card .number {
    font-size: 2.3rem;
    font-weight: 700;
    margin: 6px 0;
}

.stat-card .title {
    font-size: 0.95rem;
    color: #6c757d;
}

/* Mobile-specific adjustments */
@media (max-width: 576px) {
    .stat-card {
        padding: 0.5rem !important;
    }
    .stat-card .number {
        font-size: 1.6rem !important;
        margin: 4px 0 !important;
    }
    .stat-card .title {
        font-size: 0.9rem !important;
    }
    .stat-card i {
        font-size: 1.4rem !important;
    }
}

/* Dashboard Enhancements for MDB Components */
.bg-gradient-primary {
    background: linear-gradient(135deg, #0d6efd, #4dabf7);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #198754, #51cf66);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #0dcaf0, #22b8cf);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107, #ffd43b);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #6c757d, #9ca3af);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #dc3545, #ef4444);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #212529, #495057);
}

/* Enhanced card shadows for MDB */
.shadow-4 {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15) !important;
}

/* Avatar styles for beneficiary cards */
.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* Chart container enhancements */
.chart-container {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    min-height: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    height: 350px;
}

.chart-container canvas {
    max-height: 300px;
}

/* Responsive chart containers */
@media (max-width: 768px) {
    .chart-container {
        height: auto;
        min-height: 300px;
    }
}
}

.bg-primary-subtle { background-color: rgba(13, 110, 253, 0.08); }
.bg-success-subtle { background-color: rgba(25, 135, 84, 0.08); }
.bg-info-subtle { background-color: rgba(13, 202, 240, 0.08); }
.bg-warning-subtle { background-color: rgba(255, 193, 7, 0.12); }
.bg-purple-subtle { background-color: rgba(111, 66, 193, 0.08); }
.bg-teal-subtle { background-color: rgba(32, 201, 151, 0.08); }

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-meta {
    font-size: 0.8rem;
}

@media (max-width: 576px) {
    .stat-card-horizontal .card-body {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.35rem;
    }
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Chart container fixes */
.chart-container {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    min-height: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    height: 350px; /* Fixed height */
}

.chart-container canvas {
    max-height: 300px; /* Limit chart height */
}

/* Ensure charts don't overflow */
.chart-wrapper {
    position: relative;
    width: 100%;
    height: 350px; /* keeps consistent height */
}

/* Responsive chart containers */
@media (max-width: 768px) {
    .chart-container {
        height: auto;
        min-height: 300px;
    }
    
    .chart-wrapper {
        height: 250px;
    }
}

.gantt-container {
    overflow-x: auto;
}

.gantt-header {
    display: flex;
    border-bottom: 1px solid #dee2e6;
    padding: 10px 0;
}

.gantt-task {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.gantt-task-name {
    width: 200px;
    padding: 5px;
    font-weight: 500;
}

.gantt-timeline {
    flex: 1;
    position: relative;
    height: 30px;
}

.gantt-bar {
    position: absolute;
    height: 20px;
    border-radius: 10px;
    top: 5px;
}

.table-responsive {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.badge-status {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
}

.badge-planned {
    background-color: #ffc107;
    color: #212529;
}

.badge-ongoing {
    background-color: #17a2b8;
    color: white;
}

.badge-completed {
    background-color: #28a745;
    color: white;
}

.theme-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 500;
}

.theme-agriculture { background-color: #27ae60; color: white; }
.theme-women { background-color: #e74c3c; color: white; }
.theme-nutrition { background-color: #f39c12; color: white; }
.theme-environment { background-color: #3498db; color: white; }

.indicator-table th {
    background-color: #f8f9fa;
}

.form-control, .form-select {
    border-radius: 8px;
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    border-radius: 8px;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.toggle-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .sidebar.collapsed {
        width: 250px;
    }
    
    .main-content.expanded {
        margin-left: 250px;
    }
}

.beneficiarybreakdown{
   justify-content: center;
}

/* Hide admin-only elements by default, will be shown for admins */
.admin-only {
    display: none;
}

/* Style for disabled buttons */
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Role-specific styling */
.role-admin { background-color: #f8d7da; }
.role-me { background-color: #d1ecf1; }
.role-viewer { background-color: #d4edda; }

/* Visual indicator for user roles in table */
    .role-badge {
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    .badge-admin { background-color: #dc3545; color: white; }
    .badge-me { background-color: #0dcaf0; color: black; }
    .badge-viewer { background-color: #198754; color: white; }

    /* Viewer-specific styles */
.viewer-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.viewer-hidden {
    display: none !important;
}

/* Visual indicator that user is in view-only mode */
.viewer-mode-banner {
    background-color: #e9ecef;
    border-left: 4px solid #6c757d;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

/* Reports styles */
.report-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.section-header {
    color: #0d6efd;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #0d6efd;
}

.summary-card {
    transition: transform 0.2s;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.table th {
    background-color: #06894e;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-bar .row > div {
        margin-bottom: 1rem;
    }
}


/* Toast notifications */
.toast-container {
    z-index: 1060;
}

.toast {
    opacity: 1;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .filter-bar, .btn-group {
        display: none !important;
    }
    
    .report-section {
        page-break-inside: avoid;
    }
    
    .card {
        border: 1px solid #ddd !important;
    }
}
.indicator-table, 
.project-table,
.activity-table,
.beneficiary-table, 
th{
      color: #fff !important;
}

.header-logo{
    width:100%;
    height: 80px;
}


    .tab-button {
      padding: 10px 20px;
      cursor: pointer;
      border: none;
      outline: none;
      background: #e9ecef;
      color: #333;
      font-weight: 500;
      transition: background 0.3s;
    }

    .tab-button.active {
      background: #007bff;
      color: #fff;
      border-bottom: 2px solid #0056b3;
    }

    /* Add any custom styles for donor management */
.input-group .btn-outline-secondary {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Profile Modal Styles */
#profileModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#profileModal .modal-title {
    font-weight: 600;
}

#profileModal .border-bottom {
    border-color: #667eea !important;
}

#profileModal .alert-info {
    background-color: #e3f2fd;
    border-color: #bbdefb;
    color: #1565c0;
}

#profileModal .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

#profileModal .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}


/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1050;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
    
    /* Overlay for mobile */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    /* Adjust topbar for mobile */
    .topbar {
        padding: 10px 15px;
    }
    
    /* Mobile menu button */
    .mobile-menu-btn {
        display: block !important;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #2c3e50;
        margin-right: 15px;
    }
    
    /* Adjust dashboard grid for mobile */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        height: 120px;
    }
    
    .stat-card .number {
        font-size: 1.8rem;
    }
    
    /* Filter bar adjustments */
    .filter-bar .row > div {
        margin-bottom: 10px;
    }
    
    /* Chart adjustments */
    .chart-container {
        height: auto;
        min-height: 300px;
        padding: 15px;
    }
    
    .chart-wrapper {
        height: 250px;
    }
}

/* Desktop styles */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }
    
    .sidebar-overlay {
        display: none !important;
    }
}

/* Ensure sidebar doesn't collapse on desktop when toggled */
@media (min-width: 769px) {
    .sidebar.collapsed {
        width: 70px;
    }
    
    .sidebar.collapsed .menu-group-title span,
    .sidebar.collapsed .nav-link span {
        display: none;
    }
    
    .sidebar.collapsed .submenu {
        display: none !important;
    }
    
    .main-content.expanded {
        margin-left: 70px;
    }
}

/* Improve touch targets for mobile */
.nav-link {
    padding: 15px 20px;
    min-height: 44px; /* Minimum touch target size */
}

.menu-group-title {
    padding: 15px 20px;
    min-height: 44px;
}

/* Prevent zoom on form inputs for mobile */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Better button sizing for mobile */
.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tabs{
    color: #000;
}

/* Reports Styles */
.empty-state .empty-icon {
    opacity: 0.6;
}

.sticky-top {
    top: 20px !important;
}

/* Executive Summary Cards - Modern Professional Design */
.executive-summary-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
}

.executive-icon-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.section-title {
    color: #495057;
    margin-bottom: 0.25rem;
}

.executive-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1rem !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.executive-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

.executive-icon {
    transition: all 0.3s ease;
    border-radius: 50%;
}

.executive-card:hover .executive-icon {
    transform: scale(1.1);
}

.executive-number {
    font-size: 2.2rem !important;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.executive-card:hover .executive-number {
    transform: scale(1.05);
}

.executive-label {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.9;
}

/* Special styling for pastel card */
.executive-card[style*="a8edea"] .executive-number,
.executive-card[style*="fed6e3"] .executive-number {
    color: #495057 !important;
    text-shadow: none;
}

.executive-card[style*="a8edea"] .executive-label,
.executive-card[style*="fed6e3"] .executive-label {
    color: #495057 !important;
}

/* Progress bar styling */
.executive-card .progress {
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.2);
}

.executive-card .progress-bar {
    border-radius: 3px;
}

/* Executive footer */
.executive-footer {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .executive-number {
        font-size: 1.8rem !important;
    }

    .executive-card:hover {
        transform: translateY(-4px);
    }

    .executive-icon-wrapper {
        width: 50px;
        height: 50px;
    }

    .executive-icon-wrapper i {
        font-size: 1.25rem;
    }
}

/* Executive Summary Cards - Modern Professional Design */
.executive-summary-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1rem !important;
    overflow: hidden;
}

.executive-summary-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

.summary-icon-container {
    position: relative;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.executive-summary-card:hover .summary-icon-container {
    transform: scale(1.1);
    border-color: rgba(255,255,255,0.4);
}

.summary-accent-bar {
    height: 4px;
    border-radius: 2px;
    background: currentColor;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.executive-summary-card:hover .summary-accent-bar {
    opacity: 1;
    transform: scaleX(1.2);
}

.summary-number {
    font-size: 2.2rem !important;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.executive-summary-card:hover .summary-number {
    transform: scale(1.05);
}

.summary-label {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.9;
}

/* Header decorative elements */
.header-decoration {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    pointer-events: none;
}

/* Card background gradients */
.card-bg-primary { background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%); }
.card-bg-danger { background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%); }
.card-bg-secondary { background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%); }
.card-bg-success { background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%); }
.card-bg-warning { background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%); }
.card-bg-total { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }

/* Progress bar styling */
.summary-progress {
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.2);
}

.summary-progress .progress-bar {
    border-radius: 3px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .summary-number {
        font-size: 1.8rem !important;
    }

    .executive-summary-card:hover {
        transform: translateY(-4px);
    }
}
