* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f5f7f9;
    color: #1f2933;
    font-family: Arial, sans-serif;
    font-size: 15px;
}

.page {
    width: min(1120px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.page.narrow {
    width: min(720px, calc(100vw - 32px));
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: 28px;
    line-height: 1.2;
}

h2 {
    font-size: 18px;
}

.topbar p {
    margin-top: 4px;
    color: #667085;
}

.button,
button {
    border: 1px solid #287a86;
    background: #2f8f9d;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    text-decoration: none;
    font: inherit;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.button.secondary {
    background: #fff;
    color: #287a86;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.summary-card,
.empty,
.panel,
.notice,
.session-row {
    background: #fff;
    border: 1px solid #d8dee6;
    border-radius: 8px;
}

.summary-card,
.empty,
.panel,
.notice {
    padding: 16px;
}

.summary-card dl,
.session-detail dl {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
}

.summary-card dl {
    grid-template-columns: repeat(2, 1fr);
}

dt {
    color: #667085;
    font-size: 12px;
    text-transform: uppercase;
}

dd {
    margin: 2px 0 0;
    font-weight: 700;
}

.notice {
    margin-bottom: 16px;
}

.notice.error {
    border-color: #d92d20;
    color: #7a271a;
}

.notice.success {
    border-color: #12b76a;
    color: #05603a;
}

.session-list {
    display: grid;
    gap: 10px;
}

.session-list > h2 {
    margin-bottom: 2px;
}

.session-row {
    overflow: hidden;
}

.session-row summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(160px, 1.5fr) minmax(100px, 1fr) minmax(180px, 1fr) 80px 72px;
    list-style: none;
    padding: 14px 16px;
}

.server,
.user,
.time,
.duration {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.server {
    font-weight: 700;
}

.state {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    text-align: center;
}

.state.open {
    background: #dcfae6;
    color: #067647;
}

.state.closed {
    background: #e0f2fe;
    color: #075985;
}

.state.stale {
    background: #fef0c7;
    color: #93370d;
}

.session-detail {
    border-top: 1px solid #d8dee6;
    padding: 16px;
}

.session-detail dl {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-top: 1px solid #edf0f3;
    padding: 9px 8px;
    text-align: left;
}

th {
    color: #667085;
    font-size: 12px;
    text-transform: uppercase;
}

code {
    background: #edf0f3;
    border-radius: 6px;
    display: block;
    margin: 10px 0 16px;
    overflow: auto;
    padding: 12px;
}

@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .session-row summary {
        grid-template-columns: 1fr;
    }
}
