/* Theme overrides */
[data-bs-theme="dark"] {
    --bs-body-bg: #131A25;
    --bs-tertiary-bg: #1C2434;
    --bs-card-bg: #1C2434;
}
.card, .accordion-item {
    background-color: #1C2434 !important;
    border-color: #2a3444 !important;
}
.navbar-dark, .navbar.bg-dark {
    background-color: #1C2434 !important;
}
.dropdown-menu {
    background-color: #1C2434;
    border-color: #2a3444;
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: #253044;
}
.table {
    --bs-table-bg: transparent;
}
.border-top {
    border-color: #2a3444 !important;
}

/* Status colors */
.status-up { color: #198754; }
.status-down { color: #dc3545; }
.status-paused { color: #6c757d; }
.status-new { color: #0d6efd; }

.badge-up { background-color: #198754 !important; }
.badge-down { background-color: #dc3545 !important; }
.badge-paused { background-color: #6c757d !important; }
.badge-new { background-color: #0d6efd !important; }

/* Status cards */
.status-card {
    border-left: 4px solid;
    transition: transform 0.15s ease;
}
.status-card:hover {
    transform: translateY(-2px);
}
.status-card.border-up { border-left-color: #198754; }
.status-card.border-down { border-left-color: #dc3545; }
.status-card.border-paused { border-left-color: #6c757d; }
.status-card.border-new { border-left-color: #0d6efd; }

/* Timeline */
.timeline {
    display: flex;
    gap: 2px;
    align-items: center;
    height: 24px;
    overflow: hidden;
}
.timeline-dot {
    flex: 1;
    height: 16px;
    border-radius: 2px;
}
.timeline-dot.up { background-color: #198754; }
.timeline-dot.down { background-color: #dc3545; }
.timeline-dot.partial { background-color: #fd7e14; }
.timeline-dot.empty { background-color: #343a40; }

/* Copy button */
.copy-btn {
    cursor: pointer;
    transition: color 0.2s;
}
.copy-btn:hover {
    color: #0d6efd;
}

/* Monitor detail */
.ping-url-box {
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 6px;
    padding: 12px 16px;
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

/* Code examples */
.code-example {
    background: #0d1117;
    color: #c9d1d9;
    border-radius: 6px;
    padding: 16px;
    font-size: 0.85rem;
    overflow-x: auto;
}

/* Summary cards */
.summary-card {
    text-align: center;
    padding: 1rem;
}
.summary-card .count {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}
.summary-card .label {
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .summary-card .count {
        font-size: 1.5rem;
    }
}

/* Project color swatches */
.color-swatch {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.15s ease;
}
.color-swatch:hover {
    border-color: var(--bs-body-color);
}
.color-radio:checked + .color-swatch {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--bs-primary);
}

/* Project badge */
.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    color: #fff;
}
.project-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Public status page */
.status-banner {
    border-radius: 8px;
    padding: 1.5rem;
}
.status-banner h3 {
    margin: 0;
    font-weight: 600;
}
.footer-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s;
}
.footer-link:hover {
    color: #fff;
}

/* Monitor detail - uptime grid */
.uptime-grid {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 32px;
    overflow: hidden;
}
.uptime-day {
    flex: 1;
    height: 100%;
    border-radius: 2px;
    cursor: pointer;
    transition: opacity 0.15s;
    position: relative;
}
.uptime-day:hover {
    opacity: 0.8;
}
.uptime-day.up { background-color: #198754; }
.uptime-day.down { background-color: #dc3545; }
.uptime-day.no-data { background-color: #2a3444; }
.uptime-day.selected {
    outline: 2px solid #fff;
    outline-offset: 1px;
    z-index: 1;
}

/* Period selector */
.period-btn.active {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
    border-color: var(--bs-primary) !important;
}

/* Response time chart */
.rt-chart {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 80px;
    overflow: hidden;
}
.rt-bar {
    flex: 1;
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transition: opacity 0.15s;
    cursor: pointer;
}
.rt-bar:hover {
    opacity: 0.8;
}
.rt-bar.fast { background-color: #198754; }
.rt-bar.medium { background-color: #ffc107; }
.rt-bar.slow { background-color: #dc3545; }
.rt-bar.no-data { background-color: #2a3444; min-height: 2px; }

/* Monitor sortable drag & drop */
.monitor-sort-item.dragging {
    opacity: 0.4;
}
.monitor-sort-item.drag-over {
    border-top: 2px solid var(--bs-primary);
}

/* Day detail panel */
.day-detail {
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
