/* Custom Styles for Blood Donation Dashboard */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Drag and Drop Zone */
#dropZone {
    transition: all 0.3s ease;
}

#dropZone.dragover {
    border-color: #dc2626;
    background-color: #fef2f2;
    transform: scale(1.02);
}

/* KPI Cards */
.kpi-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.kpi-card.red {
    border-color: #dc2626;
}

.kpi-card.green {
    border-color: #16a34a;
}

.kpi-card.blue {
    border-color: #2563eb;
}

.kpi-card.purple {
    border-color: #9333ea;
}

.kpi-card .kpi-label {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.kpi-card .kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.5rem;
}

.kpi-card .kpi-change {
    font-size: 0.875rem;
    font-weight: 600;
}

.kpi-change.positive {
    color: #16a34a;
}

.kpi-change.negative {
    color: #dc2626;
}

/* Map Styles */
#mapContainer svg {
    width: 100%;
    height: 100%;
}

.region-path {
    stroke: #fff;
    stroke-width: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.region-path:hover {
    stroke: #000;
    stroke-width: 2.5px;
    filter: brightness(0.9);
}

.region-label {
    font-size: 10px;
    font-weight: 600;
    fill: #1f2937;
    pointer-events: none;
    text-anchor: middle;
}

/* Tooltip */
#mapTooltip {
    max-width: 300px;
}

/* Table Styles */
table {
    border-collapse: collapse;
}

table thead th {
    background: #f3f4f6;
    padding: 12px;
    text-align: left;
    font-weight: 700;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

table tbody td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}

table tbody tr:hover {
    background: #f9fafb;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-bueno {
    background: #dcfce7;
    color: #166534;
}

.status-regular {
    background: #fef3c7;
    color: #854d0e;
}

.status-malo {
    background: #fee2e2;
    color: #991b1b;
}

/* Pagination */
.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: #f3f4f6;
}

.pagination-btn.active {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .kpi-card .kpi-value {
        font-size: 1.5rem;
    }
    
    #mapContainer {
        height: 400px;
    }
}

/* Multi-select styling */
select[multiple] {
    height: 120px;
}

select[multiple] option {
    padding: 8px;
}

select[multiple] option:checked {
    background: linear-gradient(#dc2626, #dc2626);
    color: white;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #dc2626;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
