/* Modern Family Dashboard Styling */
:root {
    --primary-color: #2196F3;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --error-color: #F44336;
    --background: #f8f9fa;
    --card-background: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, var(--primary-color), #1976D2);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    pointer-events: none;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
}

.last-update {
    font-size: 0.9rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.service-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: block;
    min-height: 200px;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.service-card.coming-soon {
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
}

.service-card.coming-soon:hover {
    transform: none;
    box-shadow: var(--shadow);
    border-color: transparent;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: absolute;
    bottom: 1.5rem;
    left: 2rem;
    right: 2rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--warning-color);
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: var(--success-color);
    animation: none;
}

.status-dot.offline {
    background: var(--error-color);
    animation: none;
}

.status-dot.pending {
    background: var(--text-secondary);
    animation: none;
}

.status-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.system-status {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.system-status h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.status-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.status-card h4 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.metric {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
}

.metric .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.metric .label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

footer {
    background: var(--card-background);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.footer-links {
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 1.5rem 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
        min-height: auto;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .service-card {
        padding: 1.25rem;
    }
    
    .status-indicator {
        position: static;
        margin-top: 1rem;
        justify-content: center;
    }
    
    .metric .number {
        font-size: 1.5rem;
    }
}

/* Touch improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }
    
    .service-card:active {
        transform: scale(0.98);
    }
}
