/* Contenitore principale */
#fax-sicurezza-wrapper {
    max-width: 980px;
    margin: 20px auto;
    font-family: Arial, Helvetica, sans-serif;
}

.fs-card {
    background: #ffffff;
    border: 1px solid #d5d7db;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.fs-card h2 {
    margin-top: 0;
    color: #1a1a1a;
}

/* Form visibile */
#fax-sicurezza-form {
    margin-top: 20px;
}

.fs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.fs-field {
    margin-bottom: 14px;
}

.fs-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #222;
}

.fs-field input[type="text"],
.fs-field input[type="date"],
.fs-field textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #b8bcc2;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
}

.fs-field textarea {
    min-height: 110px;
    resize: vertical;
}

.fs-field input:focus,
.fs-field textarea:focus {
    outline: none;
    border-color: #0b69c2;
    box-shadow: 0 0 0 3px rgba(11, 105, 194, 0.12);
}

.fs-fieldset {
    border: 1px solid #d5d7db;
    border-radius: 8px;
    padding: 16px;
    margin: 0 0 18px;
}

.fs-fieldset legend {
    font-weight: 700;
    padding: 0 8px;
}

.fs-check {
    display: block;
    margin: 8px 0;
    line-height: 1.45;
    cursor: pointer;
}

.fs-check input {
    margin-right: 8px;
}

.fs-check-inline {
    display: inline-block;
    margin-right: 18px;
}

.fs-radio-row {
    display: flex;
    gap: 20px;
    margin: 10px 0;
}

.fs-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.fs-small {
    font-size: 13px;
    color: #444;
    margin-top: 8px;
    margin-bottom: 0;
}

#fax-submit-btn {
    width: 100%;
    border: 0;
    background: #0b69c2;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 18px;
    border-radius: 7px;
    cursor: pointer;
    margin-top: 10px;
}

#fax-submit-btn:hover {
    background: #085299;
}

#fax-submit-btn:disabled {
    background: #7f8b99;
    cursor: not-allowed;
}

#fax-status {
    margin-top: 16px;
}

.fs-notice {
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 600;
}

.fs-info {
    background: #e8f3ff;
    color: #0b5aa5;
    border: 1px solid #b9dcff;
}

.fs-success {
    background: #eaf8ef;
    color: #166534;
    border: 1px solid #bfe8cd;
}

.fs-error {
    background: #fdecec;
    color: #b42318;
    border: 1px solid #f6bcbc;
}

/* Template PDF nascosto */
#fax-pdf-template {
    position: absolute;
    left: -10000px;
    top: 0;
    width: 794px; /* circa A4 a 96dpi */
    background: #ffffff;
    z-index: -1;
}

#fax-pdf-template * {
    box-sizing: border-box;
}

.fax-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #ffffff;
}

.fax-table td {
    border: 1px solid #000000;
    padding: 5px;
    font-size: 11px;
    line-height: 1.35;
    vertical-align: top;
    word-wrap: break-word;
}

.fax-header-cell {
    padding: 8px;
}

.fax-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.fax-header-left {
    flex: 0 0 auto;
}

.fax-logo {
    max-height: 55px;
    width: auto;
}

.fax-logo-text {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
}

.fax-header-right {
    text-align: right;
}

.fax-title {
    font-size: 14px;
    font-weight: 700;
}

.fax-code {
    font-size: 11px;
}

.lbl {
    width: 30%;
    font-weight: 700;
}

.fixed-block {
    line-height: 1.45;
}

.line {
    display: block;
    min-height: 15px;
    white-space: pre-wrap;
}

.inline-line {
    display: inline-block;
    min-width: 180px;
    white-space: pre-wrap;
}

.options-block {
    line-height: 1.55;
}

.option-row {
    margin: 3px 0;
}

.check {
    font-family: monospace;
    font-size: 11px;
    margin-right: 4px;
}

.fax-nested {
    width: 100%;
    border-collapse: collapse;
}

.fax-nested td {
    border: 0;
    padding: 0;
}

.legal-text {
    font-size: 9px;
    line-height: 1.35;
}

.signature-cell {
    font-weight: 700;
}

.signature-box {
    min-height: 95px;
    margin-top: 6px;
    white-space: pre-wrap;
    font-weight: 400;
}

@media (max-width: 767px) {
    .fs-grid {
        grid-template-columns: 1fr;
    }
}