/* Formularios compartidos, opt-in. Superficies/tonos: cards.css; acciones: buttons.css. */
.th-form-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr); gap: 1.25rem; align-items: start; }
.th-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.th-form-grid > .th-form-panel { display: flex; }
.th-form-grid .th-card-body { flex: 1; }
.th-form-grid .th-form { margin-top: auto; }
.th-form-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.th-form-panel .th-card-body { padding: var(--th-space-6); }
.th-form-heading { display: flex; align-items: flex-start; gap: .875rem; margin-bottom: 1.25rem; min-width: 0; }
.th-form-heading > div { min-width: 0; }
.th-form-heading .th-card-title { overflow-wrap: anywhere; }
.th-form-description { margin: 0; color: #5c6d87; font-size: var(--th-text-sm); line-height: 1.6; overflow-wrap: anywhere; }
.th-form-kicker { display: block; margin-bottom: .25rem; color: rgb(var(--card-accent)); font-size: var(--th-text-xs); font-weight: var(--th-weight-bold); letter-spacing: .06em; text-transform: uppercase; }
.th-form { --bs-border-radius: var(--th-radius-control); min-width: 0; }
.th-form :is(.form-control, .form-select) { min-width: 0; min-height: var(--th-control-height); color: var(--th-color-text); font-size: var(--th-text-base); }
.th-form :where(.form-control, .form-select) { border-color: var(--th-color-control-border); }
.th-form .form-label { margin-bottom: .5rem; color: var(--th-color-label); font-weight: var(--th-weight-semibold); }
.th-form .input-group { min-width: 0; }
.th-form .input-group-text { color: #5b7397; background: #edf2f9; border-color: var(--th-color-control-border); }
.th-form :where(.form-control, .form-select):focus { border-color: var(--th-color-focus); box-shadow: var(--th-focus-ring); }
.th-form :is(.form-control, .form-select):disabled { background-color: #edf1f7; color: #65738b; opacity: 1; }
.th-form .form-control[readonly] { background-color: #f3f6fb; }
.th-form .form-control[type="file"] { overflow: hidden; }
.th-form .form-control::file-selector-button { color: #405b82; background: #edf2f9; font-weight: var(--th-weight-medium); }
.th-form .form-text { color: var(--th-color-muted); line-height: 1.5; }
.th-form-field { min-width: 0; padding: 1rem; border: 1px solid #e1e8f2; border-radius: .875rem; background: linear-gradient(130deg, #f5f8fd, #fff); }
.th-form-field:focus-within { border-color: #a6bce4; }
.th-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid #e1e7f1; }
.th-form-note { padding: 1rem; border: 1px solid #dbe5f4; border-radius: .875rem; color: #506581; background: #f0f5fc; font-size: var(--th-text-sm); line-height: 1.6; overflow-wrap: anywhere; }
.th-form-note li + li { margin-top: .5rem; }
.th-form-note--danger { color: #92384a; background: #fff2f5; border-color: #efccd5; }
.th-form-subtitle { margin: 1.25rem 0 .75rem; color: var(--th-color-label); font-size: var(--th-text-sm); font-weight: var(--th-weight-semibold); }
.th-form-downloads { display: grid; gap: .625rem; }
.th-form-downloads .th-btn { justify-content: flex-start; }
.th-form-query { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; gap: 1rem; }
.th-form-query > * { min-width: 0; }
.th-form-results { min-width: 0; }
.th-form-results-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: 1.25rem; }
@media (max-width: 991.98px) {
    .th-form-layout, .th-form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767.98px) {
    .th-form-query { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .th-form-query > :first-child { grid-column: 1 / -1; }
    .th-form-panel .th-card-body { padding: 1rem; }
    .th-form-heading { gap: .75rem; }
    .th-form-field { padding: .875rem; }
    .th-form-actions > .th-btn { flex: 1 1 auto; }
    .th-form-results-heading { padding: 1rem; }
}
@media (max-width: 359.98px) {
    .th-form-query { grid-template-columns: minmax(0, 1fr); }
}
