:root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #18243b;
    background: #fff;
    font-size: 14px;
    line-height: 1.6;
    --accent: #4257cb;
    --line: #e5e9f0;
    --muted: #67758c
}

* {
    box-sizing: border-box
}

body {
    margin: 0
}

a {
    color: var(--accent);
    text-decoration: none
}

button,
input,
select,
textarea {
    font: inherit
}

button {
    border: 1px solid #d8dfeb;
    background: #fff;
    border-radius: 6px;
    padding: 7px 13px;
    color: #33425b;
    cursor: pointer;
    white-space: nowrap
}

button:hover {
    background: #f0f3fa
}

button:disabled {
    opacity: .5;
    cursor: wait
}

.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: white
}

.primary:hover {
    background: #3448b3
}

.danger {
    color: #ae3540
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d8dfeb;
    border-radius: 6px;
    padding: 9px 11px;
    color: #18243b;
    background: white
}

textarea {
    min-height: 110px;
    resize: vertical
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
    outline: 2px solid #8b9bf0;
    outline-offset: 2px
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 16px
}

label input,
label select,
label textarea {
    display: block;
    margin-top: 6px
}

h1 {
    font-size: 26px;
    line-height: 1.4;
    letter-spacing: -.5px;
    margin: 0 0 6px
}

h2 {
    font-size: 18px;
    margin: 0 0 14px
}

p {
    margin: 8px 0 20px
}

.muted {
    color: var(--muted)
}

.small {
    font-size: 12px
}

.error {
    color: #ac263b;
    margin: 10px 0;
    white-space: pre-wrap
}

.error:empty {
    display: none
}

.brand {
    font-size: 21px;
    font-weight: 700;
    color: #18243b;
    display: block;
    letter-spacing: 1px
}

.brand span {
    display: block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    color: #738198;
    margin-top: 3px
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #f6f8fc;
    padding: 24px
}

.login-box {
    width: 400px;
    max-width: 100%;
    padding: 38px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 10px 40px #15234b08
}

.login-box .brand {
    margin-bottom: 38px
}

.login-box h1 {
    font-size: 23px
}

.login-box form {
    margin-top: 25px
}

.login-box .primary {
    width: 100%
}

[hidden] {
    display: none !important
}

aside {
    position: fixed;
    width: 216px;
    inset: 0 auto 0 0;
    padding: 30px 20px;
    background: #f7f9fc;
    border-right: 1px solid var(--line);
    z-index: 3
}

nav {
    margin-top: 40px
}

nav a {
    display: block;
    padding: 11px 16px;
    margin: 5px 0;
    border-radius: 6px;
    color: #59667b;
    font-weight: 500
}

nav a.active {
    color: #3449b9;
    background: #eaf0ff
}

nav a:hover {
    background: #edf1f8
}

.aside-note {
    position: absolute;
    bottom: 25px;
    color: #8791a4;
    font-size: 12px;
    left: 36px
}

.workspace {
    margin-left: 216px
}

header {
    height: 76px;
    border-bottom: 1px solid var(--line);
    padding: 0 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}

.account {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px
}

.account button {
    border: 0;
    padding: 6px;
    color: #67758c
}

#content {
    padding: 34px;
    max-width: 1600px;
    margin: auto;
    outline: none
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 26px
}

.page-head p {
    margin: 6px 0 0
}

.toolbar {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    margin: 22px 0
}

.toolbar label {
    margin: 0;
    min-width: 125px;
    flex: 1;
    max-width: 220px;
    font-size: 12px;
    color: var(--muted)
}

.toolbar input,
.toolbar select {
    font-size: 14px;
    padding: 7px 10px;
    height: 38px
}

.toolbar button {
    height: 38px
}

.table-wrap {
    overflow-x: auto;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line)
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px
}

th {
    font-weight: 500;
    color: #718096;
    background: #fafbfd;
    padding: 13px 14px;
    white-space: nowrap
}

td {
    padding: 17px 14px;
    border-top: 1px solid #eef1f5;
    vertical-align: middle;
    max-width: 360px;
    overflow-wrap: anywhere
}

td strong {
    font-weight: 600
}

td .sub {
    display: block;
    color: #8290a4;
    font-size: 12px;
    margin-top: 3px
}

