* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    color: #1d2733;
    background: #f4f7fb;
}

.page {
    min-height: 100vh;
}

.hero {
    min-height: 260px;
    display: flex;
    align-items: center;
    padding: 44px 8vw 70px;
    color: #fff;
    background:
        linear-gradient(110deg, rgba(17, 49, 73, .92), rgba(30, 92, 111, .72)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='500' viewBox='0 0 1600 500'%3E%3Crect width='1600' height='500' fill='%232b7a78'/%3E%3Cpath d='M0 380 C240 300 420 420 680 310 C940 200 1080 320 1600 190 L1600 500 L0 500 Z' fill='%23f0b429' opacity='.88'/%3E%3Cpath d='M0 420 C300 350 530 460 780 360 C1030 260 1280 380 1600 250 L1600 500 L0 500 Z' fill='%233f88c5' opacity='.78'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

.hero__content {
    width: min(980px, 100%);
}

.eyebrow {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
}

h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: 0;
}

.subtitle {
    margin: 18px 0 0;
    font-size: 20px;
    color: rgba(255, 255, 255, .88);
}

.form-shell {
    width: min(980px, calc(100% - 40px));
    margin: -42px auto 48px;
    padding: 28px;
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(39, 71, 97, .12);
}

.notice {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 6px;
    line-height: 1.6;
    font-size: 15px;
}

.notice--success {
    color: #135d35;
    background: #e8f6ee;
    border: 1px solid #b8e3ca;
}

.notice--error {
    color: #9a1f20;
    background: #fff0f0;
    border: 1px solid #f0b8b8;
}

.collect-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.upload-note {
    padding: 16px 18px;
    border: 1px solid #c9e1e4;
    border-radius: 8px;
    background: #f2faf9;
}

.upload-note h2 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.4;
    color: #1f6971;
}

.upload-note ol {
    margin: 0;
    padding-left: 22px;
    color: #293846;
    line-height: 1.75;
}

.upload-note li + li {
    margin-top: 4px;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.upload-field {
    padding: 14px;
    border: 1px solid #dce7ee;
    border-radius: 8px;
    background: #fbfdff;
}

.upload-field[data-upload-state="uploading"] {
    border-color: #7fb5bc;
}

.upload-field[data-upload-state="done"] {
    border-color: #8bc8a4;
    background: #f5fcf7;
}

.upload-field[data-upload-state="error"] {
    border-color: #e5a4a4;
    background: #fff8f8;
}

.upload-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7eef4;
}

.upload-progress__bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #277c86;
    transition: width .18s ease;
}

.upload-field[data-upload-state="done"] .upload-progress__bar {
    background: #2f9a57;
}

.upload-field[data-upload-state="error"] .upload-progress__bar {
    background: #c64242;
}

.upload-status {
    min-height: 20px;
    color: #536576;
}

.upload-field[data-upload-state="done"] .upload-status {
    color: #1e7040;
}

.upload-field[data-upload-state="error"] .upload-status {
    color: #a02c2c;
}

.field {
    display: grid;
    gap: 8px;
}

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

.field span {
    font-size: 15px;
    font-weight: 700;
    color: #263748;
}

.field small {
    color: #6a7785;
}

input[type="text"],
input[type="password"],
input[type="file"],
select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    font: inherit;
    border: 1px solid #c9d5df;
    border-radius: 6px;
    background: #fff;
    outline: none;
}

select {
    appearance: auto;
}

input:focus,
select:focus {
    border-color: #277c86;
    box-shadow: 0 0 0 3px rgba(39, 124, 134, .15);
}

.actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

button {
    min-width: 168px;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background: #277c86;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    background: #1f6971;
}

.admin-page {
    min-height: 100vh;
    padding: 32px;
    background: #f4f7fb;
}

.admin-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 auto 22px;
    width: min(1280px, 100%);
}

.admin-header .eyebrow {
    color: #277c86;
}

.admin-header h1 {
    color: #1d2733;
    font-size: 34px;
}

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

.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 6px;
    color: #fff;
    background: #277c86;
    text-decoration: none;
    font-weight: 700;
}

.admin-button--secondary {
    color: #1d2733;
    background: #e3ebf1;
}

.admin-search {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(240px, 360px) auto auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}

.admin-card {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 22px;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(39, 71, 97, .08);
}

.admin-login {
    width: min(420px, 100%);
}

.admin-login form {
    display: grid;
    gap: 18px;
}

.admin-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    color: #263748;
}

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

.admin-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5edf3;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: #263748;
    background: #f6f9fb;
    white-space: nowrap;
}

.attachment-list {
    display: grid;
    gap: 4px;
    min-width: 240px;
}

.attachment-list span {
    display: grid;
    gap: 2px;
}

.attachment-list em {
    color: #6a7785;
    font-style: normal;
    word-break: break-all;
}

.inline-link {
    width: fit-content;
    color: #277c86;
    font-weight: 700;
    text-decoration: none;
}

.inline-link:hover {
    text-decoration: underline;
}

.inline-form {
    margin: 0;
}

.danger-button {
    min-width: 64px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 6px;
    background: #c64242;
    font-size: 14px;
}

.danger-button:hover {
    background: #a82f2f;
}

.empty-cell {
    text-align: center;
    color: #6a7785;
}

@media (max-width: 720px) {
    .hero {
        padding: 36px 22px 64px;
    }

    .form-shell {
        width: calc(100% - 24px);
        padding: 20px;
    }

    .collect-form {
        grid-template-columns: 1fr;
    }

    .admin-search {
        grid-template-columns: 1fr;
    }

    .upload-grid {
        grid-template-columns: 1fr;
    }

    .actions {
        justify-content: stretch;
    }

    button {
        width: 100%;
    }
}
