/* ============================================================
   Grassroots Events Management System - Modern Dashboard UI
   Inspired by React Material-UI design patterns
   ============================================================ */

:root {
    /* Primary Colors - Gradient from MainDashboard.jsx */
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --primary-red: #dc3545;
    --primary-red-dark: #c82333;
    --primary-red-light: #ff6b6b;
    
    /* Status Colors */
    --success: #4caf50;
    --success-light: #81c784;
    --warning: #ff9800;
    --warning-light: #ffb74d;
    --error: #f44336;
    --error-light: #ef5350;
    --info: #2196f3;
    --info-light: #64b5f6;
    
    /* Neutral Colors */
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* Spacing */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 1rem;
    --spacing-4: 1.5rem;
    --spacing-5: 2rem;
    --spacing-6: 3rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

/* ============================================================
   Layout & Container Styles
   ============================================================ */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Welcome Header - Gradient from MainDashboard */
.welcome-header {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
    box-shadow: var(--shadow-lg);
}

.welcome-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.welcome-header p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* ============================================================
   Stat Cards - Matching Material-UI Card Design
   ============================================================ */
.stat-card {
    border: none;
    border-radius: 1rem;
    transition: all 0.2s ease-in-out;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.7;
}

.stat-card h6 {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
}

.stat-card small {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Card color variants */
.stat-card-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}

.stat-card-success {
    background: linear-gradient(135deg, var(--success), #66bb6a);
    color: white;
}

.stat-card-danger {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    color: white;
}

.stat-card-info {
    background: linear-gradient(135deg, var(--info), #42a5f5);
    color: white;
}

.stat-card-warning {
    background: linear-gradient(135deg, var(--warning), #ff9800);
    color: white;
}

.stat-card-secondary {
    background: linear-gradient(135deg, var(--gray-600), var(--gray-700));
    color: white;
}

/* ============================================================
   Filter Section - Modern Card Design
   ============================================================ */
.filter-card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.filter-card .card-header {
    background-color: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
    border-radius: 1rem 1rem 0 0;
}

.filter-card .card-header h5 {
    margin-bottom: 0;
    font-weight: 600;
}

.filter-card .card-body {
    padding: 1.5rem;
}

/* Filter buttons - like MUI ButtonGroup */
.btn-filter-group {
    display: inline-flex;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.btn-filter {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-700);
}

.btn-filter:first-child {
    border-radius: 2rem 0 0 2rem;
}

.btn-filter:last-child {
    border-radius: 0 2rem 2rem 0;
}

.btn-filter:hover {
    background-color: var(--gray-100);
}

.btn-filter.active {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

/* ============================================================
   Event Cards - Matching Material-UI Card Design
   ============================================================ */
.event-card {
    border: none;
    border-radius: 0.75rem;
    transition: all 0.2s ease-in-out;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 100%;
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.event-card .card-body {
    padding: 1.25rem;
}

.event-card .event-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--gray-800);
}

.event-card .event-title a {
    color: inherit;
    text-decoration: none;
}

.event-card .event-title a:hover {
    color: var(--primary-red);
}

.event-card .event-meta {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.event-card .event-meta i {
    width: 1.25rem;
    color: var(--primary-red);
}

.event-card .card-footer {
    background: transparent;
    border-top: 1px solid var(--gray-200);
    padding: 0.75rem 1.25rem;
    font-size: 0.75rem;
}

/* Month header - like MUI Typography */
.month-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.month-header:first-of-type {
    margin-top: 0;
}

.month-header i {
    margin-right: 0.5rem;
}

.month-header strong {
    font-size: 1.1rem;
}

/* ============================================================
   Venue Suggestion Cards - Like MUI Card
   ============================================================ */
.venue-suggestion-card {
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
    background: white;
    margin-bottom: 0.75rem;
}

.venue-suggestion-card:hover {
    transform: translateX(5px);
    border-color: var(--primary-red);
    box-shadow: var(--shadow-md);
}

.venue-suggestion-card.selected {
    background-color: var(--gray-100);
    border-color: var(--primary-red);
    border-width: 2px;
}

.venue-suggestion-card .venue-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.venue-suggestion-card .venue-name i {
    color: var(--primary-red);
    margin-right: 0.5rem;
}

.venue-suggestion-card .venue-details {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.venue-suggestion-card .badge-usage {
    font-size: 0.7rem;
}

/* ============================================================
   Alert Styles - Matching MUI Alert
   ============================================================ */
.alert-modern {
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.alert-info {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #0d47a1;
    border-left: 4px solid var(--info);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100;
    border-left: 4px solid var(--warning);
}

.alert-success {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #1b5e20;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #b71c1c;
    border-left: 4px solid var(--error);
}

/* ============================================================
   Badge Styles
   ============================================================ */
.badge-modern {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 500;
}

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

.badge-warning {
    background: var(--warning);
    color: white;
}

.badge-danger {
    background: var(--primary-red);
    color: white;
}

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

.badge-secondary {
    background: var(--gray-600);
    color: white;
}

/* ============================================================
   Button Styles - Modern Design
   ============================================================ */
.btn-modern {
    border-radius: 2rem;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-modern:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-gradient {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
    color: white;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, var(--gradient-end), var(--gradient-start));
    color: white;
}

/* ============================================================
   Table Styles - Modern Clean Design
   ============================================================ */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead th {
    background: var(--gray-100);
    border-bottom: 2px solid var(--gray-200);
    padding: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.table-modern tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
}

.table-modern tbody tr:hover {
    background-color: var(--gray-100);
}

/* ============================================================
   Modal/Dialog Styles - Like MUI Dialog
   ============================================================ */
.modal-modern .modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
}

.modal-modern .modal-header {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border-radius: 1rem 1rem 0 0;
    padding: 1.25rem 1.5rem;
}

.modal-modern .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-modern .modal-body {
    padding: 1.5rem;
}

.modal-modern .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* ============================================================
   Form Styles
   ============================================================ */
.form-modern .form-control,
.form-modern .form-select {
    border-radius: 0.5rem;
    border: 1px solid var(--gray-300);
    padding: 0.625rem 1rem;
    transition: all 0.2s;
}

.form-modern .form-control:focus,
.form-modern .form-select:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-modern .form-label {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

/* ============================================================
   Loading Spinner - Like MUI CircularProgress
   ============================================================ */
.spinner-modern {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================================
   Utility Classes
   ============================================================ */
.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cursor-pointer {
    cursor: pointer;
}

.transition-all {
    transition: all 0.2s ease-in-out;
}

/* ============================================================
   Responsive Design
   ============================================================ */
@media (max-width: 768px) {
    .welcome-header {
        padding: 1.5rem;
    }
    
    .welcome-header h2 {
        font-size: 1.25rem;
    }
    
    .stat-card .card-body {
        padding: 1rem;
    }
    
    .stat-card h2 {
        font-size: 1.5rem;
    }
    
    .btn-filter {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* ============================================================
   Dashboard Specific - 12-Month View
   ============================================================ */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.events-timeline {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.events-timeline::-webkit-scrollbar {
    width: 6px;
}

.events-timeline::-webkit-scrollbar-track {
    background: var(--gray-200);
    border-radius: 3px;
}

.events-timeline::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 3px;
}

/* Frosted glass effect for modals */
.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}
