/* ——— Pagina registrazione (layout split + hero) ——— */
.page-register {
    --reg-teal: #0d5c5c;
    --reg-teal-dark: #094848;
    --reg-page-bg: #eef0f2;
    --reg-input-bg: #e8eaed;
    --reg-link: #0c5656;
    --reg-link-hover: #094040;
    --reg-submit-bg: #b0da70;
    --reg-submit-hover: #a2cf5e;
    --reg-submit-color: #0c5656;

    min-height: 100%;
    min-height: 100vh;
    margin: 0;
    background-color: var(--reg-page-bg);
    background-image: url("../images/background.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.register-site-header {
    max-width: 56rem;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 0.75rem;
    text-align: left;
}

.register-logo {
    display: block;
    max-height: 4.5rem;
    max-width: min(100%, 18rem);
    width: auto;
    height: auto;
    object-fit: contain;
}

.register-shell {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0.5rem 1rem 2.5rem;
}

.register-split {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    border-radius: 0.65rem;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    background: #fff;
}

.register-hero {
    flex: 1 1 17rem;
    padding: 2rem 1.75rem;
    background: linear-gradient(160deg, var(--reg-teal) 0%, var(--reg-teal-dark) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.register-hero-title {
    margin: 0 0 0.75rem;
    padding: 0;
    font-size: clamp(1.35rem, 1.2rem + 1vw, 1.75rem);
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
}

.register-hero-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 400;
}

.register-hero-html .register-hero-line {
    margin: 0 0 0.75rem;
}

.register-hero-html .register-hero-line:last-child {
    margin-bottom: 0;
}

.register-hero a,
.register-hero a:visited {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
}

.register-hero a:hover,
.register-hero a:focus {
    color: #fff;
    opacity: 0.92;
}

.register-form-panel {
    flex: 1 1 17rem;
    padding: 2rem 1.75rem 2.25rem;
    background: #fff;
}

.register-form-panel form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.register-form-title {
    margin: 0 0 0.35rem;
    padding: 0;
    font-size: clamp(1.35rem, 1.15rem + 1vw, 1.6rem);
    font-weight: 700;
    color: var(--reg-teal);
}

.register-form-lead {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.45;
}

.register-form-lead p {
    margin: 0 0 0.5rem;
}

.register-form-lead p:last-child {
    margin-bottom: 0;
}

.register-banner {
    margin-bottom: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.35rem;
    font-size: 0.9rem;
}

.register-banner.success {
    background: rgba(46, 204, 64, 0.12);
    border: 1px solid #2ecc40;
    color: #166534;
}

.register-banner.error {
    background: rgba(255, 65, 54, 0.1);
    border: 1px solid #ff4136;
    color: #991b1b;
}

.register-result-panel {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.register-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.register-resend-form {
    margin: 0;
}

.register-link-button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    margin: 0;
    padding: 0.75rem 1rem;
    border-radius: 0.45rem;
    border: 1px solid #cbd5e1;
    color: var(--reg-teal);
    background: #f8fafc;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.register-link-button:hover,
.register-link-button:focus {
    background: #eef2f7;
    color: var(--reg-teal-dark);
    border-color: #94a3b8;
    outline: none;
}

.register-form-panel form label:not(.checkable) {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--reg-teal);
}

.register-form-panel form > .register-name-row {
    margin-top: 0;
}

.register-form-panel .register-name-row label {
    margin-top: 0;
}

.register-form-panel .register-name-row > div:first-child label {
    margin-top: 0;
}

.register-form-panel .register-name-row > div:last-child label {
    margin-top: 0;
}

.register-name-row {
    gap: 0.75rem;
}

.register-name-row.flex.two > * {
    min-width: 0;
}

@media (max-width: 28em) {
    .register-name-row.flex.two > * {
        width: 100%;
    }
}

.register-form-panel input[type="text"],
.register-form-panel input[type="email"],
.register-form-panel select {
    width: 100%;
    margin: 0;
    /*padding: 0.65rem 0.85rem;*/
    border: none;
    border-radius: 0.45rem;
    background: var(--reg-input-bg);
    font-size: 1rem;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.register-form-panel input[type="text"]:focus,
.register-form-panel input[type="email"]:focus,
.register-form-panel select:focus {
    outline: none;
    background: #e2e5e9;
    box-shadow: 0 0 0 2px rgba(13, 92, 92, 0.25);
}

.register-form-panel select {
    cursor: pointer;
}

.register-privacy-block {
    margin-top: 1.25rem;
    width: 100%;
}

.register-privacy-row {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-top: 0;
    width: 100%;
}

/* Input a larghezza zero (Picnic); evita che flex dia min-width al primo figlio */
.register-privacy-row input[type="checkbox"] {
    flex: 0 0 0;
    min-width: 0;
    margin: 0;
    align-self: flex-start;
}

.register-privacy-label.checkable {
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 0;
    margin-right: 0;
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.5;
}

/* Link modale in riga sotto (allineato al testo della label, dopo il quadratino) */
.privacy-link-below {
    display: block;
    margin-top: 0.5rem;
    margin-left: 1.75rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--reg-link);
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    text-decoration: underline;
}

.privacy-link-below:hover,
.privacy-link-below:focus {
    color: var(--reg-link-hover);
    outline: none;
}

/* Modal privacy (overlay + iframe) */
body.privacy-modal-open {
    overflow: hidden;
}

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

.privacy-modal-root.is-open {
    display: flex !important;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    box-sizing: border-box;
}

.privacy-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.privacy-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 52rem);
    max-height: min(94vh, 880px);
    display: flex;
    flex-direction: column;
}

