/* Elenco e editor moduli */
.moduli-page .gf-alert,
.reg-public .gf-alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.gf-alert-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gf-alert-err {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.gf-list-head,
.gf-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gf-list-head {
    margin-bottom: 0.75rem;
}

.gf-list-head h1,
.gf-top h1 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 600;
    color: #1d2327;
}

.gf-btn,
.gf-btn-primary,
.gf-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 4px;
    padding: 0.45rem 0.9rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    box-sizing: border-box;
}

.gf-btn {
    background: #fff;
    color: #2c3338;
    border: 1px solid #8c8f94;
}

.gf-btn:hover {
    background: #f6f7f7;
}

.gf-btn.is-current {
    background: #e7eefc;
    border-color: #4a69bd;
    color: #1d3f8a;
}

.gf-btn-primary {
    background: #4a69bd;
    color: #fff;
    border: 1px solid #4a69bd;
}

.gf-btn-primary:hover {
    background: #3c55a5;
    color: #fff;
}

.gf-btn-danger {
    background: #fff;
    color: #b32d2e;
    border: 1px solid #b32d2e;
}

.gf-btn:disabled,
.gf-btn-primary:disabled {
    opacity: 0.55;
    cursor: default;
}

.gf-views-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.gf-views {
    font-size: 0.92rem;
}

.gf-views a {
    color: #4a69bd;
    text-decoration: none;
}

.gf-views a.is-current {
    color: #1d2327;
    font-weight: 600;
}

.gf-views .sep {
    color: #c3c4c7;
    margin: 0 0.35rem;
}

.gf-search {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.gf-search input,
.gf-input,
.gf-select,
.gf-textarea {
    border: 1px solid #8c8f94;
    border-radius: 4px;
    padding: 0.45rem 0.6rem;
    font: inherit;
    font-size: 0.9rem;
    background: #fff;
    box-sizing: border-box;
}

.gf-search-field {
    min-width: 220px;
    max-width: 320px;
}

.gf-search-op {
    min-width: 130px;
}

.gf-search-value {
    min-width: 220px;
    max-width: 520px;
}

.gf-bulk-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.gf-bulk-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.gf-pager {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #50575e;
    font-size: 0.88rem;
}

.gf-pager a,
.gf-pager span {
    display: inline-flex;
    min-width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #fff;
    color: #2c3338;
    text-decoration: none;
    padding: 0 6px;
}

.gf-pager .is-disabled {
    opacity: 0.45;
}

.gf-pager .gf-page-label {
    border: 0;
    background: transparent;
    min-width: 0;
}

.gf-table-wrap {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    overflow-x: auto;
}

.gf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.gf-table th {
    text-align: left;
    padding: 10px 12px;
    background: #f6f7f7;
    color: #50575e;
    font-weight: 600;
    border-bottom: 1px solid #dcdcde;
    white-space: nowrap;
}

.gf-table th a {
    color: inherit;
    text-decoration: none;
}

.gf-table th a:hover {
    color: #4a69bd;
}

.gf-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: top;
    color: #2c3338;
}

.gf-table tbody tr:hover td {
    background: #f0f6fc;
}

.gf-title-link {
    color: #4a69bd;
    font-weight: 600;
    text-decoration: none;
}

.gf-title-link:hover {
    text-decoration: underline;
}

.gf-row-actions {
    margin-top: 4px;
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 0 4px;
}

.gf-row-actions a,
.gf-row-actions button {
    background: none;
    border: 0;
    padding: 0;
    color: #4a69bd;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.gf-row-actions .sep {
    color: #c3c4c7;
}

.gf-row-actions .danger {
    color: #b32d2e;
}

.gf-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 2px 10px 2px 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #b7e1c1;
    background: #f6fff8;
    color: #1e7e34;
    white-space: nowrap;
}

.gf-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    display: inline-block;
}

.gf-status-inattivo {
    border-color: #dcdcde;
    background: #f6f7f7;
    color: #646970;
}

.gf-status-inattivo i {
    background: #a7aaad;
}

