/**
 * 通用弹窗 + 表单样式（台账/供求等复用）
 */
.modal-mask {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: flex-end;
    justify-content: center;
}
.modal-mask.show { display: flex; }

/* PC 居中弹窗 */
.modal-mask.center-modal {
    align-items: center;
}
.modal-mask.center-modal .modal-box {
    border-radius: 16px;
    animation: modalFadeIn 0.25s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.modal-box {
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s ease;
}
@keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.modal-title {
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.form-group {
    margin-bottom: 12px;
}
.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-group label.required::before {
    content: '*'; color: var(--danger); margin-right: 2px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}
.form-group textarea { resize: vertical; }

.form-row {
    display: flex;
    gap: 10px;
}
.form-group.half { flex: 1; }

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.modal-actions button { flex: 1; padding: 12px; font-size: 15px; }

/* add-btn */
.add-btn {
    padding: 8px 16px !important;
    font-size: 18px !important;
    font-weight: 700;
    border-radius: 20px !important;
}
