/* AI 一键填充面板 —— 独立样式，不依赖任何 scoped hash */
.aif-panel {
    margin: 0 0 12px;
    border: 1px dashed #b6e2da;
    border-radius: 10px;
    background: #f2faf8;
    overflow: hidden;
    font-family: inherit;
    transition: border-color .18s ease, background .18s ease;
}
.aif-panel:hover { border-color: #0d9488; }
.aif-panel.open { border-style: solid; border-color: #cfebe5; background: #fff; }

.aif-hd {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 13px;
    cursor: pointer;
    user-select: none;
}
.aif-ic { flex: none; font-size: 13px; line-height: 1; color: #0d9488; }
.aif-tt { flex: none; font-size: 13px; font-weight: 700; color: #0d9488; }
.aif-sub {
    flex: 1; min-width: 0; font-size: 12px; color: #6b7280;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.aif-arw { flex: none; font-size: 12px; color: #6b7280; }

.aif-bd { padding: 0 13px 11px; }

.aif-ta {
    display: block; width: 100%; box-sizing: border-box;
    min-height: 90px; max-height: 220px; padding: 9px 11px;
    font-family: inherit; font-size: 13px; line-height: 1.7;
    color: #1f2937; background: #fff;
    border: 1px solid #d5e6e2; border-radius: 8px;
    outline: none; resize: vertical;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.aif-ta:focus { border-color: #0d9488; box-shadow: 0 0 0 3px rgba(13,148,136,.1); }
.aif-ta::placeholder { color: #a9b4c0; font-size: 12px; line-height: 1.7; }

.aif-ft { display: flex; align-items: center; gap: 8px; margin-top: 9px; }

.aif-msg {
    flex: 1; min-width: 0; font-size: 12px; line-height: 1.5;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.aif-msg.aif-tip  { color: #6b7280; }
.aif-msg.aif-ok   { color: #0d9488; font-weight: 600; }
.aif-msg.aif-warn { color: #d97706; font-weight: 600; }

.aif-btn {
    flex: none; padding: 5px 14px; font-family: inherit; font-size: 12px;
    line-height: 1.4; border-radius: 7px; cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
}
.aif-btn.aif-ghost {
    background: #fff; border: 1px solid #d5e6e2; color: #4b5563;
}
.aif-btn.aif-ghost:hover { border-color: #b9c3cd; color: #1f2937; }
.aif-btn.aif-primary {
    background: #0d9488; border: 1px solid #0d9488; color: #fff; font-weight: 600;
}
.aif-btn.aif-primary:hover { background: #0b857a; border-color: #0b857a; }
.aif-btn.aif-primary:disabled { opacity: .6; cursor: default; }

/* 被填充的输入框短暂高亮 */
@keyframes aifFlash {
    0%   { background: #d9f5ee; box-shadow: 0 0 0 2px rgba(13,148,136,.35); }
    100% { background: #fff;    box-shadow: 0 0 0 2px rgba(13,148,136,0); }
}
input.aif-flash, textarea.aif-flash {
    animation: aifFlash 1.8s ease-out;
}