.gf-muted {
    color: #646970;
}

.gf-empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: #646970;
}

.gf-modal[hidden] {
    display: none !important;
}

.gf-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px;
}

.gf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.gf-modal-card {
    position: relative;
    background: #fff;
    width: min(680px, 100%);
    border-radius: 8px;
    padding: 1.25rem 1.4rem 1.4rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    max-height: calc(100vh - 96px);
    overflow: auto;
}

.gf-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.5rem;
}

.gf-modal-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.gf-icon-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    color: #50575e;
}

.gf-hint {
    color: #646970;
    font-size: 0.88rem;
    margin: 0 0 1rem;
}

.gf-share-label,
.gf-set label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0.75rem 0 0.3rem;
    color: #1d2327;
}

.gf-copy {
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.gf-copy input,
.gf-copy textarea,
.gf-set input[type="text"],
.gf-set textarea,
.gf-set select,
.gf-title-input {
    width: 100%;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    padding: 0.5rem 0.6rem;
    font: inherit;
    font-size: 0.9rem;
    box-sizing: border-box;
    background: #fff;
}

.gf-copy textarea {
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
}

.gf-title-input {
    font-size: 1.25rem;
    font-weight: 600;
    border-color: transparent;
    background: transparent;
    min-width: 220px;
    flex: 1;
}

.gf-title-input:hover,
.gf-title-input:focus {
    border-color: #8c8f94;
    background: #fff;
    outline: none;
}

.gf-meta {
    width: 100%;
    color: #646970;
    font-size: 0.85rem;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.gf-top {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #f4f6f9;
    padding: 4px 0 12px;
    margin-bottom: 8px;
}

.gf-editor-body {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    min-height: 68vh;
}

.gf-canvas {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 12px;
    align-content: start;
    padding: 16px;
    min-width: 0;
}

.gf-empty {
    grid-column: 1 / -1;
    border: 1px dashed #c3c4c7;
    border-radius: 6px;
    padding: 2.5rem 1rem;
    text-align: center;
    color: #646970;
}

.gf-palette {
    width: 280px;
    flex: 0 0 280px;
    border-left: 1px solid #dcdcde;
    background: #f6f7f7;
    padding: 12px;
    box-sizing: border-box;
    position: sticky;
    top: 12px;
    align-self: flex-start;
    max-height: calc(100vh - 24px);
    overflow: auto;
}

.gf-palette h3 {
    margin: 12px 0 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #646970;
}

.gf-palette h3:first-child {
    margin-top: 0;
}

.gf-palette-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.gf-palette-btn {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 10px 6px;
    text-align: center;
    font-size: 11px;
    line-height: 1.25;
    cursor: pointer;
    color: #1d2327;
    font-family: inherit;
}

.gf-palette-btn i {
    display: block;
    font-size: 16px;
    margin-bottom: 6px;
    color: #50575e;
}

.gf-palette-btn:hover {
    border-color: #4a69bd;
    color: #4a69bd;
}

.gf-palette-btn:hover i {
    color: #4a69bd;
}

.gf-field {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 10px 12px 12px;
    box-sizing: border-box;
    min-width: 0;
}

.gf-field.w-12 { grid-column: span 12; }
.gf-field.w-8 { grid-column: span 8; }
.gf-field.w-6 { grid-column: span 6; }
.gf-field.w-4 { grid-column: span 4; }
.gf-field.w-3 { grid-column: span 3; }

.gf-field.is-selected {
    border-color: #4a69bd;
    box-shadow: 0 0 0 1px #4a69bd;
}

.gf-field.is-dragging {
    opacity: 0.55;
}

.gf-field-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.gf-drag {
    cursor: grab;
    color: #a7aaad;
    letter-spacing: -2px;
    user-select: none;
    padding: 0 2px;
}

.gf-field-label {
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gf-field-tools {
    display: flex;
    gap: 2px;
}

.gf-field-tools button {
    border: 0;
    background: transparent;
    color: #50575e;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.gf-field-tools button:hover {
    background: #f0f6fc;
    color: #4a69bd;
}

.gf-field-tools button.danger:hover {
    color: #b32d2e;
}

.gf-field-tools button:disabled {
    opacity: 0.3;
    cursor: default;
}

.gf-field-settings {
    display: none;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f1;
}

.gf-field.is-selected .gf-field-settings {
    display: block;
}

.gf-logic {
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 1px solid #dcdcde;
}

.gf-logic-body {
    margin-top: 0.7rem;
}

.gf-logic-sentence {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.7rem;
}

.gf-logic-sentence select,
.gf-logic-rule select,
.gf-logic-rule input {
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    padding: 0.4rem 0.5rem;
    font: inherit;
    font-size: 0.88rem;
}

.gf-logic-rule {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.gf-logic-rule select,
.gf-logic-rule input {
    flex: 1 1 140px;
    min-width: 0;
}

.gf-logic-add,
.gf-logic-del {
    width: 32px;
    height: 32px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.gf-logic-badge {
    margin-left: 8px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #e7eefc;
    color: #1d3f8a;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.gf-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0.7rem;
    font-size: 0.88rem;
}

.gf-scadenza-box {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f1;
}

.gf-set label.gf-check {
    display: flex;
    margin-top: 0;
}

.gf-set .gf-hint {
    margin: 0.28rem 0 0;
    font-size: 0.8rem;
}

.gf-hint-err {
    color: #b32d2e;
    font-weight: 600;
}

.gf-check .gf-help {
    flex: 0 0 auto;
}

.gf-scadenza[hidden] {
    display: none !important;
}

.gf-scadenza-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gf-scadenza-row input {
    border: 1px solid #8c8f94;
    border-radius: 4px;
    padding: 0.5rem 0.6rem;
    font: inherit;
    font-size: 0.95rem;
    background: #fff;
}

.gf-html-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.gf-html-placeholder {
    background: #f6f7f7;
    border-radius: 4px;
    padding: 10px 12px;
    color: #646970;
    font-size: 0.85rem;
}

.gf-html-placeholder strong {
    display: block;
    color: #1d2327;
    margin-bottom: 4px;
}

.gf-set textarea {
    min-height: 70px;
    resize: vertical;
}

/* Registrazioni */
.gf-detail {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}

.gf-detail h2 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}

.gf-dl {
    display: grid;
    grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
    gap: 12px 24px;
    align-items: start;
    margin: 0;
}

.gf-dl dt,
.gf-dl dd {
    min-width: 0;
}

.gf-dl dt {
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #50575e;
    overflow-wrap: anywhere;
}

.gf-dl dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.gf-detail-lines {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.gf-reg-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.gf-cell {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Modulo pubblico */
body.mf-public {
    margin: 0;
    background: #eef1f6;
    color: #1d2327;
    font-family: Inter, sans-serif;
    min-height: 100vh;
}

.mf-public-footer {
    text-align: center;
    padding: 4px 16px 28px;
    font-size: 0.9rem;
}

.mf-public-footer a {
    color: #4a69bd;
    font-weight: 600;
    text-decoration: none;
}

.mf-public-footer a:hover {
    text-decoration: underline;
}

.mf-wrap {
    max-width: 920px;
    margin: 32px auto 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(20, 30, 60, 0.06);
    border-top: 4px solid #4a69bd;
    padding: 28px 32px 36px;
}

.mf-wrap h1 {
    margin: 0 0 0.4rem;
    font-size: 1.45rem;
    line-height: 1.3;
}

.mf-intro {
    color: #50575e;
    margin: 0 0 1.25rem;
    white-space: pre-wrap;
}

.mf-banner {
    background: #fff8e5;
    border: 1px solid #f0d48a;
    color: #6b5300;
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.mf-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px 16px;
}

.mf-col.w-12 { grid-column: span 12; }
.mf-col.w-8 { grid-column: span 8; }
.mf-col.w-6 { grid-column: span 6; }
.mf-col.w-4 { grid-column: span 4; }
.mf-col.w-3 { grid-column: span 3; }

.mf-col.mf-nascosto {
    display: none !important;
}

.mf-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.mf-req {
    color: #d63638;
}

.mf-desc {
    margin: 0 0 8px;
    color: #50575e;
    font-size: 0.92rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    white-space: pre-wrap;
}

.mf-desc.mf-html-body {
    white-space: normal;
}

.mf-control {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    border-bottom: 1px solid #8c8f94;
    border-radius: 0;
    background: transparent;
    padding: 8px 2px;
    font: inherit;
    font-size: 1rem;
    color: inherit;
}

.mf-control:focus {
    outline: none;
    border-bottom-color: #4a69bd;
    box-shadow: inset 0 -1px 0 #4a69bd;
}

textarea.mf-control {
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 8px 10px;
    resize: vertical;
}

textarea.mf-control:focus {
    box-shadow: 0 0 0 1px #4a69bd;
}

.mf-split,
.mf-date {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mf-date {
    grid-template-columns: 1fr 1.4fr 1fr;
}

.mf-address {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.mf-address .mf-span-2 {
    grid-column: 1 / -1;
}

.mf-span-2 {
    grid-column: span 2;
}

.mf-sub {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #50575e;
}

.mf-choices {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mf-choice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    color: #1d2327;
}

.mf-choice input {
    margin-top: 3px;
}

.mf-file {
    font: inherit;
}

.mf-sign {
    position: relative;
    margin-bottom: 1.6rem;
}

.mf-sign-pad {
    display: block;
    width: 100%;
    height: 140px;
    border: 1px dashed #c3c4c7;
    border-radius: 4px;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
}

.mf-sign-clear {
    position: absolute;
    right: 2px;
    bottom: -26px;
    border: 0;
    background: transparent;
    color: #a7aaad;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    padding: 2px;
}

.mf-sign-clear svg {
    display: block;
    width: 16px;
    height: 16px;
}

.mf-sign-clear:hover {
    color: #1d2327;
}

.mf-sign-saved {
    display: block;
    max-width: min(360px, 100%);
    height: auto;
    background: #fff;
    border: 1px dashed #c3c4c7;
    border-radius: 4px;
}

.mf-sign-error {
    margin: 1.5rem 0 0;
}

.mf-hint,
.mf-legend {
    color: #646970;
    font-size: 0.82rem;
    margin: 6px 0 0;
}

.mf-error {
    color: #b32d2e;
    font-size: 0.82rem;
    margin: 6px 0 0;
}

.mf-col.is-invalid .mf-control {
    border-bottom-color: #b32d2e;
}

.mf-number {
    display: flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    padding: 0 8px 0 12px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #fff;
}

.mf-number:focus-within {
    border-color: #4a69bd;
    box-shadow: 0 0 0 1px #4a69bd;
}

.mf-number-symbol {
    flex: 0 0 auto;
    color: #1d2327;
    font-weight: 600;
}

.mf-number .mf-number-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    border: 0;
    box-shadow: none;
    padding: 8px 0;
    background: transparent;
}

.mf-number .mf-number-input:focus {
    border: 0;
    box-shadow: none;
}

.mf-spin {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 0 0 auto;
    width: 22px;
    height: 26px;
    border: 1px solid #e1e3e8;
    border-radius: 3px;
    background: #f6f7f9;
    overflow: hidden;
}

.mf-spin button,
.mf-spin .mf-spin-up,
.mf-spin .mf-spin-down {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 13px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6b7280;
    line-height: 1;
}

.mf-spin button {
    cursor: pointer;
}

.mf-spin button:hover {
    background: #eceef2;
    color: #1d2327;
}

.mf-spin-caret {
    display: block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.mf-spin-up .mf-spin-caret {
    border-bottom: 4px solid currentColor;
}

.mf-spin-down .mf-spin-caret {
    border-top: 4px solid currentColor;
}

.mf-col.is-invalid .mf-number {
    border-color: #b32d2e;
    box-shadow: none;
}

.mf-col.is-invalid .mf-number:focus-within {
    border-color: #b32d2e;
    box-shadow: 0 0 0 1px #b32d2e;
}

.mf-section {
    border-bottom: 1px solid #dcdcde;
    padding-bottom: 6px;
}

.mf-section h2,
.mf-html h2 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.mf-html-body {
    font-size: 0.95rem;
    line-height: 1.5;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.mf-consent-text {
    margin: 0 0 10px;
    color: #50575e;
}

.mf-html-body p {
    margin: 0 0 0.6rem;
}

.mf-html-body ul,
.mf-html-body ol {
    margin: 0 0 0.6rem 1.25rem;
}

.mf-html-body a {
    color: #4a69bd;
}

.mf-html-body pre {
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.gf-set .tox-tinymce {
    border-radius: 4px;
    max-width: 100%;
}

.mf-actions {
    margin-top: 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.mf-actions .mf-submit {
    margin-left: auto;
}

.mf-submit {
    background: #4a69bd;
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 0.75rem 1.4rem;
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
}

.mf-submit:disabled {
    opacity: 0.65;
    cursor: default;
}

.mf-hp {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.mf-thanks {
    text-align: center;
    padding: 1rem 0 0.5rem;
}

.mf-thanks h1 {
    margin-bottom: 0.75rem;
}

.mf-thanks p {
    color: #50575e;
    line-height: 1.5;
}

.mf-thanks .mf-submit {
    display: inline-block;
    text-decoration: none;
    margin-top: 0.5rem;
}

.mf-unavailable {
    text-align: center;
    padding: 1rem 0;
}

.reg-public {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.reg-public h1 {
    margin: 0.2rem 0;
    font-size: 1.5rem;
}

@media (max-width: 1100px) {
    .gf-editor-body {
        flex-direction: column;
    }

    .gf-palette {
        width: auto;
        flex: none;
        position: static;
        max-height: none;
        border-left: 0;
        border-top: 1px solid #dcdcde;
    }
}

@media (max-width: 800px) {
    .gf-field,
    .mf-col {
        grid-column: span 12 !important;
    }

    .mf-wrap {
        margin: 12px;
        padding: 20px 16px 28px;
    }

    .mf-date,
    .mf-address,
    .mf-split,
    .gf-dl {
        grid-template-columns: 1fr;
    }

    .mf-span-2 {
        grid-column: span 1;
    }
}

.mf-list-head,
.mf-list-row {
    display: grid;
    grid-template-columns: repeat(var(--mf-cols, 1), minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: center;
}

.mf-list-head {
    margin-bottom: 6px;
    color: #1d2327;
    font-size: 0.92rem;
}

.mf-list-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mf-list .mf-control {
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #fff;
    padding: 8px 10px;
    min-height: 42px;
}

.mf-list .mf-control:focus {
    border-color: #4a69bd;
    box-shadow: 0 0 0 1px #4a69bd;
}

.mf-list-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mf-list-add,
.mf-list-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #8c8f94;
    border-radius: 50%;
    background: #fff;
    color: #1d2327;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.mf-list-add[hidden],
.mf-list-del[hidden] {
    display: none;
}

.gf-list-settings {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gf-list-col .gf-logic-add,
.gf-list-col .gf-logic-del {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.gf-col-drag {
    width: 16px;
    color: #646970;
    text-align: center;
    cursor: grab;
    user-select: none;
}

.gf-list-col input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    padding: 0.45rem 0.6rem;
    font: inherit;
}

.gf-list-col input[type="checkbox"] {
    appearance: none;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 2px solid #8c8f94;
    border-radius: 50%;
    background: #fff;
}

.gf-list-col input[type="checkbox"]:checked {
    border-color: #4a69bd;
    background: #4a69bd;
    box-shadow: inset 0 0 0 3px #fff;
}

.gf-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #646970;
    color: #fff;
    font-size: 0.72rem;
    cursor: help;
}

@media (max-width: 800px) {
    .mf-list-head,
    .mf-list-row {
        grid-template-columns: 1fr;
    }

    .mf-list-head span:empty {
        display: none;
    }
}
