* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    color: #17212b;
    background: #f4f6f8;
    font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: #185c9f;
}

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid #1f6feb;
    outline-offset: 2px;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 32px;
    background: #ffffff;
    border-bottom: 1px solid #d8dee4;
}

.brand {
    color: #17212b;
    font-weight: 700;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-links form {
    margin: 0;
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 28px auto 56px;
}

.footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto 24px;
    color: #59636e;
}

.toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel {
    background: #ffffff;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 18px;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    min-height: 38px;
    border: 1px solid #9aa4af;
    border-radius: 6px;
    padding: 8px 10px;
    background: #ffffff;
    color: #17212b;
    font: inherit;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid #1f6feb;
    border-radius: 6px;
    padding: 7px 14px;
    color: #ffffff;
    background: #1f6feb;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button.secondary,
button.secondary {
    color: #17212b;
    background: #ffffff;
    border-color: #9aa4af;
}

button.danger {
    color: #ffffff;
    background: #b42318;
    border-color: #b42318;
}

.link-button {
    min-height: auto;
    border: 0;
    padding: 0;
    color: #185c9f;
    background: transparent;
    font-weight: 400;
    text-decoration: underline;
}

.validation-summary,
.field-validation-error {
    color: #9a3412;
}

.message {
    border: 1px solid #74b816;
    border-radius: 6px;
    padding: 10px 12px;
    color: #2b5a00;
    background: #f4fce3;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid #d8dee4;
    text-align: left;
    vertical-align: top;
}

th {
    background: #eef2f6;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 640px) {
    .top-nav,
    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .nav-links {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}
