/* =========================================================
   需求·测试用例生成器 - Req Testcase Generator
   De-AI 工业风：三步流程 + 双栏导图 + 表格编辑器
   ========================================================= */

.rtg-root {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: var(--font-mono, 'JetBrains Mono', Consolas, monospace);
}

/* ---------- 步骤进度条 ---------- */
.rtg-stepper {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--color-bg-panel);
    border: 2px solid var(--color-border-primary);
    border-radius: 0 14px 0 14px;
    box-shadow: 4px 4px 0 var(--color-shadow-hard);
    overflow: hidden;
}

.rtg-step {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: var(--color-bg-tag);
    border-right: 1px dashed var(--color-border-secondary);
    transition: all 140ms ease-out;
    user-select: none;
}

.rtg-step:last-child { border-right: none; }

.rtg-step:hover:not(.rtg-step--locked) {
    background: var(--color-bg-hover);
}

.rtg-step--active {
    background: var(--color-bg-accent) !important;
    color: var(--color-text-inverse);
}

.rtg-step--done {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.rtg-step--locked {
    opacity: 0.45;
    cursor: not-allowed;
}

.rtg-step__idx {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    border: 2px solid currentColor;
    border-radius: 0 8px 0 8px;
    flex-shrink: 0;
}

.rtg-step__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rtg-step__title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.rtg-step__desc {
    font-size: 11px;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 通用面板骨架 ---------- */
.rtg-panel {
    background: var(--color-bg-panel);
    border: 2px solid var(--color-border-primary);
    border-radius: 0 14px 0 14px;
    box-shadow: 4px 4px 0 var(--color-shadow-hard);
    overflow: hidden;
}

.rtg-panel__hd {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 2px solid var(--color-border-primary);
    background:
        linear-gradient(var(--pattern-grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--pattern-grid-line) 1px, transparent 1px),
        var(--color-bg-elevated-soft);
    background-size: 18px 18px;
}

.rtg-panel__ttl {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--color-text-primary);
}

.rtg-panel__ttl svg { width: 16px; height: 16px; }

.rtg-panel__bd {
    padding: 18px;
    background-image:
        radial-gradient(var(--pattern-dots-line) 1px, transparent 1px);
    background-size: 14px 14px;
    background-position: 0 0;
}

.rtg-panel__ft {
    padding: 12px 18px;
    border-top: 1px dashed var(--color-border-secondary);
    background: var(--color-bg-elevated-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---------- 通用按钮 ---------- */
.rtg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 18px;
    font-family: var(--font-mono, 'JetBrains Mono', Consolas, monospace);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--color-text-primary);
    background: var(--color-bg-panel);
    border: 2px solid var(--color-border-primary);
    border-radius: 0 10px 0 10px;
    cursor: pointer;
    transition: all 120ms ease-out;
    box-shadow: 2px 2px 0 var(--color-shadow-hard);
    white-space: nowrap;
}

.rtg-btn svg { width: 14px; height: 14px; }

.rtg-btn:hover:not(:disabled) {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--color-shadow-hard);
    background: var(--color-bg-hover);
}

.rtg-btn:active:not(:disabled) {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 var(--color-shadow-hard);
}

.rtg-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.rtg-btn--accent {
    background: var(--color-bg-accent);
    color: var(--color-text-inverse);
}

.rtg-btn--accent:hover:not(:disabled) {
    background: #3a3631;
}

.rtg-btn--danger {
    color: var(--color-error);
    border-color: var(--color-error);
    box-shadow: 2px 2px 0 var(--color-error);
}

.rtg-btn--sm {
    height: 30px;
    padding: 0 12px;
    font-size: 11px;
    box-shadow: 1px 1px 0 var(--color-shadow-hard);
}

.rtg-btn--ghost {
    background: var(--color-bg-tag);
    box-shadow: none;
    border-color: var(--color-border-secondary);
}

/* ---------- Step 1: 输入区 ---------- */
.rtg-s1-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .rtg-s1-grid { grid-template-columns: 1fr; }
}

.rtg-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rtg-field__lbl {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-secondary);
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rtg-field__lbl::before {
    content: "";
    width: 4px;
    height: 14px;
    background: var(--color-accent-primary);
    border-radius: 0 3px 0 3px;
}

