/* Custom Graph Styles */
.custom-graph {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 50%, #16213e 100%);
    border-radius: 12px;
    padding: 20px;
    min-height: 300px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.graph-container {
    position: relative;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bar Graph Styles */
.graph-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    width: 100%;
    height: 200px;
    gap: 15px;
}

.bar {
    position: relative;
    width: 40px;
    background: linear-gradient(180deg, #0066cc, #004499);
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.bar:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.5);
}

.bar-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #ffffff;
    font-weight: 600;
}

.bar-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: #ffffff;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bar:hover .bar-value {
    opacity: 1;
}

/* Radar Graph Styles */
.radar-graph {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.radar-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radar-item:hover {
    transform: scale(1.1);
}

.radar-label {
    font-size: 10px;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.radar-value {
    font-size: 12px;
    color: #00ff88;
    font-weight: bold;
}

/* World Map Graph Styles */
.world-map-graph {
    position: relative;
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #0f3460 0%, #16537e 50%, #1e5f8e 100%);
    border-radius: 8px;
    overflow: hidden;
}

.country-point {
    position: absolute;
    cursor: pointer;
    transition: all 0.3s ease;
}

.point-marker {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #ff6b6b, #ee5a24);
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
    animation: pulse 2s infinite;
}

.point-label {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.country-point:hover .point-label {
    opacity: 1;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Line Graph Styles */
.line-graph {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.line-graph svg {
    width: 100%;
    height: 100%;
}

.line-graph circle {
    transition: all 0.3s ease;
    cursor: pointer;
}

.line-graph circle:hover {
    r: 8;
    fill: #ff6b6b;
}

/* Admin Dashboard CSS - MSCASDA - Enhanced Version */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --secondary-color: #004499;
    --accent-color: #0066cc;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 280px;
    --header-height: 70px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Enhanced Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-header img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
}

.sidebar-header h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.sidebar-header p {
    font-size: 0.85rem;
    opacity: 0.8;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 500;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--accent-color);
    transform: translateX(5px);
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: var(--accent-color);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.menu-item i {
    margin-right: 12px;
    font-size: 1.2rem;
}

/* Enhanced Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: #f5f7fa;
}

/* Sticky Header */
.top-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header-left {
    display: flex;
    align-items: center;
}

.header-left h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
}

.header-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-right {
    display: flex;
    align-items: center;
}

.header-right span {
    color: #666;
    font-size: 0.9rem;
}

.logout-btn {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c82333 100%);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    cursor: pointer;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* Welcome Section (Non-sticky) */
.welcome-section {
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.welcome-section p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

/* Non-sticky content area */
.dashboard-content {
    padding: 30px;
    margin-top: 0;
}

/* Enhanced Dashboard Content */
.dashboard-content {
    padding: 30px;
}

.content-section {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.content-section.active {
    display: block;
}

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

/* Enhanced Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0.05;
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.stat-change {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 20px;
    display: inline-block;
}

.stat-change.positive {
    background: #d4edda;
    color: #155724;
}

.stat-change.negative {
    background: #f8d7da;
    color: #721c24;
}

/* Enhanced Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.chart-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* Enhanced Analytics Overview */
.analytics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.overview-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.overview-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.overview-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.country-list,
.page-list,
.visitor-list,
.search-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.country-item,
.page-item,
.visitor-item,
.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--light-color);
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.country-item:hover,
.page-item:hover,
.visitor-item:hover,
.search-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.country-flag {
    font-size: 1.3rem;
    margin-right: 10px;
}

.country-name,
.page-name,
.visitor-name,
.search-term {
    flex: 1;
    font-weight: 500;
    color: var(--dark-color);
}

.country-visits,
.page-views,
.visitor-location,
.search-count {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(0, 102, 204, 0.1);
    padding: 4px 8px;
    border-radius: 15px;
}

.visitor-time {
    color: #666;
    font-size: 0.8rem;
}

.search-term {
    font-style: italic;
}

/* Mobile Toggle Button */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

/* RGB Recognizer Section */
.rgb-recognizer {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.rgb-recognizer h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.rgb-scanner {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.rgb-display {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff0000, #00ff00, #0000ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.rgb-values {
    flex: 1;
}

.rgb-value {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.rgb-value span {
    width: 60px;
    font-weight: 600;
}

.rgb-bar {
    flex: 1;
    height: 20px;
    border-radius: 10px;
    margin-left: 10px;
    transition: width 0.3s ease;
}

.rgb-bar.red { background: linear-gradient(90deg, #ff0000, #ff6666); }
.rgb-bar.green { background: linear-gradient(90deg, #00ff00, #66ff66); }
.rgb-bar.blue { background: linear-gradient(90deg, #0000ff, #6666ff); }

/* Security Monitoring Styles */
.security-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.security-stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.security-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 102, 204, 0.2);
}

.security-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.security-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.security-header h3 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.security-controls {
    display: flex;
    gap: 10px;
}

.security-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.security-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.security-table th {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.security-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.security-table tr:hover {
    background: rgba(0, 102, 204, 0.05);
}

.face-scans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.face-scan-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.face-scan-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.face-scan-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.face-scan-item .scan-info {
    font-size: 0.8rem;
    color: #666;
}

.security-settings {
    display: grid;
    gap: 20px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #333;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.setting-item input[type="number"] {
    width: 80px;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 0.9rem;
}

.setting-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.status-badge.failed {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.status-badge.pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .analytics-overview {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .header-center h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .top-header {
        padding: 0 20px;
        flex-wrap: wrap;
        height: auto;
        min-height: var(--header-height);
    }
    
    .header-left {
        order: 1;
        width: 100%;
        justify-content: flex-start;
        margin-bottom: 10px;
    }
    
    .header-center {
        order: 2;
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .header-right {
        order: 3;
        width: 100%;
        justify-content: flex-end;
    }
    
    .welcome-section {
        padding: 15px 20px;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .analytics-overview {
        grid-template-columns: 1fr;
    }
    
    .country-item,
    .page-item,
    .visitor-item,
    .search-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .country-visits,
    .page-views,
    .visitor-location,
    .search-count {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
        min-height: auto;
    }
    
    .header-left {
        order: 1;
        width: 100%;
        justify-content: center;
        margin-bottom: 5px;
    }
    
    .header-center {
        order: 2;
        width: 100%;
        justify-content: center;
        margin-bottom: 5px;
    }
    
    .header-right {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .header-center h1 {
        font-size: 1.3rem;
    }
    
    .welcome-section {
        padding: 10px 15px;
    }
    
    .dashboard-content {
        padding: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .overview-card {
        padding: 20px;
    }
    
    .chart-card {
        padding: 20px;
    }
    
    .logout-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

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

/* Smooth Transitions */
* {
    transition: all 0.3s ease;
}

.logout-btn {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c82333 100%);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    cursor: pointer;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar-header p {
    margin: 5px 0 0 0;
    font-size: 0.8rem;
    opacity: 0.8;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    margin-bottom: 5px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: white;
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.2);
    border-left-color: white;
}

.menu-item i {
    margin-right: 10px;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Top Header */
.top-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-title h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.header-title p {
    color: #666;
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logout-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

.logout-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Dashboard Content */
.dashboard-content {
    padding: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.stat-change {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 10px;
}

.stat-change.positive {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.stat-change.negative {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

/* Charts Section */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.chart-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}

.chart-options {
    display: flex;
    gap: 10px;
}

.chart-option {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.chart-option.active,
.chart-option:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.chart-container {
    height: 300px;
    position: relative;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

/* Recent Activity */
.activity-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.activity-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}

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

.activity-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.activity-item:hover {
    background: #f8f9fa;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2rem;
}

.activity-content {
    flex: 1;
}

.activity-text {
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.activity-time {
    color: #999;
    font-size: 0.8rem;
}

/* Section Styles */
.content-section {
    display: block;
}

.section-header {
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-header p {
    color: #666;
    font-size: 1rem;
}

/* Children Management Styles */
.children-container {
    margin-top: 30px;
}

.children-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.children-filters select,
.children-filters input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.children-filters select:focus,
.children-filters input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.children-filters input {
    flex: 1;
    min-width: 200px;
}

.children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* Staff Management Styles */
.staff-container {
    margin-top: 30px;
}

.staff-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.staff-filters select,
.staff-filters input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.staff-filters select:focus,
.staff-filters input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.staff-filters input {
    flex: 1;
    min-width: 200px;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* Messages Section */
.messages-container {
    display: grid;
    gap: 20px;
}

.message-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.message-stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.messages-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.message-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.message-item:hover {
    background: #f8f9fa;
}

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

.message-name {
    font-weight: 600;
    color: #333;
}

.message-email {
    color: #666;
    font-size: 0.9rem;
}

.message-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.message-status.unread {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.message-status.read {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
}

.message-status.replied {
    background: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
}

.message-subject {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.message-preview {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.message-time {
    color: #999;
    font-size: 0.8rem;
}

/* Analytics Section */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.analytics-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.analytics-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.analytics-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.analytics-label {
    color: #333;
    font-weight: 500;
}

.analytics-value {
    color: var(--primary-color);
    font-weight: bold;
}

/* Story Publishing Styles */
.story-publish-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.story-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.story-form h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.story-form .form-group {
    margin-bottom: 20px;
}

.story-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: bold;
}

.story-form input,
.story-form select,
.story-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.story-form input:focus,
.story-form select:focus,
.story-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.story-form textarea {
    resize: vertical;
    min-height: 200px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.published-stories {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.published-stories h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.stories-list {
    max-height: 600px;
    overflow-y: auto;
}

.story-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
}

.story-item h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
}

.story-item .story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    color: #666;
}

.story-item .story-excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.story-item .story-actions {
    display: flex;
    gap: 10px;
}

.story-item .story-actions button {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.edit-btn {
    background: var(--info-color);
    color: white;
}

.delete-btn {
    background: var(--danger-color);
    color: white;
}

.view-btn {
    background: var(--success-color);
    color: white;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Staff Management Styles */
.staff-container {
    margin-top: 30px;
}

.staff-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.staff-filters select,
.staff-filters input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.staff-filters select:focus,
.staff-filters input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.staff-filters input {
    flex: 1;
    min-width: 200px;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.staff-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--success-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.staff-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--success-color), var(--info-color));
    opacity: 0.1;
}

.staff-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.staff-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid var(--success-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.staff-info h4 {
    margin: 0 0 8px 0;
    color: var(--success-color);
    font-size: 16px;
    font-weight: 600;
}

.staff-info p {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 14px;
}

.staff-details {
    margin-bottom: 15px;
}

.staff-details p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.staff-role {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.role-fulltime {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.role-volunteer {
    background: linear-gradient(135deg, #cce5ff 0%, #b3d9ff 100%);
    color: #004085;
}

.role-medical {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.role-education {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.role-admin {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #004085;
}

.role-media {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #004085;
}

.role-finance {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.staff-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.staff-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.edit-staff-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.delete-staff-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.view-staff-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.staff-contact-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.staff-contact-info strong {
    color: #333;
    font-weight: 600;
}

.staff-stats {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.staff-stat {
    text-align: center;
    flex: 1;
}

.stat-number {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

/* Enhanced Children Cards */
.child-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.child-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.child-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.child-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid var(--primary-color);
}

.child-info h4 {
    margin: 0 0 5px 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.child-info .child-meta {
    color: #666;
    font-size: 0.9rem;
}

.child-program-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

.program-education { background: #28a745; }
.program-football { background: #007bff; }
.program-medical { background: #dc3545; }
.program-rescue { background: #ffc107; color: #333; }
.program-outreach { background: #6f42c1; }

.child-details {
    margin-bottom: 15px;
}

.child-story {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.child-needs {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 15px;
}

.child-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.child-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.edit-child-btn {
    background: #17a2b8;
    color: white;
}

.delete-child-btn {
    background: #dc3545;
    color: white;
}

.view-child-btn {
    background: #28a745;
    color: white;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,102,204,0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Analytics Overview Styles */
.analytics-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.overview-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-color);
}

.overview-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.country-list,
.page-list,
.visitor-list,
.search-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.country-item,
.page-item,
.visitor-item,
.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--light-color);
    border-radius: 8px;
    font-size: 0.9rem;
}

.country-flag {
    font-size: 1.2rem;
    margin-right: 8px;
}

.country-name,
.page-name,
.visitor-name,
.search-term {
    flex: 1;
    font-weight: 500;
    color: var(--dark-color);
}

.country-visits,
.page-views,
.visitor-location,
.search-count {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
}

.visitor-time {
    color: #666;
    font-size: 0.8rem;
}

.search-term {
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .analytics-overview {
        grid-template-columns: 1fr;
    }
    
    .country-item,
    .page-item,
    .visitor-item,
    .search-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .country-visits,
    .page-views,
    .visitor-location,
    .search-count {
        align-self: flex-end;
    }
}
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: block;
    }

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

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-content {
        padding: 20px 15px;
    }

    .top-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .story-publish-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .child-card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .child-avatar {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .children-grid {
        grid-template-columns: 1fr;
    }
    
    .children-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .children-filters input {
        min-width: auto;
    }
    
    .staff-grid {
        grid-template-columns: 1fr;
    }
    
    .staff-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .staff-filters input {
        min-width: auto;
    }

/* Staff Statistics */
.staff-stats {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.staff-stat {
    text-align: center;
    flex: 1;
    padding: 10px;
    background: white;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.staff-stat:hover {
    background: var(--light-color);
    transform: translateY(-2px);
}

.stat-number {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

/* Enhanced Children Cards */
.child-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.child-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.child-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.child-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid var(--primary-color);
}

.child-info h4 {
    margin: 0 0 5px 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.child-info .child-meta {
    color: #666;
    font-size: 0.9rem;
}

.child-program-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

.program-education { background: #28a745; }
.program-football { background: #007bff; }
.program-medical { background: #dc3545; }
.program-rescue { background: #ffc107; color: #333; }
.program-outreach { background: #6f42c1; }

.child-details {
    margin-bottom: 15px;
}

.child-story {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.child-needs {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 15px;
}

.child-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.child-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.edit-child-btn {
    background: #17a2b8;
    color: white;
}

.delete-child-btn {
    background: #dc3545;
    color: white;
}

.view-child-btn {
    background: #28a745;
    color: white;
}

/* Image Upload Styles */
.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.image-upload-divider {
    text-align: center;
    color: #666;
    font-weight: bold;
    position: relative;
    margin: 10px 0;
}

.image-upload-divider::before,
.image-upload-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e0e0e0;
}

.image-upload-divider::before {
    left: 0;
}

.image-upload-divider::after {
    right: 0;
}

.file-upload-wrapper {
    text-align: center;
    padding: 20px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.file-upload-wrapper:hover {
    border-color: var(--primary-color);
    background: #e3f2fd;
}

.file-upload-wrapper button {
    margin-bottom: 10px;
}

.file-upload-wrapper small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

#imagePreview {
    position: relative;
    animation: fadeIn 0.3s ease;
}

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

#previewImg {
    border: 2px solid #e0e0e0;
    transition: border-color 0.3s ease;
}

#previewImg:hover {
    border-color: var(--primary-color);
}

/* Performance Optimizations */
.dashboard-content {
    animation: fadeInUp 0.5s ease;
}

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

.stat-card,
.chart-card,
.activity-card {
    animation: slideIn 0.6s ease;
}

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

/* Lazy Loading for Images */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Mobile Navigation Toggle Fix */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        transition: margin-left 0.3s ease;
    }

    .mobile-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 12px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }

    .mobile-toggle:hover {
        background: var(--secondary-color);
        transform: scale(1.05);
    }

    .mobile-toggle:active {
        transform: scale(0.95);
    }

    .sidebar.active ~ .main-content {
        margin-left: 0;
    }
}

/* End of CSS */
