/* Registration page — Atelier Vacanze brand redesign */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --av-teal:   #50b7c2;
    --av-teal-d: #3a9aa4;
    --av-beige:  #c5b9a8;
    --av-beige-l:#e8e1d8;
    --av-sand:   #f5f1ec;
    --av-green:  #579941;
    --av-green-d:#467a34;
    --av-dark:   #2d3436;
    --av-gray:   #636e72;
    --av-light:  #fafafa;
    --radius:    12px;
    --shadow:    0 8px 32px rgba(0,0,0,0.10);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
    min-height: 100vh;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    color: var(--av-dark);
    background: var(--av-sand);
    line-height: 1.5;
}

a { text-decoration: none; color: var(--av-teal); }
a:hover { text-decoration: underline; color: var(--av-teal-d); }
img { border: none; }

/* ── Top bar ── */
.top-bar {
    background: linear-gradient(135deg, var(--av-teal), var(--av-teal-d));
    padding: 16px 0;
    box-shadow: 0 2px 12px rgba(80,183,194,0.25);
}

.top-bar-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.top-bar img.logo {
    height: 80px;
    width: auto;
    filter: brightness(0) invert(1);
}

.top-bar .back-link {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.top-bar .back-link:hover {
    color: #fff;
    text-decoration: none;
}

/* ── Page container ── */
.page-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px 40px;
}

/* ── Main card ── */
.reg-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 48px;
    animation: fadeUp 0.5s ease-out;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.reg-card-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--av-dark);
    margin-bottom: 4px;
}

.reg-card-subtitle {
    font-size: 13px;
    color: var(--av-gray);
    margin-bottom: 24px;
}

.card-divider {
    height: 3px;
    border: none;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--av-teal), var(--av-beige));
    margin-bottom: 28px;
}

/* ── Section titles ── */
.section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--av-teal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--av-beige-l);
    margin: 28px 0 18px;
}

.section-title:first-of-type {
    margin-top: 0;
}

/* ── Form grid ── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

/* ── Field ── */
.field {
    display: flex;
    flex-direction: column;
}

.field label {
    font-size: 12px;
    font-weight: 500;
    color: var(--av-gray);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 5px;
}

.field label .req {
    color: #e74c3c;
    font-weight: 700;
    margin-left: 2px;
}

.field input[type=text],
.field input[type=email],
.field input[type=password],
.field select {
    width: 100%;
    padding: 10px 14px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    color: var(--av-dark);
    border: 2px solid var(--av-beige-l);
    border-radius: 8px;
    background: var(--av-light);
    transition: border-color 0.25s, box-shadow 0.25s;
    outline: none;
}

.field input:focus,
.field select:focus {
    border-color: var(--av-teal);
    box-shadow: 0 0 0 3px rgba(80,183,194,0.12);
}

.field select {
    height: 42px;
    cursor: pointer;
}

.field .hint {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
}

/* ── Privacy section ── */
.privacy-box {
    width: 100%;
    height: 90px;
    border: 2px solid var(--av-beige-l);
    border-radius: 8px;
    font-size: 12px;
    color: var(--av-gray);
    line-height: 1.6;
    overflow-y: auto;
    padding: 12px 16px;
    margin-top: 8px;
    background: var(--av-light);
}

.checkbox-privacy {
    margin-top: 14px;
}

.checkbox-privacy label {
    font-size: 13px;
    color: var(--av-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-privacy input[type=checkbox] {
    width: 18px;
    height: 18px;
    accent-color: var(--av-teal);
    cursor: pointer;
}

/* ── Buttons ── */
.btn-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--av-beige-l);
}

.btn {
    padding: 12px 36px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.25s, background 0.25s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--av-teal), var(--av-teal-d));
    color: #fff;
    box-shadow: 0 4px 14px rgba(80,183,194,0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(80,183,194,0.45);
    background: linear-gradient(135deg, var(--av-teal-d), var(--av-teal));
    text-decoration: none;
    color: #fff;
}

.btn-link {
    background: none;
    color: var(--av-gray);
    font-size: 13px;
    padding: 12px 16px;
}

.btn-link:hover {
    color: var(--av-teal);
    text-decoration: none;
}

/* ── Success panel ── */
.success-panel {
    background: linear-gradient(135deg, var(--av-green), var(--av-green-d));
    color: #fff;
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    line-height: 1.8;
    animation: fadeUp 0.5s ease-out;
}

.success-panel strong {
    font-size: 18px;
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 4px 16px;
    border-radius: 6px;
    margin: 6px 0;
    letter-spacing: 2px;
}

.success-panel a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
}

.success-panel a:hover {
    color: rgba(255,255,255,0.85);
}

/* ── Error list ── */
.error-list {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 20px;
    list-style: none;
}

.error-list li {
    color: #c53030;
    font-size: 13px;
    padding: 3px 0;
    font-weight: 500;
}

.error-list li::before {
    content: '⚠ ';
}

/* ── Footer ── */
.page-footer {
    text-align: center;
    padding: 24px 0;
    font-size: 11px;
    color: var(--av-gray);
}

.page-footer img {
    height: 45px;
    width: auto;
    display: block;
    margin: 0 auto 8px;
    opacity: 0.6;
}

/* ── Password strength indicator ── */
.pwd-strength {
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    transition: color 0.2s;
}

/* ── Inline Email OTP Verification ── */
.email-verify-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.email-verify-row input[type=email] {
    flex: 1;
}

.btn-verify {
    padding: 8px 18px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--av-teal), var(--av-teal-d));
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, box-shadow 0.2s;
}

.btn-verify:hover {
    box-shadow: 0 3px 10px rgba(80,183,194,0.35);
}

.btn-verify:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.email-verified {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--av-green);
}

.email-verified svg {
    width: 18px;
    height: 18px;
    color: var(--av-green);
}

.email-otp-area {
    margin-top: 12px;
    padding: 14px 16px;
    background: var(--av-light);
    border: 2px solid var(--av-beige-l);
    border-radius: 8px;
}

.email-otp-info {
    font-size: 12px;
    color: var(--av-gray);
    margin-bottom: 10px;
}

.email-otp-input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.email-otp-input-row input {
    width: 140px;
    padding: 10px 14px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 6px;
    text-align: center;
    color: var(--av-dark);
    border: 2px solid var(--av-beige-l);
    border-radius: 8px;
    background: #fff;
    outline: none;
    transition: border-color 0.25s;
}

.email-otp-input-row input:focus {
    border-color: var(--av-teal);
    box-shadow: 0 0 0 3px rgba(80,183,194,0.12);
}

.email-otp-msg {
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
    min-height: 18px;
}

.email-otp-resend {
    background: none;
    border: none;
    color: var(--av-teal);
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-top: 6px;
    text-decoration: underline;
}

.email-otp-resend:hover {
    color: var(--av-teal-d);
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .reg-card { padding: 24px 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .top-bar-inner { flex-direction: column; gap: 10px; }
}

.error-list li::before {
    content: "• ";
}

.campo-errore {
    border-color: #cc0000 !important;
}