.rtg-field__control {
    position: relative;
}

.rtg-input, .rtg-textarea, .rtg-select {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 13px;
    color: var(--color-text-primary);
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-border-secondary);
    border-radius: 0 10px 0 10px;
    outline: none;
    transition: all 120ms ease-out;
    box-sizing: border-box;
}

.rtg-textarea {
    min-height: 340px;
    resize: vertical;
    line-height: 1.7;
}

.rtg-input:focus, .rtg-textarea:focus, .rtg-select:focus {
    border-color: var(--color-border-primary);
    box-shadow: 0 0 0 3px var(--color-accent-alpha);
}

.rtg-textarea--drag {
    border-color: var(--color-accent-primary);
    background: var(--color-accent-bg);
}

/* ---------- 文件上传 ---------- */
.rtg-upload {
    border: 2px dashed var(--color-border-secondary);
    border-radius: 0 12px 0 12px;
    padding: 30px 20px;
    text-align: center;
    background: var(--color-bg-elevated);
    cursor: pointer;
    transition: all 140ms ease-out;
}

.rtg-upload:hover, .rtg-upload--over {
    border-color: var(--color-accent-primary);
    background: var(--color-accent-bg);
    transform: translateY(-1px);
}

.rtg-upload__icon {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-border-primary);
    border-radius: 0 12px 0 12px;
    background: var(--color-bg-tag);
    margin-bottom: 10px;
}

.rtg-upload__icon svg { width: 22px; height: 22px; color: var(--color-text-primary); }

.rtg-upload__txt {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.rtg-upload__sub {
    margin-top: 4px;
    font-size: 11px;
    color: var(--color-text-tertiary);
}

.rtg-file-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rtg-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: var(--color-bg-tag);
    border: 1.5px solid var(--color-border-tertiary);
    border-radius: 0 8px 0 8px;
    font-size: 12px;
}

.rtg-file-item__nm {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rtg-file-item__sz { color: var(--color-text-tertiary); }

.rtg-remove-file {
    width: 22px; height: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--color-error);
    border-radius: 0 6px 0 6px;
    color: var(--color-error);
    cursor: pointer;
    background: transparent;
    font-size: 12px; font-weight: 800;
}

.rtg-remove-file:hover { background: var(--color-error-bg); }

/* ---------- 维度多选 ---------- */
.rtg-dims {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: var(--color-bg-tag);
    border: 1.5px solid var(--color-border-tertiary);
    border-radius: 0 10px 0 10px;
}

.rtg-dim {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 2px solid var(--color-border-secondary);
    border-radius: 0 8px 0 8px;
    background: var(--color-bg-elevated);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: all 100ms ease-out;
}

.rtg-dim:hover { background: var(--color-bg-hover); }

.rtg-dim input { display: none; }

.rtg-dim--on {
    background: var(--color-bg-accent);
    color: var(--color-text-inverse);
    border-color: var(--color-bg-accent);
}

.rtg-dim__dot {
    width: 8px; height: 8px;
    border: 2px solid currentColor;
    border-radius: 0 2px 0 2px;
    opacity: 0.6;
}

.rtg-dim--on .rtg-dim__dot { opacity: 1; background: currentColor; }

/* ---------- Step 2: 导图 + 大纲 ---------- */
.rtg-s2-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
    min-height: 500px;
}

@media (max-width: 1100px) {
    .rtg-s2-grid { grid-template-columns: 1fr; }
}

.rtg-mindmap-wrap {
    width: 100%;
    height: 100%;
    min-height: 520px;
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-border-tertiary);
    border-radius: 0 12px 0 12px;
    overflow: hidden;
    position: relative;
}

.rtg-mindmap-wrap svg, .rtg-mindmap-wrap .markmap {
    width: 100%;
    height: 100%;
}

.rtg-outline {
    width: 100%;
    min-height: 520px;
    padding: 14px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.8;
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-border-tertiary);
    border-radius: 0 12px 0 12px;
    outline: none;
    resize: vertical;
    color: var(--color-text-primary);
    tab-size: 4;
    white-space: pre;
}

