.cache-form-body select,.review-fields select{border:1px solid #d7dce5;border-radius:7px;padding:9px;background:#fff}
.cache-form-body textarea[readonly],.review-fields textarea[readonly]{background:#f1f4f8;color:#526074;cursor:text}
.cache-form-body textarea{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;line-height:1.5}
.cache-form-body label small{font-weight:400;color:#687386;line-height:1.5}
.sql-preview details{padding:10px 12px;border-bottom:1px solid #dfe4ec}
.sql-preview summary{cursor:pointer;font-weight:600}
.sql-preview pre{max-height:230px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}
.preview-table .empty{white-space:normal;line-height:1.6}
.cache-form-body > *{flex-shrink:0}
.logic-dialog{width:min(1100px,92vw)}
.rule-source{max-height:70vh;overflow:auto;margin:0;padding:1rem;background:#101722;color:#dce7f7;border-radius:.6rem;white-space:pre;tab-size:4}
.view-rule-logic{padding:0;border:0;background:none;color:var(--primary);text-decoration:underline;cursor:pointer;font:inherit}
.cache-form-body .sql-preview{flex:none;min-height:60px}
.sql-editor-panel{border:1px solid #d7dce5;border-radius:10px;background:#fff;overflow:hidden}
.sql-editor-tabs{display:flex;gap:4px;padding:7px;background:#f4f6fa;border-bottom:1px solid #d7dce5}
.sql-editor-tabs button{flex:1;border:0;border-radius:6px;padding:11px;cursor:pointer;background:transparent;color:#526074;font-weight:600}
.sql-editor-tabs button[aria-selected=true]{background:#fff;color:#2455c7;box-shadow:0 1px 5px #15294c20}
.sql-editor-tabs button:focus-visible{outline:2px solid #3267e3;outline-offset:-2px}
.sql-tab-panel{padding:14px;display:flex;flex-direction:column;gap:14px}
.sql-tab-panel>label{display:flex;flex-direction:column;gap:8px;font-size:11px;font-weight:600}
.sql-tab-panel textarea{width:100%;resize:vertical;min-height:180px}
.sql-editor-help{margin:0;font-size:11px;line-height:1.5;color:#687386}
.response-editor{border:1px solid #d7dce5;border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:12px}
.response-editor h3{margin:0;font-size:14px}
.response-editor label{display:flex;flex-direction:column;gap:6px;font-size:12px;min-width:0}
.response-editor textarea{font-family:inherit;width:100%;resize:vertical}
#responseFields,#responseRules{display:flex;flex-direction:column;gap:12px}
.answer-rule{padding:12px;border:1px solid #dfe4ec;border-radius:8px;background:#f8fafc;display:flex;flex-direction:column;gap:10px}
.answer-rule-condition{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,1.2fr) minmax(0,1fr) auto;gap:8px;align-items:end}
.answer-rule-condition>span{align-self:center;font-size:11px;font-weight:700}
.answer-rule input,.answer-rule select{width:100%;min-width:0}
.answer-preview{padding:12px;white-space:pre-wrap;overflow-wrap:anywhere;border-bottom:1px solid #dfe4ec}
@media(max-width:900px){.answer-rule-condition{grid-template-columns:1fr 1fr}.answer-rule-condition>span{grid-column:1/-1}}
