/* --- Blue Core palette --- */
:root {
    --orient: #00548f;
    --bright-red: #b1020f;
    --reno-sand: #b26f16;
    --solitude: #e8ecf4;
    --spring-wood: #f8f6ef;
    --pampas: #f7f4f1;
    --white-linen: #f0eae1;
    --swirl: #d7cec4;
    --double-spanish-white: #cfc2a8;
    --nobel: #989898;
    --greyblue: #e8ecf4;
    --bluecore-header: #b9c8e8;
    --bluecore-bkgrd: #ebeefa;
    --text: #1b1f23;
    --muted: #677084;
    --card: #fff;
    --card-border: rgba(0, 0, 0, .06);
    --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .08);
}

/* --- Layout --- */
* {
    box-sizing: border-box
}

html, body {
    height: 100%
}

body {
    margin: 0;
    font: 16px/1.45 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--text);
    background: linear-gradient(180deg, var(--bluecore-bkgrd), #f7f9ff 45%, #ffffff);
}

.container {
    width: min(1100px, 92vw);
    margin-inline: auto
}

/* --- Header (full-width bar) --- */
.site-header {
    background: var(--bluecore-header);
    border-bottom: 2px solid rgba(0, 0, 0, .05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--orient)
}

.logo {
    height: 36px;
    width: auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: block;
    object-fit: contain;
}

.brand-text {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: .2px
}

.sep {
    opacity: .45;
    margin: 0 6px
}

.brand-sub {
    font-weight: 700;
    color: #213a5a
}

/* Status badge (in header) */
.status-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .7);
    padding: 8px 12px;
    border-radius: 999px;
    box-shadow: var(--shadow);
    font-weight: 600;
    color: #234;
}

.status-badge .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d3d3d3;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .05) inset;
}

.status-ok .dot {
    background: #1a7f37
}

/* green */
.status-warn .dot {
    background: var(--reno-sand)
}

.status-down .dot {
    background: var(--bright-red)
}

/* --- Content --- */
.lead {
    margin: 26px 0 18px;
    color: var(--muted)
}

.list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0
}

.row {
    display: grid;
    grid-template-columns:46px 1fr 22px;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    background: var(--card);
    padding: 16px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.row:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .12)
}

/* Service not running: greyed out and not clickable (set by health.js). */
.row.unavailable {
    opacity: .45;
    filter: grayscale(1);
    pointer-events: none;
    cursor: default;
    box-shadow: none;
}

.row.unavailable:hover {
    transform: none;
    box-shadow: none;
}

.row.unavailable .sub::after {
    content: " · offline";
    font-style: italic;
}

.ic {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff, var(--solitude));
    border: 1px solid var(--card-border);
    font-size: 22px;
}

.txt {
    display: flex;
    flex-direction: column
}

.title {
    font-weight: 800;
    font-size: 18px;
    color: #243447
}

.sub {
    color: var(--muted);
    font-size: 14px
}

.version {
    color: var(--muted);
    font-size: 14px
}

.chev {
    justify-self: end;
    font-size: 22px;
    color: #98a2b3
}

.links {
    margin: 28px 0 80px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.links a {
    color: var(--orient);
    text-decoration: none;
    font-weight: 600
}

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

/* Small screens */
@media (max-width: 600px) {
    .brand-text {
        font-size: 20px
    }

    .brand-sub {
        display: none
    }
}

/*############################################################################*/
/* ######  Error pages (404 / 500) ###### */
/*########################################*/
body.error {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.error main {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 48px 0 80px;
}

.error-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 48px 40px;
    text-align: center;
    max-width: 560px;
}

.error-code {
    font-weight: 800;
    font-size: clamp(72px, 18vw, 128px);
    line-height: 1;
    letter-spacing: -2px;
    color: var(--orient);
    margin: 0;
}

.error-card h1 {
    font-size: 24px;
    margin: 12px 0 8px;
    color: #243447;
}

.error-card p {
    color: var(--muted);
    margin: 0 auto 28px;
    max-width: 42ch;
}

.actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    text-decoration: none;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.btn-primary {
    background: var(--orient);
    color: #fff;
    border-color: var(--orient);
}

.btn-primary:hover {
    background: #024774;
}

.btn-ghost {
    background: #fff;
    color: var(--orient);
}

.btn-ghost:hover {
    background: var(--solitude);
}

@media (max-width: 600px) {
    .error-card {
        padding: 36px 24px;
    }
}