.rtg-outline:focus {
    border-color: var(--color-border-primary);
    box-shadow: 0 0 0 3px var(--color-accent-alpha);
}

.rtg-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    padding: 40px 20px;
    min-height: 260px;
}

.rtg-loading__spin {
    width: 38px;
    height: 38px;
    border: 3px solid var(--color-border-tertiary);
    border-top-color: var(--color-accent-primary);
    border-radius: 0 12px 0 12px;
    animation: rtg-spin 700ms linear infinite;
}

@keyframes rtg-spin {
    to { transform: rotate(360deg); }
}

.rtg-loading__txt {
    font-size: 12px;
    color: var(--color-text-secondary);
    letter-spacing: 0.4px;
}

/* ---------- Step 3: 用例表 ---------- */
.rtg-s3-tabs {
    display: inline-flex;
    gap: 0;
    border: 2px solid var(--color-border-primary);
    border-radius: 0 10px 0 10px;
    overflow: hidden;
    background: var(--color-bg-tag);
}

.rtg-tab {
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    border-right: 1px dashed var(--color-border-secondary);
    font-family: inherit;
    letter-spacing: 0.3px;
}

.rtg-tab:last-child { border-right: none; }

.rtg-tab--on {
    background: var(--color-bg-accent);
    color: var(--color-text-inverse);
}

.rtg-tbl-wrap {
    width: 100%;
    overflow-x: auto;
    border: 2px solid var(--color-border-tertiary);
    border-radius: 0 12px 0 12px;
    background: var(--color-bg-elevated);
    max-height: 560px;
    overflow-y: auto;
}

.rtg-tbl {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    min-width: 1200px;
}

.rtg-tbl thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 12px;
    text-align: left;
    background: var(--color-bg-accent);
    color: var(--color-text-inverse);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.4px;
    border-bottom: 2px solid var(--color-border-primary);
    border-right: 1px solid rgba(250,247,242,0.15);
    white-space: nowrap;
}

.rtg-tbl thead th:last-child { border-right: none; }

.rtg-tbl tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-border-divider);
    border-right: 1px dashed var(--color-border-divider);
    vertical-align: top;
    color: var(--color-text-primary);
    line-height: 1.65;
}

.rtg-tbl tbody td:last-child { border-right: none; }

.rtg-tbl tbody tr:nth-child(even) td { background: var(--color-bg-elevated-soft); }

.rtg-tbl tbody tr:hover td { background: var(--color-accent-bg); }

.rtg-cell {
    cursor: pointer;
    min-height: 34px;
    padding: 4px 6px;
    border-radius: 0 6px 0 6px;
    transition: all 100ms ease-out;
    word-break: break-word;
    white-space: pre-wrap;
}

.rtg-cell:hover {
    background: var(--color-bg-hover);
    outline: 1.5px dashed var(--color-accent-primary);
}

.rtg-cell--edit {
    cursor: text;
    background: var(--color-bg-elevated);
    outline: 2px solid var(--color-accent-primary) !important;
}

.rtg-cell textarea {
    width: 100%;
    min-height: 60px;
    padding: 4px;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    resize: vertical;
    color: inherit;
    line-height: 1.65;
}

.rtg-row-chk {
    width: 16px; height: 16px;
    accent-color: var(--color-accent-primary);
    cursor: pointer;
}

.rtg-prio {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.4px;
    border: 1.5px solid;
    border-radius: 0 5px 0 5px;
}

.rtg-prio--P0 { color: var(--color-error); border-color: var(--color-error); background: var(--color-error-bg); }
.rtg-prio--P1 { color: var(--color-accent-primary); border-color: var(--color-accent-primary); background: var(--color-accent-bg); }
.rtg-prio--P2 { color: var(--color-warning); border-color: var(--color-warning); background: var(--color-warning-bg); }
.rtg-prio--P3 { color: var(--color-info); border-color: var(--color-info); background: var(--color-accent-bg); }

.rtg-type-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    background: var(--color-bg-tag);
    border: 1.5px solid var(--color-border-secondary);
    border-radius: 0 5px 0 5px;
    color: var(--color-text-secondary);
}

