/* === 弹窗（确认 / 输入 / 属性 / 编辑器） === */

/* ---- 弹窗 ---- */
.modal {
    position: fixed; inset: 0; z-index: 50;
    display: flex; align-items: center; justify-content: center;
}
.modal.hidden { display: none !important; }
.modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: modalBackdropIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ---- 确认弹窗（退出系统、删除等危险操作） ---- */
.modal-content {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin: 0 20px;
    padding: 32px;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    border: 1px solid #e8eaed;
    border-radius: 18px;
    box-shadow:
        0 28px 72px rgba(0, 0, 0, 0.12),
        0 10px 24px rgba(0, 0, 0, 0.06);
    animation: modalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
    overflow: hidden;
}
/* 弹窗顶部警示条（危险操作） */
.modal-content.danger-modal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ef4444, #f87171, #ef4444, transparent);
    border-radius: 0 0 3px 3px;
}
/* 弹窗顶部警示条（警告操作） */
.modal-content.warning-modal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #f59e0b, #fbbf24, #f59e0b, transparent);
    border-radius: 0 0 3px 3px;
}

.modal-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}
.modal-content input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    background: #f4f6f9;
    color: #1e293b;
    border: 1px solid #e2e6ec;
    border-radius: 10px;
    font-size: 13px;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-content input::placeholder { color: #a0a8b8; }
.modal-content input:focus {
    border-color: #4a9eff;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.1);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

/* 弹窗图标 */
.modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    margin-bottom: 16px;
    position: relative;
}
.modal-icon::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 18px;
    z-index: -1;
    opacity: 0.4;
    filter: blur(10px);
}
.modal-icon.danger-icon {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}
.modal-icon.danger-icon::after {
    background: linear-gradient(135deg, rgba(220,38,38,0.2), rgba(248,113,113,0.1));
}
.modal-icon.warning-icon {
    background: linear-gradient(135deg, #fefce8, #fef9c3);
    color: #b45309;
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.1);
}
.modal-icon.warning-icon::after {
    background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(251,191,36,0.1));
}
.modal-icon.info-icon {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}
.modal-icon.info-icon::after {
    background: linear-gradient(135deg, rgba(37,99,235,0.2), rgba(96,165,250,0.1));
}

.modal-desc {
    font-size: 13px;
    line-height: 1.7;
    color: #64748b;
    margin-bottom: 4px;
}

/* 危险操作弹窗按钮区域 */
.modal-actions .btn-danger {
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}
.modal-actions .btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}
.modal-actions .btn-text {
    color: #7b8494;
    font-weight: 500;
}
.modal-actions .btn-text:hover {
    background: #f4f6f9;
    color: #475569;
}

/* ---- 多输入框弹窗（修改密码） ---- */
.modal-inputs {
    display: flex; flex-direction: column; gap: 10px;
    margin-bottom: 12px;
}
.modal-inputs input {
    width: 100%; height: 40px; padding: 0 12px;
    background: #f9fafb; color: #111827;
    border: 1px solid #e5e7eb; border-radius: 8px;
    font-size: 13px; outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.modal-inputs input::placeholder { color: #9ca3af; }
.modal-inputs input:focus { border-color: #4a9eff; box-shadow: 0 0 0 3px rgba(74,158,255,0.1); }

/* 密码输入字段容器 */
.pwd-field { position: relative; }

/* 密码强度条 */
.pwd-strength {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding-left: 2px;
}
.pwd-strength-bar {
    width: 80px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}
.pwd-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}
.pwd-strength-fill.weak { width: 33%; background: #ef4444; }
.pwd-strength-fill.medium { width: 66%; background: #f59e0b; }
.pwd-strength-fill.strong { width: 100%; background: #10b981; }
.pwd-strength-text {
    font-size: 11px;
    color: #9ca3af;
}
.pwd-strength-text.weak { color: #ef4444; }
.pwd-strength-text.medium { color: #f59e0b; }
.pwd-strength-text.strong { color: #10b981; }

/* 密码一致性指示 */
.pwd-match-text {
    display: block;
    margin-top: 2px;
    padding-left: 2px;
    font-size: 11px;
    min-height: 16px;
}
.pwd-match-text.match { color: #10b981; }
.pwd-match-text.mismatch { color: #ef4444; }

/* ---- 属性弹窗 ---- */
.properties-content { max-width: 400px; }
.properties-list { display: flex; flex-direction: column; gap: 12px; }
.properties-item {
    display: flex; align-items: flex-start; gap: 12px;
}
.properties-label {
    width: 80px; flex-shrink: 0;
    font-size: 12px; color: #9ca3af;
    padding-top: 2px;
}
.properties-value {
    flex: 1; font-size: 13px; color: #111827;
    word-break: break-all;
}

.copy-folder-list {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding-right: 4px;
}
.copy-folder-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}
.copy-folder-item:hover {
    background: #f3f4f6;
    color: #111827;
}
.copy-folder-item.selected {
    background: #eff6ff;
    color: #4a9eff;
    border-color: #bfdbfe;
}

/* ---- 编辑器弹窗 ---- */
.editor-modal {
    position: fixed; inset: 0; z-index: 50;
    display: flex; flex-direction: column;
}
.editor-modal.hidden { display: none !important; }
.editor-wrap { position: relative; display: flex; flex-direction: column; height: 100%; }
.editor-header {
    display: flex; align-items: center; justify-content: space-between;
    height: 48px; padding: 0 16px;
    background: #fff; border-bottom: 1px solid #e5e7eb; flex-shrink: 0;
}
.editor-title { display: flex; align-items: center; gap: 12px; }
.editor-title span:first-child { font-size: 13px; font-weight: 500; color: #111827; }
.editor-status { font-size: 12px; color: #9ca3af; }
.editor-body { flex: 1; }
