/* 附件在线预览 */
.admin-container .card {
    margin-bottom: 16px;
}

.admin-container .card:last-child {
    margin-bottom: 0;
}

.admin-container .card > h2:first-child {
    margin-top: 0;
}
.ap-preview-btn {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: var(--mn-radius-sm, 4px);
    background: transparent;
    color: var(--mn-primary, #2563eb);
    font-size: 12px;
    line-height: 18px;
    vertical-align: middle;
    cursor: pointer;
}

.ap-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 120;
}

.ap-modal.is-open {
    display: block;
}

.ap-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.ap-modal-box {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    flex-direction: column;
    width: min(960px, 92vw);
    height: min(720px, 86vh);
    transform: translate(-50%, -50%);
    border-radius: var(--mn-radius-lg, 10px);
    background: var(--mn-bg-elevated, #fff);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    overflow: hidden;
}

.ap-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--mn-border, #e5e7eb);
}

.ap-modal-title {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-modal-close {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--mn-text-muted, #6b7280);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.ap-modal-body {
    flex: 1;
    overflow: auto;
    padding: 0;
    background: var(--mn-bg-subtle, #f3f4f6);
}

.ap-modal-body iframe,
.ap-modal-body img {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
}

.ap-modal-body pre {
    margin: 0;
    padding: 14px;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.ap-zip-list {
    margin: 0;
    padding: 12px 18px;
    list-style: none;
    font-size: 13px;
}

.ap-zip-list li {
    padding: 5px 0;
    border-bottom: 1px dashed var(--mn-border, #e5e7eb);
    word-break: break-all;
}

.ap-loading,
.ap-error {
    padding: 22px;
    color: var(--mn-text-muted, #6b7280);
    font-size: 13px;
    text-align: center;
}

.ap-error {
    color: #b91c1c;
}

/* 后台 */
.ap-alert {
    margin-bottom: 12px;
    padding: 9px 12px;
    border-radius: var(--mn-radius, 8px);
    font-size: 13px;
}

.ap-alert.ok {
    background: rgba(22, 163, 74, .1);
    color: #15803d;
}

.ap-form {
    max-width: 720px;
}

.ap-form .admin-card {
    margin-bottom: 16px;
}

.ap-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    font-size: 13px;
}

.ap-field,
.ap-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.ap-field input {
    width: 90px;
    padding: 7px 9px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: var(--mn-radius, 8px);
    background: var(--mn-bg, #fff);
    color: var(--mn-text, #1f2328);
}