.rtg-stat-bar {
    display: inline-flex;
    gap: 14px;
    font-size: 11px;
    color: var(--color-text-tertiary);
    align-items: center;
}

.rtg-stat-bar strong {
    color: var(--color-text-primary);
    font-size: 13px;
    margin: 0 2px;
}

/* ---------- Markdown 视图 ---------- */
.rtg-md-view {
    width: 100%;
    min-height: 520px;
    max-height: 620px;
    padding: 16px;
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-border-tertiary);
    border-radius: 0 12px 0 12px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.75;
    color: var(--color-text-primary);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-y: auto;
    resize: vertical;
    outline: none;
}

.rtg-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--color-text-tertiary);
    font-size: 13px;
    background: var(--color-bg-elevated);
    border: 2px dashed var(--color-border-tertiary);
    border-radius: 0 12px 0 12px;
}

.rtg-empty svg {
    width: 40px; height: 40px;
    margin-bottom: 10px;
    opacity: 0.6;
}

.rtg-empty__txt { font-weight: 700; color: var(--color-text-secondary); margin-bottom: 4px; }
.rtg-empty__sub { font-size: 11px; }

/* ---------- AI 模型选择条（Step1 右栏） ---------- */
.rtg-model-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.rtg-model-row .rtg-select {
    flex: 1;
}

.rtg-model-tpl {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.rtg-tpl-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 26px;
    padding: 0 10px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--color-text-secondary);
    background: var(--color-bg-tag);
    border: 1.5px solid var(--color-border-secondary);
    border-radius: 0 6px 0 6px;
    cursor: pointer;
    transition: all 120ms ease-out;
    box-shadow: 1px 1px 0 var(--color-shadow-hard);
}

.rtg-tpl-chip:hover {
    color: var(--color-text-primary);
    border-color: var(--color-border-primary);
    background: var(--color-bg-hover);
    transform: translate(-1px, -1px);
}

.rtg-tpl-chip:active {
    transform: translate(1px, 1px);
    box-shadow: 0 0 0 var(--color-shadow-hard);
}

/* ---------- 模态：AI 模型管理 ---------- */
.rtg-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(20, 18, 16, 0.55);
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
    animation: rtg-fadeIn 160ms ease-out;
}

.rtg-modal {
    width: 100%;
    max-width: 920px;
    max-height: calc(100vh - 40px);
    background: var(--color-bg-panel);
    border: 2.5px solid var(--color-border-primary);
    border-radius: 0 16px 0 16px;
    box-shadow: 8px 8px 0 var(--color-shadow-hard);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: rtg-popIn 200ms cubic-bezier(.2,.8,.2,1);
}

@keyframes rtg-fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes rtg-popIn {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0)     scale(1);     }
}

.rtg-modal__hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--color-bg-elevated-soft);
    border-bottom: 2px solid var(--color-border-primary);
}

.rtg-modal__ttl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 900;
    color: var(--color-text-primary);
    letter-spacing: 0.5px;
}

.rtg-modal__ttl::before {
    content: "";
    width: 6px;
    height: 18px;
    background: var(--color-accent-primary);
    border-radius: 0 4px 0 4px;
}

.rtg-modal__close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-tag);
    border: 2px solid var(--color-border-secondary);
    border-radius: 0 8px 0 8px;
    cursor: pointer;
    color: var(--color-text-secondary);
    font-size: 16px;
    font-weight: 900;
    transition: all 120ms ease-out;
}

.rtg-modal__close:hover {
    background: var(--color-error-bg);
    border-color: var(--color-error);
    color: var(--color-error);
    transform: translate(-1px, -1px);
}

.rtg-modal__bd {
    padding: 16px 18px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
}

@media (max-width: 820px) {
    .rtg-modal__bd { grid-template-columns: 1fr; }
}

.rtg-modal__ft {
    padding: 12px 18px;
    border-top: 2px dashed var(--color-border-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--color-bg-elevated-soft);
}

/* ---- 左：模型列表 ---- */
.rtg-mlist {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 340px;
}

.rtg-mlist__hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.rtg-mlist__ttl {
    font-size: 12px;
    font-weight: 800;
    color: var(--color-text-secondary);
    letter-spacing: 0.4px;
}