.privacy-modal-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 0.85rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    padding: 2rem 2rem 1.75rem;
    max-height: inherit;
    box-sizing: border-box;
}

.privacy-modal-title {
    margin: 0 0 1.1rem;
    padding: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #004d4d;
    text-align: left;
}

.privacy-modal-frame-wrap {
    flex: 1 1 auto;
    min-height: 18rem;
    max-height: min(68vh, 640px);
    overflow: hidden;
    border-radius: 0.35rem;
    background: #f8fafc;
}

.privacy-modal-iframe {
    display: block;
    width: 100%;
    height: min(68vh, 640px);
    min-height: 18rem;
    border: none;
    background: #fff;
}

.privacy-modal-ack {
    margin-top: 1.25rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 0.45rem;
    background: #e9ecef;
    color: #004d4d;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.privacy-modal-ack:hover,
.privacy-modal-ack:focus {
    background: #dee2e6;
    outline: none;
}

.register-form-panel .register-submit {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 1.5rem;
    margin-left: 0;
    margin-right: 0;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.45rem;
    background: var(--reg-submit-bg);
    color: var(--reg-submit-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    text-align: center;
}

.register-form-panel .register-submit:hover,
.register-form-panel .register-submit:focus {
    background: var(--reg-submit-hover);
    color: var(--reg-submit-color);
}

.field-error {
    display: block;
    font-size: 0.85em;
    margin-top: 0.25rem;
    color: red;
}

/* Mobile: pannello teal sopra; ordine DOM = hero poi form */
@media (max-width: 48em) {
    .register-split {
        flex-direction: column;
    }

    .register-hero {
        flex: 1 1;
        min-height: auto;
    }
}

/* ——— Manager ——— */
.page-manager {
    min-height: 100%;
    background: #f5f5f5;
    padding: 1rem;
}

.manager-card {
    max-width: 72rem;
    margin: 0 auto;
    padding: 1rem 1.25rem;
}

.manager-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.manager-toolbar .manager-export-btn {
    flex: 0 0 auto;
    align-self: flex-end;
    margin-left: auto;
}

.manager-toolbar form {
    flex: 1 1 14rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.manager-toolbar input[type="search"] {
    flex: 1 1 12rem;
    max-width: 24rem;
}

.table-wrap {
    overflow-x: auto;
}

.page-manager .table-wrap table {
    width: 100%;
    table-layout: auto;
}

.page-manager table thead th {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35em 0.6em;
}

.manager-meta {
    margin: 0.5rem 0 0;
    color: #555;
    font-size: 0.9em;
}

/* Picnic imposta tutti i nav come barra fissa in alto: qui serve il flusso normale sotto la tabella */
.page-manager .manager-card > nav.pagination {
    position: static;
    inset: auto;
    top: auto;
    left: auto;
    right: auto;
    height: auto;
    min-height: 0;
    padding: 0;
    margin-top: 1.25rem;
    background: transparent;
    box-shadow: none;
    z-index: auto;
    transform: none;
}

.pagination {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.pagination a.button {
    margin: 0;
}

.pagination .current {
    padding: 0.3em 0.6em;
}
