* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 24px 12px 48px;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    background: #f2f4f8;
    color: #1f2430;
}

.wrap {
    max-width: 640px;
    margin: 0 auto;
}

.card {
    background: #fff;
    border-radius: 14px;
    padding: 28px 26px 32px;
    box-shadow: 0 6px 24px rgba(31, 36, 48, .08);
}

h1 {
    font-size: 22px;
    margin: 0 0 6px;
}

.sub {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 20px;
}

.field {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.req {
    color: #e5484d;
}

.opt {
    color: #9aa1ac;
    font-weight: 400;
}

input[type=text],
input[type=tel],
input[type=password] {
    width: 100%;
    padding: 11px 12px;
    font-size: 15px;
    border: 1px solid #d5d9e0;
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s;
}

input[type=text]:focus,
input[type=tel]:focus,
input[type=password]:focus {
    outline: none;
    border-color: #2f6bff;
}

small {
    display: block;
    color: #9aa1ac;
    font-size: 12px;
    margin-top: 5px;
}

.uploads {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 8px;
}

@media (min-width: 560px) {
    .uploads {
        grid-template-columns: repeat(3, 1fr);
    }
}

.upload-item {
    border: 1px dashed #cfd4dd;
    border-radius: 10px;
    padding: 12px;
    background: #fafbfd;
}

.upload-item label {
    font-size: 13px;
    margin-bottom: 8px;
}

input[type=file] {
    width: 100%;
    font-size: 12px;
}

.preview img {
    width: 100%;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #e5e8ef;
    display: block;
}

.preview .err {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #e5484d;
}

.tip {
    color: #9aa1ac;
    font-size: 12px;
    margin: 14px 0 18px;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 13px;
    font-size: 16px;
    color: #fff;
    background: #2f6bff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    background: #2559db;
}

.btn-ghost {
    background: #eef2ff;
    color: #2f6bff;
}

.alert {
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 18px;
}

.alert-error {
    background: #fdecec;
    color: #a5262a;
    border: 1px solid #f7c9cb;
}

.alert-error ul {
    margin: 6px 0 0;
    padding-left: 20px;
}

.success-icon {
    width: 54px;
    height: 54px;
    line-height: 54px;
    text-align: center;
    border-radius: 50%;
    background: #e7f8ee;
    color: #1a9d54;
    font-size: 28px;
    margin-bottom: 14px;
}

.result {
    border: 1px solid #e5e8ef;
    border-radius: 10px;
    padding: 6px 14px;
    margin: 18px 0;
}

.result div {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #eef0f5;
    font-size: 14px;
}

.result div:last-child {
    border-bottom: none;
}

.result span {
    color: #6b7280;
}

.admin-link {
    text-align: center;
    margin: 18px 0 0;
    font-size: 12px;
}

.admin-link a {
    color: #9aa1ac;
    text-decoration: none;
}

/* ===== 后台样式 ===== */
.admin-wrap {
    max-width: 1080px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.topbar h1 {
    margin: 0;
}

.topbar .actions a {
    font-size: 13px;
    color: #2f6bff;
    text-decoration: none;
    margin-left: 12px;
}

.stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.stat {
    flex: 1;
    min-width: 110px;
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(31, 36, 48, .06);
}

.stat b {
    display: block;
    font-size: 22px;
}

.stat span {
    font-size: 12px;
    color: #6b7280;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 11px 10px;
    text-align: left;
    border-bottom: 1px solid #eef0f5;
    vertical-align: middle;
}

th {
    background: #f7f8fb;
    color: #4b5563;
    font-size: 13px;
}

tr:hover td {
    background: #fafbfd;
}

.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 12px;
}

.badge-0 {
    background: #fff5e6;
    color: #b26a00;
}

.badge-1 {
    background: #e7f8ee;
    color: #1a9d54;
}

.badge-2 {
    background: #fdecec;
    color: #a5262a;
}

.thumb {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e8ef;
    margin-right: 4px;
}

.filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.filter input[type=text],
.filter select {
    flex: 1;
    min-width: 140px;
    padding: 9px 10px;
    border: 1px solid #d5d9e0;
    border-radius: 8px;
    font-size: 14px;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    background: #2f6bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-danger {
    background: #e5484d;
}

.btn-ok {
    background: #1a9d54;
}

.pager {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
}

.pager a {
    margin: 0 4px;
    color: #2f6bff;
    text-decoration: none;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.detail-grid figure {
    margin: 0;
    border: 1px solid #e5e8ef;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.detail-grid img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.detail-grid figcaption {
    font-size: 13px;
    color: #6b7280;
    margin-top: 8px;
}

.kv {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 8px 10px;
    font-size: 14px;
    margin-top: 6px;
}

.kv span {
    color: #6b7280;
}

.empty {
    text-align: center;
    color: #9aa1ac;
    padding: 40px 0;
    font-size: 14px;
}