.rtg-mrow {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 2px solid var(--color-border-secondary);
    border-radius: 0 10px 0 10px;
    background: var(--color-bg-elevated);
    cursor: pointer;
    transition: all 120ms ease-out;
}

.rtg-mrow:hover {
    border-color: var(--color-border-primary);
    transform: translateX(-2px);
    background: var(--color-bg-hover);
}

.rtg-mrow--on {
    border-color: var(--color-accent-primary);
    background: var(--color-accent-bg);
    box-shadow: 2px 2px 0 var(--color-accent-primary);
}

.rtg-mrow__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--color-border-tertiary);
    flex-shrink: 0;
}

.rtg-mrow__dot--ok   { background: var(--color-success); border-color: var(--color-success); }
.rtg-mrow__dot--wait { background: transparent; }

.rtg-mrow__bd { flex: 1; min-width: 0; }
.rtg-mrow__nm {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rtg-mrow__ds {
    font-size: 10.5px;
    color: var(--color-text-tertiary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rtg-mrow__lock {
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 900;
    color: var(--color-text-inverse);
    background: var(--color-text-tertiary);
    border-radius: 0 4px 0 4px;
    letter-spacing: 0.3px;
}

.rtg-mrow__def {
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 900;
    color: var(--color-accent-primary);
    border: 1.5px solid var(--color-accent-primary);
    background: var(--color-bg-panel);
    border-radius: 0 4px 0 4px;
    letter-spacing: 0.3px;
}

/* ---- 右：表单 ---- */
.rtg-mform {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 2px solid var(--color-border-secondary);
    border-radius: 0 12px 0 12px;
    background: var(--color-bg-elevated);
    min-height: 340px;
}

.rtg-mform__hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px dashed var(--color-border-tertiary);
    margin-bottom: 2px;
}

.rtg-mform__ttl {
    font-size: 13px;
    font-weight: 900;
    color: var(--color-text-primary);
    letter-spacing: 0.4px;
}

.rtg-frow {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rtg-frow--2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rtg-flbl {
    font-size: 11px;
    font-weight: 800;
    color: var(--color-text-secondary);
    letter-spacing: 0.3px;
}

.rtg-flbl span {
    color: var(--color-error);
    margin-left: 2px;
    font-weight: 900;
}

.rtg-finp, .rtg-fsel {
    width: 100%;
    height: 34px;
    padding: 0 12px;
    font-family: inherit;
    font-size: 12.5px;
    color: var(--color-text-primary);
    background: var(--color-bg-panel);
    border: 2px solid var(--color-border-secondary);
    border-radius: 0 8px 0 8px;
    outline: none;
    transition: all 120ms ease-out;
    box-sizing: border-box;
}

textarea.rtg-finp {
    height: auto;
    min-height: 64px;
    padding: 8px 12px;
    resize: vertical;
    line-height: 1.6;
}

.rtg-finp:focus, .rtg-fsel:focus {
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 3px var(--color-accent-alpha);
}

.rtg-finp:disabled, .rtg-fsel:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--color-bg-tag);
}

.rtg-fhint {
    font-size: 10.5px;
    color: var(--color-text-tertiary);
    line-height: 1.5;
}

.rtg-ferr {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-error);
    padding: 6px 10px;
    background: var(--color-error-bg);
    border: 1.5px dashed var(--color-error);
    border-radius: 0 6px 0 6px;
}

.rtg-warn {
    padding: 10px 12px;
    background: var(--color-warning-bg);
    border: 2px dashed var(--color-warning);
    border-radius: 0 10px 0 10px;
    color: var(--color-text-primary);
    font-size: 11px;
    line-height: 1.65;
}

.rtg-warn b { color: var(--color-warning); font-weight: 900; }

.rtg-tplbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 8px 10px;
    background: var(--color-bg-tag);
    border: 1.5px dashed var(--color-border-tertiary);
    border-radius: 0 8px 0 8px;
}

.rtg-tplbar__lbl {
    font-size: 10.5px;
    font-weight: 800;
    color: var(--color-text-tertiary);
    letter-spacing: 0.4px;
    margin-right: 2px;
}

.rtg-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

