:root {
    --bg: #f0f2f5;
    --card-radius: 12px;
}

body {
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#app {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 24px 16px;
}

/* Stat Cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: var(--card-radius);
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-icon {
    font-size: 20px;
    opacity: 0.6;
}

/* Site Table */
.card {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.table {
    margin-bottom: 0;
}

.table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    font-weight: 600;
    border-bottom-width: 1px;
    padding: 12px 16px;
}

.table td {
    padding: 12px 16px;
    vertical-align: middle;
}

.site-url {
    font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
    font-size: 13px;
    color: #64748b;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* Status Indicators */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.up { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.4); }
.status-dot.down { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.4); }
.status-dot.pending { background: #94a3b8; }
.status-dot.running { background: #f59e0b; animation: pulse 1s infinite; }

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

/* Badges */
.badge-ssl-valid { background: #dcfce7; color: #166534; }
.badge-ssl-expiring { background: #fef3c7; color: #92400e; }
.badge-ssl-invalid { background: #fee2e2; color: #991b1b; }
.badge-ssl-na { background: #f1f5f9; color: #64748b; }

.severity-critical { background: #991b1b; color: #fff; }
.severity-error { background: #ef4444; color: #fff; }
.severity-warning { background: #f59e0b; color: #fff; }
.severity-info { background: #3b82f6; color: #fff; }

.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Filter bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-bar .btn {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 20px;
}

.filter-bar .btn .badge {
    font-size: 11px;
    margin-left: 4px;
}

/* Uptime bar */
.uptime-bar {
    display: flex;
    gap: 2px;
    height: 32px;
    align-items: flex-end;
}

.uptime-bar .bar {
    flex: 1;
    min-width: 4px;
    border-radius: 2px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.uptime-bar .bar:hover { opacity: 0.7; }
.uptime-bar .bar.ok { background: #22c55e; height: 100%; }
.uptime-bar .bar.warn { background: #f59e0b; height: 80%; }
.uptime-bar .bar.error { background: #ef4444; height: 60%; }
.uptime-bar .bar.empty { background: #e2e8f0; height: 40%; }

/* Check history row hover */
.check-row { cursor: pointer; transition: background 0.1s; }
.check-row:hover { background: #f8fafc; }

/* Loading spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    padding: 60px;
}

/* Action buttons */
.btn-check-now {
    font-size: 12px;
    padding: 3px 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .site-url { max-width: 150px; }
    .table-responsive { font-size: 14px; }
    .d-mobile-none { display: none; }
}

@media (max-width: 480px) {
    .stat-cards { grid-template-columns: 1fr; }
}

/* Toast container */
.toast-container {
    position: fixed;
    top: 70px;
    right: 16px;
    z-index: 9999;
}