tr:hover td {
    background: #fcfdff
}

.actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    min-width: 100px
}

.actions button {
    font-size: 12px;
    padding: 4px 9px
}

.status {
    display: inline-block;
    font-size: 12px;
    border-radius: 4px;
    background: #eef2f7;
    color: #5a6980;
    padding: 2px 8px;
    white-space: nowrap
}

.status.ok {
    background: #e8f5ef;
    color: #247b57
}

.status.bad {
    background: #fbecef;
    color: #aa3549
}

.status.warn {
    background: #fff3dc;
    color: #8d651c
}

.empty {
    text-align: center;
    padding: 48px;
    color: #7b8799
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 20px
}

.footnote {
    font-size: 12px;
    color: #7b8799;
    margin-top: 20px
}

.stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-block: 1px solid var(--line);
    margin: 28px 0 35px
}

.stat {
    padding: 24px 16px;
    border-right: 1px solid var(--line)
}

.stat:last-child {
    border: 0
}

.stat span {
    color: #718096;
    font-size: 13px
}

.stat strong {
    display: block;
    font-size: 32px;
    font-weight: 600;
    margin-top: 8px;
    font-variant-numeric: tabular-nums
}

.section {
    margin-top: 32px
}

.definition {
    display: grid;
    grid-template-columns: 170px 1fr;
    margin: 0;
    border-top: 1px solid var(--line)
}

.definition dt,
.definition dd {
    margin: 0;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere
}

.definition dt {
    color: var(--muted)
}

pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: #f6f8fc;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 16px;
    font-size: 12px;
    max-height: 420px;
    overflow: auto
}

dialog {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 26px;
    width: 580px;
    max-width: calc(100vw - 32px);
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 90px #17264025
}

dialog::backdrop {
    background: #15233e55
}

.modal-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px
}

.modal-title h2 {
    margin: 0
}

.modal-title button {
    border: 0;
    font-size: 23px;
    padding: 0 7px
}

dialog footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px
}

.form-note {
    color: #718096;
    font-size: 12px;
    margin-top: -8px
}

#notice {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #203455;
    color: #fff;
    border-radius: 7px;
    box-shadow: 0 4px 24px #10204022;
    max-width: 90vw;
    padding: 10px 20px;
    z-index: 10;
    display: none
}

#notice.visible {
    display: block
}

#menu {
    display: none
}

.secret {
    user-select: all
}

.warning {
    padding: 14px;
    background: #fff6e3;
    color: #88621c;
    border-radius: 6px;
    margin-bottom: 20px
}

@media(max-width:1000px) {
    .stats {
        grid-template-columns: repeat(3, 1fr)
    }

    .stat {
        border-bottom: 1px solid var(--line)
    }

    header {
        padding: 0 22px
    }

    .account {
        gap: 8px
    }

    #content {
        padding: 26px 22px
    }
}

@media(max-width:760px) {
    aside {
        display: none;
        width: 216px;
        box-shadow: 10px 0 40px #17264018
    }

    body.nav-open aside {
        display: block
    }

    .workspace {
        margin: 0
    }

    #menu {
        display: block;
        border: 0;
        font-size: 18px
    }

    header {
        height: 64px;
        padding: 0 14px
    }

    header>.muted {
        display: none
    }

    .account {
        margin-left: auto;
        font-size: 12px
    }

    #content {
        padding: 24px 16px
    }

    .page-head {
        align-items: start
    }

    h1 {
        font-size: 23px
    }

    .page-head p {
        font-size: 12px
    }

    .page-head>.primary {
        padding: 7px 10px
    }

    .toolbar {
        gap: 10px
    }

    .toolbar label {
        min-width: 140px;
        max-width: none
    }

    .stats {
        grid-template-columns: repeat(2, 1fr)
    }

    .stat {
        padding: 18px 10px
    }

    .stat strong {
        font-size: 27px
    }

    .definition {
        grid-template-columns: 110px 1fr
    }

    td {
        min-width: 100px
    }

    .login-box {
        padding: 28px
    }
}
.account span { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .account { gap: 4px; } .account span { max-width: 110px; } }

@media (max-width: 760px) { .table-wrap table { min-width: 760px; } }
