* { box-sizing: border-box; }

:root {
    color-scheme: light;
    font-family: "Segoe UI", system-ui, sans-serif;
    color: #1a2637;
    background: #f3f6fa;
}

body { margin: 0; }
a { color: #175983; }
a:focus-visible, [tabindex]:focus-visible { outline: 3px solid #2781b4; outline-offset: 4px; }

.site-header { background: #14253a; color: #fff; }
.site-header .shell { padding-block: 1.05rem; }
.shell { width: min(100% - 2rem, 65rem); margin-inline: auto; }
.brand { color: inherit; font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.brand span { color: #81d9f0; }

main.shell { padding-block: clamp(2rem, 6vw, 4.5rem); }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
h1 { margin: 0; font-size: clamp(2rem, 7vw, 3rem); letter-spacing: -.035em; line-height: 1.15; }
.page-header p { margin: .5rem 0 0; color: #4d5e73; }
.button {
    color: #16304b;
    background: #fff;
    border: 1px solid #c8d5e4;
    border-radius: .55rem;
    padding: .65rem 1rem;
    font-weight: 600;
    text-decoration: none;
}
.button:hover { background: #e7f1fa; }

.panel { background: #fff; border: 1px solid #d7e0eb; border-radius: .8rem; }
.empty { padding: 1.25rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #eaf0f7; color: #34475e; }
th, td { padding: .95rem 1.15rem; }
td { font-variant-numeric: tabular-nums; }
tbody tr + tr { border-top: 1px solid #e0e7ef; }
.service-name, .service-description { display: block; }
.service-description { margin-top: .2rem; color: #4d5e73; font-size: .9rem; font-weight: 400; }

.status {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .24rem .6rem;
    border-radius: 1rem;
    white-space: nowrap;
    font-size: .82rem;
    font-weight: 600;
    color: #374b63;
    background: #edf2f7;
}
.status::before { content: ""; width: .44rem; height: .44rem; border-radius: 50%; background: currentColor; }
.status.available { color: #125338; background: #e0f4e9; }
.status.restricted, .status.redirected { color: #744413; background: #fff0d6; }
.status.unreachable, .status.timeout, .status.http_error, .status.invalid_configuration {
    color: #842641;
    background: #fae7ed;
}
.last-check { color: #4d5e73; font-size: .9rem; }

.site-header .shell, nav, .actions, .connection-heading { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-header .shell, .connection-heading { justify-content: space-between; }
nav a { color: #fff; }
nav form { margin: 0; }
.form-panel { padding: clamp(1rem, 3vw, 2rem); margin-bottom: 1.5rem; }
.form-panel h2 { margin: 0 0 .5rem; }
.login-form { max-width: 30rem; }
.stack, .login-form { display: grid; gap: .7rem; }
label { font-weight: 600; }
input { width: 100%; padding: .75rem; border: 1px solid #aebed0; border-radius: .4rem; font: inherit; }
input:focus-visible, button:focus-visible { outline: 3px solid #2781b4; outline-offset: 3px; }
button { cursor: pointer; font: inherit; }
.stack .button, .login-form .button { justify-self: start; margin-top: .5rem; }
.primary { background: #175983; color: #fff; border-color: #175983; }
.primary:hover { background: #124568; }
.danger { color: #842641; }
.field-help { margin: 0; font-size: .9rem; color: #4d5e73; }
.actions { margin-top: 1.25rem; }
.notice { padding: 1rem; border-radius: .5rem; background: #edf2f7; }
.notice.success { background: #e0f4e9; color: #125338; }
.notice.error { background: #fae7ed; color: #842641; }
.search-result { border-top: 1px solid #e0e7ef; padding-block: 1rem; overflow-wrap: anywhere; }
.search-result h3 { margin: 0; }

@media (max-width: 35rem) {
    .page-header { align-items: start; flex-direction: column; }
    th, td { padding: .65rem; }
}

.service-row { cursor: pointer; transition: background .15s; }
.service-row:hover, .service-row:focus-within { background: #f0f6fc; }
.service-trigger { border: 0; padding: 0; background: transparent; color: #175983; font-weight: 650; text-align: left; }
.service-trigger span { margin-left: .5rem; color: #70839a; }
.dialog-open { overflow: hidden; }
.connection-dialog { width: min(46rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 1px solid #d7e0eb; border-radius: 1rem; color: #1a2637; background: #f3f6fa; box-shadow: 0 24px 80px #14253a40; }
.connection-dialog::backdrop { background: #14253a99; backdrop-filter: blur(3px); }
.dialog-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid #d7e0eb; background: #fff; }
.dialog-header h2 { margin: .3rem 0 0; }
.dialog-eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .12em; color: #4d5e73; }
.dialog-content { padding: 1.25rem; }
.dialog-content .form-panel:last-child { margin-bottom: 0; }
@media (max-width: 35rem) {
    .connection-dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
    .dialog-header, .dialog-content { padding: 1rem; }
}
