:root {
    color-scheme: dark;
    --bg: #101719;
    --panel: #172124;
    --line: #2b393d;
    --text: #e8efed;
    --muted: #97aaa8;
    --accent: #a6efcb;
    --danger: #ffa6a6
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 "Segoe UI", sans-serif
}

header {
    padding: 22px 4%;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px
}

.brand {
    font-size: 21px;
    font-weight: 650;
    color: var(--text);
    text-decoration: none
}

.brand span {
    font-size: 11px;
    letter-spacing: 2px;
    margin-left: 15px;
    color: var(--muted)
}

.account {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 13px
}

.account form {
    margin: 0
}

main {
    max-width: 1420px;
    margin: auto;
    padding: 40px 4%
}

h1 {
    font-size: 34px;
    line-height: 1.2;
    font-weight: 600;
    margin: 12px 0
}

h2 {
    font-size: 20px;
    font-weight: 600
}

h3 {
    font-size: 14px;
    font-weight: 500
}

.eyebrow {
    color: var(--accent);
    letter-spacing: 2px;
    font-size: 11px
}

.muted {
    color: var(--muted)
}

.small {
    font-size: 12px
}

.intro,
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px
}

.intro {
    align-items: flex-end;
    margin-bottom: 30px
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 30px
}

.stats article {
    padding: 22px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px
}

.stats article>span {
    color: var(--muted);
    font-size: 12px
}

.stats strong {
    display: block;
    font-weight: 500;
    font-size: 34px;
    margin-top: 8px
}

.unit {
    font-size: 15px;
    color: var(--muted);
    margin-left: 6px
}

nav {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
    margin-bottom: 20px
}

button,
.button {
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 10px 16px;
    background: var(--accent);
    color: #10271d;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block
}

button:disabled {
    opacity: .5;
    cursor: wait
}

.quiet,
.tab {
    background: transparent;
    color: var(--muted);
    border-color: var(--line)
}

.selected {
    background: #29463b;
    color: var(--accent);
    border-color: #49705b
}

button:hover,
.button:hover {
    filter: brightness(1.12)
}

input,
textarea,
select {
    font: inherit;
    background: #111a1d;
    border: 1px solid #405053;
    color: var(--text);
    border-radius: 6px;
    padding: 10px 12px;
    max-width: 100%
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #6ca489
}

label {
    display: block;
    margin: 18px 0
}

label input {
    display: block;
    width: 100%;
    margin-top: 7px
}

.table-wrap {
    overflow: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap
}

th {
    text-align: left;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    padding: 13px;
    border-bottom: 1px solid var(--line)
}

td {
    padding: 15px 13px;
    border-bottom: 1px solid #233135;
    font-variant-numeric: tabular-nums;
    font-size: 13px
}

tbody tr:hover {
    background: #19282b
}

.pill {
    font-size: 11px;
    padding: 4px 8px;
    background: #253d33;
    border-radius: 20px;
    color: var(--accent)
}

.warn {
    color: #edc781
}

.error {
    color: var(--danger)
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 50px;
    white-space: normal
}

.view {
    min-height: 220px
}

#notice:not(:empty) {
    padding: 12px 16px;
    border: 1px solid #6d4646;
    margin-bottom: 20px;
    color: var(--danger)
}

#notice.success:not(:empty) {
    color: #a3d5c2;
    border-color: #3c6457;
}

#detail {
    margin-top: 30px;
    border: 1px solid var(--line);
    padding: 24px;
    border-radius: 10px;
    background: var(--panel)
}

.charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px
}

.charts>div:last-child {
    grid-column: 1/-1
}

canvas {
    width: 100%;
    height: 200px;
    display: block
}

#feedback-form {
    margin-top: 24px;
    max-width: 700px
}

textarea {
    display: block;
    width: 100%;
    height: 85px;
    margin: 12px 0
}

.feedback-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    white-space: pre-wrap
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.worker {
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px
}

.actions {
    display: flex;
    gap: 12px;
    margin: 24px 0
}

.inline-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 15px
}

.user-line {
    display: flex;
    gap: 15px;
    align-items: center;
    margin: 8px 0
}

details {
    border-top: 1px solid var(--line);
    padding: 18px 0
}

summary {
    cursor: pointer;
    color: var(--muted)
}

pre {
    overflow: auto;
    font-size: 12px;
    max-height: 350px;
    white-space: pre-wrap;
    word-break: break-word
}

footer {
    margin-top: 40px;
    color: var(--muted);
    font-size: 11px;
    border-top: 1px solid var(--line);
    padding-top: 18px
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center
}

.login-box {
    width: 430px;
    max-width: 94vw;
    background: var(--panel);
    padding: 38px;
    border-radius: 12px;
    border: 1px solid var(--line)
}

.login-box button {
    width: 100%
}

[hidden] {
    display: none !important
}

@media(max-width:750px) {
    header {
        align-items: flex-start
    }

    .brand span {
        display: none
    }

    .account {
        flex-direction: column;
        gap: 5px
    }

    .intro {
        display: block
    }

    h1 {
        font-size: 28px
    }

    .stats {
        grid-template-columns: 1fr 1fr
    }

    .stats article {
        padding: 15px
    }

    .stats strong {
        font-size: 27px
    }

    .charts,
    .admin-grid {
        grid-template-columns: 1fr
    }

    .actions {
        flex-wrap: wrap
    }

    main {
        padding-top: 25px
    }

    .section-title {
        align-items: flex-start
    }

    #detail {
        padding: 14px
    }
}
