/* Navigation */
nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

nav a {
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

nav a:hover {
    background-color: var(--pico-secondary-background);
}

.nav-spacer {
    flex: 1;
}

.nav-user {
    font-size: 0.875rem;
    color: var(--pico-muted-color);
}

.theme-toggle {
    padding: 0.25rem 0.6rem;
    font-size: 1rem;
    line-height: 1;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--pico-muted-border-color);
    color: var(--pico-color);
}

.theme-toggle:hover {
    background: var(--pico-secondary-background);
}

/* Main content */
main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

/* Status row colors */
.status-ok {
    border-left: 4px solid #22c55e;
}

.status-warning {
    border-left: 4px solid #f59e0b;
}

.status-alert {
    border-left: 4px solid #ef4444;
    background-color: rgba(239, 68, 68, 0.08);
}

/* Status badges */
.status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-badge.status-ok {
    background: rgba(34, 197, 94, 0.18);
    color: #4ade80;
}

.status-badge.status-warning {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}

.status-badge.status-alert {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
}

.status-badge.status-unknown {
    background: rgba(107, 114, 128, 0.18);
    color: var(--pico-muted-color);
}

/* Light theme overrides for badges */
[data-theme="light"] .status-badge.status-ok {
    background: #dcfce7;
    color: #166534;
}

[data-theme="light"] .status-badge.status-warning {
    background: #fef3c7;
    color: #92400e;
}

[data-theme="light"] .status-badge.status-alert {
    background: #fee2e2;
    color: #991b1b;
    background-color: rgba(239, 68, 68, 0.06);
}

[data-theme="light"] .status-badge.status-unknown {
    background: #e5e7eb;
    color: #6b7280;
}

/* Filter inputs */
input[type="text"],
select {
    margin-bottom: 1rem;
    margin-right: 0.5rem;
}

/* Danger button */
.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Form styling */
label {
    display: block;
    margin-bottom: 0.5rem;
}

textarea {
    width: 100%;
    min-height: 60px;
}

/* Flash messages */
.flash-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    padding: 8px 16px;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

[data-theme="light"] .flash-success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

/* Status text */
.status-ok-text {
    color: #4ade80;
}

.status-alert-text {
    color: #f87171;
}

[data-theme="light"] .status-ok-text {
    color: #166534;
}

[data-theme="light"] .status-alert-text {
    color: #991b1b;
}

/* Sections */
section {
    margin-bottom: 2rem;
}
