* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-size: inherit;
    font-family: inherit;
}

input {
    font-family: inherit;
    font-size: inherit;
}

/* ─── 表格标题列截断 ──────────────────────────── */
.td-title {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── 分页扩展状态 ────────────────────────────── */
.page-btn.disabled {
    color: #ccc;
    border-color: #e8e8e8;
    cursor: not-allowed;
    pointer-events: none;
}

.page-ellipsis {
    padding: 0 4px;
    color: #bbb;
    font-size: 13px;
    line-height: 28px;
    user-select: none;
}

/* ─── 每页条数选择器 ──────────────────────────── */
.page-size-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #999;
}

.page-size-select {
    height: 28px;
    padding: 0 6px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    color: #555;
    font-family: inherit;
    cursor: pointer;
}

/* ─── 表格加载/空状态 ─────────────────────────── */
.table-state-cell {
    text-align: center;
    padding: 40px 0;
    color: #bbb;
    font-size: 13px;
}

/* ══════════════════════════════════════════════
   Modal 弹窗
   ══════════════════════════════════════════════ */

/* 遮罩层 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* 对话框容器 */
.modal-dialog {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(-24px);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.modal-overlay.active .modal-dialog {
    transform: scale(1) translateY(0);
}

/* 头部 */
.modal-header {
    height: 52px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-x {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 20px;
    cursor: pointer;
    font-style: normal;
    flex-shrink: 0;
    margin-left: 12px;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.modal-x:hover {
    background: #f0f0f0;
    color: #444;
}

/* 主体 */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.modal-body.modal-body-flush {
    padding: 0;
    overflow: hidden;
}

.modal-body iframe {
    display: block;
    width: 100%;
    border: none;
}

/* 底部 */
.modal-footer {
    height: 56px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

/* ─── 提示型弹窗 ──────────────────────────────── */
.modal-alert {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 8px 4px;
    gap: 16px;
}

.modal-alert-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-alert-icon.type-success { background: #f6ffed; color: #52c41a; }
.modal-alert-icon.type-error   { background: #fff1f0; color: #ff4d4f; }
.modal-alert-icon.type-warning { background: #fffbe6; color: #faad14; }
.modal-alert-icon.type-confirm { background: #e6f4ff; color: #1890ff; }

.modal-alert-icon svg {
    width: 32px;
    height: 32px;
}

.modal-alert-content {}

.modal-alert-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.modal-alert-msg {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    word-break: break-word;
}

/* ─── 业务弹窗表单 ────────────────────────────── */
.modal-form-item {
    margin-bottom: 16px;
}

.modal-form-item:last-child {
    margin-bottom: 0;
}

.modal-form-label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}

.modal-form-label.required::before {
    content: '*';
    color: #ff4d4f;
    margin-right: 3px;
}

.modal-form-input,
.modal-form-select,
.modal-form-textarea {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    outline: none;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-form-textarea {
    height: auto;
    padding: 8px 10px;
    resize: vertical;
    line-height: 1.6;
}

.modal-form-input:focus,
.modal-form-select:focus,
.modal-form-textarea:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.modal-form-input.error,
.modal-form-textarea.error {
    border-color: #ff4d4f;
}

.modal-form-tip {
    font-size: 12px;
    color: #ff4d4f;
    margin-top: 4px;
    display: none;
}
