/**
 * GMC Dashboard Modern Styles
 * Beautiful dashboard inspired by the birthday page design
 * 
 * Design System:
 * - Clean card-based layout with subtle shadows
 * - Soft color palette (white cards, light backgrounds)
 * - Modern spacing and breathing room
 * - Consistent typography hierarchy
 * - Soft borders and rounded corners
 * - Professional color accents
 */

/* ========================================
   BASE DASHBOARD STYLING
   ======================================== */

.gmc-wrap {
    background: #f0f0f1;
    min-height: 100vh;
}

/* ========================================
   TOP STATS GRID - Birthday Style
   ======================================== */

.gmc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.gmc-stat-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.gmc-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2271b1 0%, #4a9eff 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gmc-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: #2271b1;
}

.gmc-stat-card:hover::before {
    opacity: 1;
}

.gmc-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #2271b1;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.gmc-stat-label {
    font-size: 13px;
    color: #646970;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gmc-stat-urgent .gmc-stat-number {
    color: #e74c3c;
}

.gmc-stat-urgent {
    border-color: #fde8e8;
    background: #fffbfb;
}

/* ========================================
   OVERVIEW CONTAINER - Two Column Layout
   ======================================== */

.gmc-overview-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}

.gmc-overview-left {
    min-width: 0;
}

.gmc-overview-right {
    min-width: 0;
}

/* ========================================
   CARD SYSTEM - Birthday Style
   ======================================== */

.gmc-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.gmc-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gmc-card h3 {
    color: #2271b1;
    margin: 0 0 16px 0;
    font-size: 17px;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f1;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gmc-card h4 {
    color: #1d2327;
    margin: 15px 0 10px 0;
    font-size: 14px;
    font-weight: 600;
}

.gmc-card p {
    color: #646970;
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.6;
}

.gmc-card ul {
    margin: 0;
    padding-left: 20px;
    color: #646970;
}

.gmc-card li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
}

/* ========================================
   QUICK ACTIONS - Modernized
   ======================================== */

.gmc-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 0;
}

.gmc-quick-actions .button {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid transparent;
}

.gmc-quick-actions .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.gmc-quick-actions .button-primary {
    background: linear-gradient(135deg, #2271b1 0%, #4a9eff 100%);
    border-color: #2271b1;
    color: white;
}

.gmc-quick-actions .button-primary:hover {
    background: linear-gradient(135deg, #1e5a96 0%, #2271b1 100%);
    border-color: #1e5a96;
}

/* ========================================
   SMALL STAT BOXES (Next Sunday, Offerings, Attendance)
   ======================================== */

.gmc-card h3[style*="font-size:14px"] {
    font-size: 15px !important;
    color: #646970;
    border-bottom: 1px solid #f0f0f1;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

/* ========================================
   WIDGET LISTS - Modernized
   ======================================== */

.gmc-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gmc-card ul li {
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.gmc-card ul li:hover {
    background: #e7f3ff;
    border-color: #2271b1;
    transform: translateX(4px);
}

.gmc-card ul li:last-child {
    margin-bottom: 0;
}

/* ========================================
   BUTTONS - Birthday Style
   ======================================== */

.gmc-card .button,
.gmc-card .button-small {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.gmc-card .button:hover,
.gmc-card .button-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.gmc-card .button-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: white;
}

.gmc-card .button-primary:hover {
    background: #1e5a96;
    border-color: #1e5a96;
}

/* ========================================
   BIRTHDAY WIDGET - Enhanced Styling
   ======================================== */

.gmc-card h3:has(+ *:contains("birthday")),
.gmc-card h3:has-text("🎂") {
    color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 12px;
    border-radius: 8px;
    border-bottom: none;
}

/* Birthday list items */
.gmc-card ul li strong {
    color: #2271b1;
    font-weight: 600;
}

.gmc-card ul li small {
    color: #646970;
    font-size: 12px;
}

/* ========================================
   PRAYER FOLLOW-UPS - Enhanced Styling
   ======================================== */

/* Today's follow-ups styling */
.gmc-card p[style*="background: #fff3cd"] {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%) !important;
    color: white !important;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
}

/* ========================================
   RECENT MEMBERS - Enhanced Styling
   ======================================== */

/* New visitors alert box */
.gmc-card div[style*="background:#fff3cd"] {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, rgba(241, 196, 15, 0.1) 100%) !important;
    border-left: 4px solid #f39c12 !important;
    border-radius: 8px;
    padding: 12px;
}

.gmc-card div[style*="background:#fff3cd"] p {
    color: #856404 !important;
    font-weight: 600;
}

/* ========================================
   GOOGLE WIDGETS - Modernized
   ======================================== */

/* Gmail, Calendar, Tasks cards */
.gmc-card:has([class*="google"]) {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.02) 0%, rgba(219, 68, 55, 0.02) 100%);
}

/* ========================================
   SYSTEM INFORMATION - Footer Style
   ======================================== */

.gmc-card:last-child {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #dee2e6;
}

.gmc-card:last-child h3 {
    color: #495057;
}

.gmc-card:last-child p {
    margin-bottom: 8px;
}

.gmc-card:last-child span[style*="color: green"] {
    display: inline-block;
    padding: 4px 12px;
    background: #d4edda;
    border-radius: 16px;
    color: #155724 !important;
    font-weight: 600;
    font-size: 13px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .gmc-overview-container {
        grid-template-columns: 1fr 350px;
        gap: 15px;
    }
    
    .gmc-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 1024px) {
    .gmc-overview-container {
        grid-template-columns: 1fr;
    }
    
    .gmc-overview-right {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .gmc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .gmc-card {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .gmc-quick-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .gmc-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .gmc-card {
        padding: 16px;
    }
    
    .gmc-stat-number {
        font-size: 28px;
    }
}

/* ========================================
   SMOOTH TRANSITIONS & ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gmc-card {
    animation: fadeIn 0.3s ease-out;
}

.gmc-card:nth-child(1) { animation-delay: 0s; }
.gmc-card:nth-child(2) { animation-delay: 0.05s; }
.gmc-card:nth-child(3) { animation-delay: 0.1s; }
.gmc-card:nth-child(4) { animation-delay: 0.15s; }
.gmc-card:nth-child(5) { animation-delay: 0.2s; }

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

.gmc-card:focus-within {
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.2);
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.button:focus,
.button-primary:focus {
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.3);
    outline: none;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .gmc-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .gmc-overview-container {
        grid-template-columns: 1fr;
    }
    
    .button {
        display: none;
    }
}

/* ========================================
   LOADING STATES
   ======================================== */

.gmc-card.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.gmc-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   DARK MODE SUPPORT (Future Enhancement)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .gmc-wrap {
        background: #1e1e1e;
    }
    
    .gmc-card {
        background: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }
    
    .gmc-card h3 {
        color: #4a9eff;
        border-bottom-color: #404040;
    }
    
    .gmc-card p,
    .gmc-card li {
        color: #b0b0b0;
    }
    
    .gmc-stat-card {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .gmc-stat-number {
        color: #4a9eff;
    }
    
    .gmc-stat-label {
        color: #b0b0b0;
    }
}

