:root {
    color-scheme: light;
    --bg: #f6f7f9;
    --panel: #ffffff;
    --text: #1f2933;
    --muted: #637083;
    --border: #d9dee7;
    --link: #1d4ed8;
    --green-bg: #e8f7ee;
    --green: #176b3a;
    --blue-bg: #e8f1ff;
    --blue: #2156a5;
    --amber-bg: #fff3d6;
    --amber: #835300;
    --red-bg: #ffe8e8;
    --red: #a42a2a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: var(--link);
}

.page {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 56px;
}

.site-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.eyebrow,
.muted,
.meta,
.section-head p,
.admin-row small {
    color: var(--muted);
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 8px;
    font-size: 32px;
    line-height: 1.15;
}

h2 {
    margin-bottom: 4px;
    font-size: 20px;
}

h3 {
    margin-bottom: 0;
    font-size: 20px;
}

.summary,
.status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.summary-ok,
.status-resolved {
    background: var(--green-bg);
    color: var(--green);
}

.summary-active,
.status-investigating {
    background: var(--red-bg);
    color: var(--red);
}

.status-fix_in_progress {
    background: var(--amber-bg);
    color: var(--amber);
}

.status-monitoring {
    background: var(--blue-bg);
    color: var(--blue);
}

.section-head {
    margin: 28px 0 16px;
}

.issue-list,
.admin-list {
    display: grid;
    gap: 12px;
}

.issue,
.admin-form,
.admin-row,
.notice,
.empty {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.issue {
    padding: 20px;
}

.issue-detail {
    margin-top: 20px;
}

.issue-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.message {
    white-space: normal;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0 0;
    font-size: 14px;
}

.back-link {
    margin-bottom: 16px;
}

.admin-form {
    display: grid;
    gap: 16px;
    padding: 20px;
    margin-top: 20px;
}

.admin-form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text);
    font: inherit;
    font-weight: 400;
    background: #fff;
}

.admin-form textarea {
    resize: vertical;
}

.admin-form .check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.admin-form .check-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
    flex: 0 0 auto;
}

.admin-form .check-row label {
    display: block;
    gap: 0;
    font-weight: 700;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    background: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button-primary {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
}

.button-danger {
    border-color: #b42318;
    color: #b42318;
    background: #fff;
}

.notice,
.empty {
    padding: 14px 16px;
}

.notice {
    margin: 20px 0 0;
    border-color: #a7d9b9;
    color: var(--green);
    background: var(--green-bg);
    font-weight: 700;
}

.admin-list-head {
    margin-top: 30px;
}

.admin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    color: var(--text);
    text-decoration: none;
}

.admin-row-badges {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.admin-only-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--muted);
    background: #eef1f5;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.admin-row small {
    display: block;
    margin-top: 3px;
}

@media (max-width: 680px) {
    .page {
        width: min(100% - 24px, 920px);
        padding-top: 24px;
    }

    .site-header,
    .issue-title-row,
    .admin-row {
        display: grid;
    }

    .summary,
    .status {
        justify-self: start;
    }
}
