/* SwappZDynamic Forms - responsive, inherited suite palette, no external assets. */
.szdf-area{max-width:100%;min-width:0}.szdf-area *{box-sizing:border-box}
.szdf-template-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr));gap:12px;margin:22px 0 30px}
.szdf-template{border:1px solid #dce4ef;background:var(--szdo-card-bg,#fff);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:9px;min-width:0}
.szdf-template h3{font-size:16px;margin:0}.szdf-template p{font-size:13px;margin:0;color:var(--szdo-muted,#64748b)}
.szdf-template form{margin-top:auto}.szdf-icon{background:#eff5ff;border-radius:10px;padding:8px;width:42px;height:42px;text-align:center;color:#3351a2;font-size:22px}
.szdf-template--custom{border-color:#9cb5e4}.szdf-template--locked{background:#f6f8fc}
.szdf-table-scroll{overflow-x:auto;width:100%}.szdf-table{width:100%;border-collapse:collapse;font-size:14px;min-width:480px}
.szdf-table td,.szdf-table th{border-bottom:1px solid #e4eaf3;text-align:left;padding:13px 10px}.szdf-actions{display:flex;gap:12px;flex-wrap:wrap}
.szdf-actions a{color:#2e529a;font-weight:700}.szdf-state-actions{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin:16px 0 24px}
.szdf-state-actions form{display:flex;align-items:end;gap:8px;flex-wrap:wrap}.szdf-state-actions label{display:flex;flex-direction:column;gap:5px;font-weight:600;min-width:200px}
.szdf-state-actions input{max-width:380px}.szdf-state-actions input,.szdf-state-actions select,.szdf-field-editor input,.szdf-field-editor select,.szdf-field-editor textarea{border:1px solid #bdcadb;border-radius:9px;padding:9px;background:#fff;color:#182740;font:inherit;max-width:100%}
.szdf-builder-list{display:grid;gap:12px;margin:16px 0}.szdf-field-editor{border:1px solid #dae3f0;border-radius:13px;padding:14px;background:#fbfcfe;min-width:0}
.szdf-editor-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}.szdf-editor-head strong{flex:1}.szdf-editor-head span{color:#66768d;font-size:12px}
.szdf-editor-head button{border:1px solid #d5dfed;border-radius:7px;padding:5px 9px;background:white;cursor:pointer}
.szdf-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.szdf-editor-grid label{display:flex;flex-direction:column;font-weight:600;font-size:13px;gap:4px}.szdf-editor-grid label.szdf-wide{grid-column:1/-1}
.szdf-editor-grid label.szdf-check{flex-direction:row;align-items:center}.szdf-editor-grid label small{font-size:12px;color:#617185}
.szdf-builder-footer{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:18px 0}
.szdf-builder-footer label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:650}
.szdf-response{margin:12px 0;border:1px solid #dce3ef;border-radius:12px;padding:13px}.szdf-response summary{cursor:pointer}
.szdf-response dl{display:grid;grid-template-columns:170px 1fr;gap:7px 18px;word-break:break-word}.szdf-response dt{font-weight:700}.szdf-response dd{margin:0;white-space:pre-wrap}
.szdf-response-actions{display:flex;gap:10px;flex-wrap:wrap}.szdf-alert{border-radius:10px;padding:12px 14px;background:#fff4e9;color:#713c18}.szdf-muted{color:#68788e}
/* Public route */
body.szdo-forms-public{margin:0;background:#f2f5fa;color:#19263e;font:16px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.szdf-public-wrap{max-width:780px;margin:0 auto;padding:clamp(16px,4vw,45px)}.szdf-public-wrap *{box-sizing:border-box}
.szdf-brand{color:#3157a9;font-weight:850;letter-spacing:.04em;margin-bottom:14px}
.szdf-public-card{padding:clamp(20px,5vw,42px);border:1px solid #dce3ee;border-radius:18px;background:#fff;box-shadow:0 12px 35px rgba(23,45,80,.06)}
.szdf-public-card h1{font-size:clamp(23px,5vw,34px);line-height:1.2;margin:0 0 10px}.szdf-public-card>p{color:#51627a;margin-bottom:22px}
.szdf-field{margin:0 0 20px}.szdf-field>label{font-weight:700;display:block;margin-bottom:6px}.szdf-field>small{display:block;color:#60718c;margin-bottom:6px}
.szdf-field input:not([type="checkbox"]):not([type="radio"]),.szdf-field textarea,.szdf-field select{display:block;width:100%;border:1px solid #bccbdb;border-radius:9px;padding:11px 12px;font:inherit;background:#fff;color:inherit;max-width:100%}
.szdf-field textarea{min-height:110px}.szdf-field input[type="checkbox"],.szdf-field input[type="radio"]{width:18px;height:18px;accent-color:#3156c8}
.szdf-field .szdf-inline{display:flex;align-items:center;gap:10px;font-weight:500;margin:8px 0}.szdf-step-actions{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}
.szdf-step-actions button,.szdf-repeat button{font:inherit;border:1px solid #a9bbd3;background:#f1f5fc;color:#254376;border-radius:10px;padding:11px 17px;cursor:pointer}
.szdf-step-actions button.szdf-primary{border-color:#3156c8;background:#3156c8;color:white;font-weight:700}.szdf-step-actions button:focus-visible,.szdf-repeat button:focus-visible{outline:3px solid #ffbf50}
.szdf-public-card>form>small{color:#52647a;display:block}.szdf-trap{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.szdf-repeat-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) auto;gap:8px;margin:8px 0;border:1px solid #dbe4ef;padding:10px;border-radius:9px}
.szdf-repeat-row label{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:650}.szdf-repeat-row button{align-self:center}.szdf-estimate{padding:14px;background:#edf5ff;color:#174d83;border-radius:10px;font-weight:700}
.szdf-field[hidden],.szdf-step-actions button[hidden],.szdf-estimate[hidden],[data-builder-error][hidden]{display:none!important}
@media(max-width:620px){.szdf-editor-grid{grid-template-columns:1fr}.szdf-response dl{grid-template-columns:1fr;gap:2px}.szdf-response dd{margin-bottom:9px}.szdf-repeat-row{grid-template-columns:1fr}.szdf-field-editor{padding:11px}.szdf-template-list{grid-template-columns:1fr}}
.szdf-response-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;margin-top:20px}
.szdf-lang-switch{display:flex;gap:8px;font-size:13px}.szdf-lang-switch a{color:#345aa8;text-decoration:underline}

/* Progressive enhancement: desktop drag ordering; accessible arrow controls remain. */
.szdf-drag-handle{cursor:grab;user-select:none;touch-action:none;padding:5px 8px;border:1px solid #c9d4e4;border-radius:7px;background:#fff;color:#475569;font-weight:700;line-height:1;display:inline-flex;align-items:center;justify-content:center}
.szdf-drag-handle:active{cursor:grabbing}.szdf-field-editor.ui-sortable-helper{box-shadow:0 8px 24px rgba(25,38,62,.15)}

/* Signature pads: no third-party tracking or drawing dependencies. */
.szdf-signature{display:grid;gap:8px;justify-items:start}.szdf-signature canvas{width:min(100%,600px);height:auto;background:#fff;border:1px solid #aab9ce;border-radius:10px;touch-action:none;cursor:crosshair}.szdf-signature canvas[aria-invalid="true"]{outline:2px solid #bd3d36}.szdf-signature button{border:1px solid #bdcadc;padding:8px 12px;border-radius:9px;background:#fff;cursor:pointer}
/* Extended form controls: responsive, accessible and fully first-party. */
.szdf-settings{margin:16px 0;padding:17px;border:1px solid #dbe4ef;border-radius:14px;background:#fcfdff;max-width:100%}
.szdf-settings summary{font-weight:700;cursor:pointer;padding:8px 0;color:#21447f}
.szdf-settings>details{margin-top:12px}
.szdf-settings form{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:12px;align-items:end;padding:12px 0}
.szdf-settings form label{display:grid;gap:5px;font-size:13px;font-weight:650;min-width:0}
.szdf-settings form input:not([type="checkbox"]),.szdf-settings form select{width:100%;max-width:100%;padding:10px;border:1px solid #bac8da;border-radius:8px;background:#fff;color:#17263c}
.szdf-settings form label.szdf-inline{display:flex;flex-direction:row;align-items:start;gap:9px;grid-column:1/-1}
.szdf-settings form .szdf-alert,.szdf-settings form h4{grid-column:1/-1}
.szdf-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0}
.szdf-stats>div{border:1px solid #dce5f0;border-radius:11px;padding:12px;background:#fff;display:flex;flex-direction:column;gap:4px;min-width:0}
.szdf-stats strong{font-size:clamp(18px,3vw,25px);color:#243f7c;line-height:1.2}
.szdf-stats span{font-size:12px;color:#556984}
.szdf-save-draft{padding:15px;border:1px solid #dce4ee;border-radius:12px;background:#f8fbff;display:grid;gap:9px;margin:14px 0}
.szdf-save-draft label{display:grid;gap:7px;font-size:14px;font-weight:650}
.szdf-save-draft input{width:100%;min-width:0;max-width:420px;border:1px solid #b8c8dd;border-radius:9px;padding:10px;font:inherit}
.szdf-save-draft button{justify-self:start;border:1px solid #95b2d8;background:#fff;color:#244b8b;border-radius:9px;padding:9px 14px;font:inherit;font-weight:700;cursor:pointer}
.szdf-save-draft small{display:block;color:#5c6e87}
.szdf-review{border:1px solid #d7e1f0;border-radius:16px;box-shadow:0 25px 55px rgba(12,30,60,.2);padding:clamp(16px,4vw,28px);color:#17263c;max-height:85vh;max-width:min(650px,92vw);width:100%;overflow-y:auto}
.szdf-review::backdrop{background:rgba(16,29,52,.6)}
.szdf-review h2{margin:0 0 12px;font-size:clamp(19px,3vw,25px)}
.szdf-review dl{display:grid;grid-template-columns:minmax(100px,35%) minmax(0,1fr);gap:7px 12px;max-height:45vh;overflow:auto}
.szdf-review dt{font-weight:700;word-break:break-word}.szdf-review dd{margin:0;word-break:break-word;white-space:pre-wrap}
@media(max-width:480px){.szdf-stats{grid-template-columns:1fr}.szdf-review dl{grid-template-columns:1fr}.szdf-review dd{margin-bottom:8px}.szdf-settings{padding:12px}}
