:root {
    color-scheme: dark;
    font-family: Inter, system-ui, Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #101318;
    color: #eef2f7;
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0;
}

header {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 18px;
    align-items: end;
    margin-bottom: 18px;
}

.login-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.login-panel label:nth-child(3),
.login-actions {
    grid-column: 1 / -1;
}

.login-actions {
    display: flex;
    gap: 10px;
}

.login-status {
    grid-column: 1 / -1;
    margin: 0;
    color: #dbeafe;
    font-size: 14px;
}

h1,
h2,
p {
    margin-top: 0;
}

p,
span,
td,
th {
    color: #aeb8c5;
}

label {
    display: grid;
    gap: 7px;
    color: #c8d2df;
    font-size: 14px;
}

input,
textarea {
    width: 100%;
    background: #0f1319;
    color: #eef2f7;
    border: 1px solid #344154;
    border-radius: 10px;
    padding: 10px;
}

textarea {
    min-width: 320px;
    resize: vertical;
}

select {
    width: 100%;
    background: #0f1319;
    color: #eef2f7;
    border: 1px solid #344154;
    border-radius: 10px;
    padding: 10px;
}

button {
    border: 0;
    border-radius: 10px;
    padding: 10px 14px;
    background: #7dd3fc;
    color: #06121a;
    font-weight: 900;
    cursor: pointer;
}

button.active {
    background: #facc15;
    color: #1b1402;
}

.danger-btn {
    background: #fca5a5;
    color: #2b0505;
}

.hidden {
    display: none;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.grid {
    display: grid;
    gap: 14px;
}

.cards {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 14px;
}

.cards article,
.panel {
    background: #181d25;
    border: 1px solid #2c3543;
    border-radius: 8px;
    padding: 16px;
}

.cards article {
    position: relative;
    min-height: 104px;
}

.cards strong {
    display: block;
    margin-top: 8px;
    color: #eef2f7;
    font-size: 28px;
}

.panel {
    margin-top: 18px;
}

.panel-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.panel-heading h2 {
    margin-bottom: 0;
}

.info-btn {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border: 1px solid #344154;
    border-radius: 999px;
    padding: 0;
    background: #10151d;
    color: #7dd3fc;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    line-height: 1;
}

.cards .info-btn {
    position: absolute;
    top: 10px;
    right: 10px;
}

.info-btn:hover,
.info-btn:focus-visible {
    background: #14263a;
    color: #facc15;
}

.health-grid,
.source-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.health-item,
.source-row,
.error-row {
    background: #10151d;
    border: 1px solid #273244;
    border-radius: 8px;
    padding: 12px;
}

.health-item strong,
.source-row strong {
    display: block;
    margin-top: 6px;
    color: #eef2f7;
}

.source-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.report-actions a {
    color: #7dd3fc;
    font-weight: 800;
}

.followed-clubs-editor {
    margin-bottom: 18px;
}

.followed-clubs-editor p {
    margin-bottom: 10px;
}

.followed-clubs-table {
    margin-bottom: 12px;
}

.followed-clubs-table table {
    min-width: 560px;
}

.followed-clubs-table th:first-child,
.followed-clubs-table td:first-child {
    width: 180px;
}

.followed-clubs-table th:last-child,
.followed-clubs-table td:last-child {
    width: 110px;
    text-align: right;
}

.followed-clubs-table input {
    width: 100%;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.report-grid article {
    background: #10151d;
    border: 1px solid #273244;
    border-radius: 8px;
    padding: 12px;
}

.report-grid h3 {
    margin: 0 0 10px;
}

.report-grid strong {
    color: #eef2f7;
    font-size: 24px;
}

.report-grid .wide-report {
    grid-column: 1 / -1;
}

.bar-list {
    display: grid;
    gap: 8px;
}

.bar-row {
    display: grid;
    grid-template-columns: 100px 1fr 48px;
    gap: 10px;
    align-items: center;
}

.bar-row div {
    height: 10px;
    background: #0f1319;
    border: 1px solid #273244;
    border-radius: 999px;
    overflow: hidden;
}

.bar-row i {
    display: block;
    height: 100%;
    background: #7dd3fc;
}

.compact-table table {
    min-width: 560px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

th,
td {
    border-bottom: 1px solid #273244;
    padding: 10px;
    text-align: left;
    font-size: 13px;
    vertical-align: top;
}

th {
    color: #7dd3fc;
    font-weight: 900;
}

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

.error-row strong {
    color: #fca5a5;
}

.error-row span {
    display: block;
    margin-top: 6px;
    font-size: 13px;
}

.error-row p {
    margin: 8px 0 0;
    color: #dbeafe;
    word-break: break-word;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
}

.filters button {
    min-height: 39px;
}

.preview-img {
    display: block;
    width: 160px;
    max-height: 220px;
    object-fit: contain;
    border: 1px solid #273244;
    border-radius: 8px;
    background: #10151d;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    word-break: break-word;
}

.status-pill {
    display: inline-block;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 900;
}

.status-pill.good {
    background: #14532d;
    color: #bbf7d0;
}

.status-pill.off {
    background: #3f1d1d;
    color: #fecaca;
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: #10151d;
    border: 1px solid #273244;
    border-radius: 8px;
    padding: 12px;
    color: #dbeafe;
}

.detail-panel {
    margin-top: 16px;
}

.detail-panel img {
    width: min(100%, 430px);
    height: auto;
    display: block;
    border: 1px solid #273244;
    border-radius: 8px;
    background: #10151d;
}

.help-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(6, 12, 20, .72);
}

.help-modal.hidden {
    display: none;
}

.help-dialog {
    position: relative;
    width: min(520px, 100%);
    background: #181d25;
    border: 1px solid #344154;
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
}

.help-dialog h2 {
    margin: 0 42px 10px 0;
}

.help-dialog p {
    margin: 0;
    color: #dbeafe;
    line-height: 1.55;
}

.help-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 999px;
    background: #0f1319;
    color: #eef2f7;
}

@media (max-width: 720px) {
    header {
        grid-template-columns: 1fr;
    }
}
