/* frontend/assets/css/style.css */

:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --dark-color: #5a5c69;
    --light-color: #f8f9fc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    background-color: var(--light-color);
    overflow-x: hidden;
}

/* Navbar Styles */
.navbar {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #224abe 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" fill-opacity="1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.5;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* Feature Cards */
.feature-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
}

/* Step Circles */
.step-circle {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 1rem;
    transition: transform 0.3s ease;
}

.step-circle:hover {
    transform: scale(1.1);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    width: 250px;
    background: white;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: var(--dark-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    color: var(--primary-color);
    background: linear-gradient(90deg, rgba(78, 115, 223, 0.1) 0%, rgba(78, 115, 223, 0) 100%);
    border-left: 3px solid var(--primary-color);
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 1.5rem;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding-top: 60px;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background: white;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.35rem;
    font-weight: 700;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 700;
    color: var(--dark-color);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2e59d9;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2e59d9;
}

/* Loading Spinner */
.spinner-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Progress Bars */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
}

.progress-bar {
    background-color: var(--primary-color);
}

/* Badges */
.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 10px;
}

.modal-header {
    border-bottom: 1px solid #e3e6f0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #224abe 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Donation Form */
.donation-amount {
    cursor: pointer;
    transition: all 0.3s ease;
}

.donation-amount:hover,
.donation-amount.active {
    background-color: var(--primary-color);
    color: white;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding-top: 0 !important;
    }
}
/* frontend/assets/css/style.css - Add these styles at the end */

/* ========== FIX FOR ADMIN DASHBOARD CUT ISSUE ========== */

/* Main Content Area Fix */
.main-content {
    margin-left: 260px;
    padding: 20px;
    min-height: 100vh;
    width: calc(100% - 260px);
    overflow-x: auto;
    background: #f8f9fc;
}

/* Fix for container-fluid */
.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Card Fixes */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    margin-bottom: 1.5rem;
    width: 100%;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 0.75rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
    overflow-x: auto;
}

/* Chart Container Fix */
#donationsChart, #sourcesChart {
    width: 100%;
    min-height: 300px;
}

/* Table Responsive Fix */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    margin-bottom: 0;
    min-width: 300px;
}

/* Stats Cards Fix */
.border-left-primary { border-left: 0.25rem solid #4e73df !important; }
.border-left-success { border-left: 0.25rem solid #1cc88a !important; }
.border-left-info { border-left: 0.25rem solid #36b9cc !important; }
.border-left-warning { border-left: 0.25rem solid #f6c23e !important; }

/* Mobile Responsive Fixes */
@media (max-width: 992px) {
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .h5, h5 {
        font-size: 1rem;
    }
    
    .text-xs {
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 10px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 0.5rem 1rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    /* Stack charts on mobile */
    .row.mb-4 > [class*="col-"] {
        margin-bottom: 1rem;
    }
    
    #donationsChart, #sourcesChart {
        min-height: 250px;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 8px;
    }
    
    .card-header h6 {
        font-size: 0.9rem;
    }
    
    .table td, .table th {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}

/* Fix for sidebar on mobile */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        position: fixed;
        z-index: 1050;
        width: 260px;
        height: 100%;
        overflow-y: auto;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    /* Add sidebar toggle button */
    .sidebar-toggle-btn {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1040;
        background: #4e73df;
        color: white;
        border: none;
        border-radius: 8px;
        padding: 8px 12px;
        cursor: pointer;
    }
}

/* Fix for charts not overflowing */
.apexcharts-canvas {
    width: 100% !important;
}

.apexcharts-legend {
    flex-wrap: wrap !important;
}

/* Notification toast fix */
.alert.position-fixed {
    z-index: 9999;
    max-width: 90%;
    right: 10px !important;
    left: auto !important;
}

@media (max-width: 576px) {
    .alert.position-fixed {
        max-width: 95%;
        right: 5px !important;
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
}