:root {
    --bg: #09131d;
    --bg-soft: #132130;
    --panel: rgba(13, 25, 38, 0.88);
    --line: rgba(197, 218, 240, 0.12);
    --text: #edf5ff;
    --muted: #8da2bb;
    --accent: #6de2b8;
    --warning: #ffbd59;
    --danger: #ff7a7a;
}

html, body {
    font-family: Georgia, "Times New Roman", serif;
    background:
        radial-gradient(circle at top, rgba(109, 226, 184, 0.18), transparent 32%),
        linear-gradient(180deg, #08111b 0%, #0f1824 100%);
    color: var(--text);
}

body {
    min-height: 100vh;
}

a, .btn-link {
    color: var(--accent);
}

.page {
    min-height: 100vh;
}

.sidebar {
    background: rgba(7, 14, 22, 0.9);
    border-right: 1px solid var(--line);
}

.top-row {
    border-bottom: 1px solid var(--line);
    background: rgba(7, 14, 22, 0.56);
    backdrop-filter: blur(16px);
}

.app-header {
    min-height: 78px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
    font-size: 0.72rem;
}

.content {
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
}

.panel-wide {
    max-width: 1100px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.panel-header h2 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.panel-header p {
    margin: 0;
    color: var(--muted);
}

.metric-card {
    background: linear-gradient(160deg, rgba(16, 31, 47, 0.96), rgba(8, 17, 27, 0.96));
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    padding: 1rem 1.1rem;
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.metric-card strong {
    font-size: 2rem;
    font-weight: 600;
}

.metric-card.warning strong {
    color: var(--warning);
}

.empty-state {
    padding: 1rem;
    border: 1px dashed var(--line);
    border-radius: 1rem;
    color: var(--muted);
}

.state-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(109, 226, 184, 0.3);
    background: rgba(109, 226, 184, 0.12);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.85rem;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--line);
}

.table a {
    text-decoration: none;
}

.form-control,
.form-select {
    background: rgba(3, 10, 17, 0.76);
    border: 1px solid rgba(197, 218, 240, 0.14);
    color: var(--text);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(109, 226, 184, 0.18);
    border-color: rgba(109, 226, 184, 0.45);
}

.form-control::placeholder {
    color: rgba(141, 162, 187, 0.72);
}

.form-check-input {
    background-color: rgba(3, 10, 17, 0.76);
    border-color: rgba(197, 218, 240, 0.18);
}

.connection-list {
    display: grid;
    gap: 0.8rem;
}

.connection-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 0.75rem 1rem;
}

.detail-grid dt {
    color: var(--muted);
}

.detail-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.timeline {
    display: grid;
    gap: 0.9rem;
}

.timeline-item {
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: rgba(3, 10, 17, 0.46);
}

.timeline-item pre {
    margin: 0.75rem 0 0;
    white-space: pre-wrap;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.85rem;
    color: #d6e7fb;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid var(--danger);
}

.validation-message {
    color: var(--danger);
}

.blazor-error-boundary {
    background: #7d1f1f;
    padding: 1rem 1rem 1rem 1.5rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

@media (max-width: 991.98px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}
