/* iWSF User — front-end */
.iwsf-form { margin: 0 0 20px; }
.iwsf-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 18px; align-items: start; }
.iwsf-grid > * { grid-column: span 12; }
.iwsf-w-full { grid-column: span 12 !important; }
.iwsf-w-half { grid-column: span 6 !important; }
.iwsf-w-third { grid-column: span 4 !important; }
.iwsf-w-quarter { grid-column: span 3 !important; }
@media (max-width: 782px) {
	.iwsf-grid > *, .iwsf-w-half, .iwsf-w-third, .iwsf-w-quarter { grid-column: span 12 !important; }
}

.iwsf-field { margin: 0 0 16px; min-width: 0; }
.iwsf-field > label { display: block; font-weight: 600; margin-bottom: 4px; }
.iwsf-field .input,
.iwsf-field input[type="text"],
.iwsf-field input[type="email"],
.iwsf-field input[type="password"],
.iwsf-field input[type="url"],
.iwsf-field input[type="tel"],
.iwsf-field input[type="date"],
.iwsf-field input[type="number"],
.iwsf-field select,
.iwsf-field textarea { width: 100%; box-sizing: border-box; }
.iwsf-field .iwsf-choices { display: block; }
.iwsf-field .iwsf-choice { display: block; font-weight: 400; margin: 3px 0; }
.iwsf-field .iwsf-choice input { width: auto; margin-right: 6px; }
.iwsf-field-checkbox > .iwsf-choice { font-weight: 600; }
.iwsf-req { color: #c0392b; }
.iwsf-desc { display: block; font-size: 12px; color: #6b7280; margin-top: 3px; }
.iwsf-error { display: block; color: #c0392b; font-size: 13px; margin-top: 3px; }
.iwsf-hidden { display: none !important; }
.iwsf-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }

/* Password */
.iwsf-pwd-rules { list-style: none; margin: 0 0 16px; padding: 10px 14px; background: #f4f5f7; border-radius: 6px; font-size: 13px; }
.iwsf-pwd-rules li { margin: 2px 0; color: #6b7280; }
.iwsf-pwd-rules li.iwsf-ok { color: #2e7d32; }
.iwsf-pwd-rules li.iwsf-ok .iwsf-tick::before { content: "✓"; }
.iwsf-pwd-rules .iwsf-tick { display: inline-block; width: 14px; font-weight: 700; }
.iwsf-match { display: block; font-size: 13px; margin-top: 3px; }
.iwsf-match.iwsf-ok { color: #2e7d32; }
.iwsf-match.iwsf-ko { color: #c0392b; }

/* Notice */
.iwsf-notice { padding: 12px 16px; border-radius: 6px; margin: 0 0 16px; border-left: 4px solid #999; background: #f4f5f7; }
.iwsf-notice ul { margin: 0; padding-left: 18px; }
.iwsf-notice-success { border-color: #2e7d32; background: #edf7ed; }
.iwsf-notice-error { border-color: #c0392b; background: #fdecea; }
.iwsf-notice-info { border-color: #1f3a5f; background: #eef3fa; }
.iwsf-submit { margin-top: 8px; }

/* wp-login.php */
#registerform .iwsf-form { margin-top: 10px; }
#registerform .iwsf-field > label { font-weight: 400; }
#registerform .iwsf-grid { gap: 0 12px; }

/* Righe accoppiate (email + conferma, password + conferma) */
.iwsf-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 18px; grid-column: span 12; align-items: start; }
.iwsf-row > * { grid-column: span 12; }
.iwsf-slot > p { margin: 0; }
.iwsf-slot label { display: block; font-weight: 600; margin-bottom: 4px; }
.iwsf-slot input { width: 100%; box-sizing: border-box; }
#registerform .iwsf-row { gap: 0 12px; }

/* Pannello Segreteria (shortcode [iwsf_gestione_utenti]) */
.iwsf-manage { font-size: 15px; }
.iwsf-manage h3 { margin: 0 0 12px; }
.iwsf-panel { background: #fff; border: 1px solid #e2e5e9; border-radius: 8px; padding: 18px 20px; margin: 0 0 18px; }
.iwsf-filters { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; }
.iwsf-filters a { display: inline-block; padding: 5px 12px; border: 1px solid #dcdfe4; border-radius: 999px; text-decoration: none; color: #22262b; font-size: 14px; }
.iwsf-filters a.iwsf-current { background: #1f3a5f; border-color: #1f3a5f; color: #fff; }
.iwsf-count { opacity: .65; margin-left: 3px; }
.iwsf-table { width: 100%; border-collapse: collapse; margin: 0 0 8px; }
.iwsf-table th, .iwsf-table td { padding: 9px 12px; border: 1px solid #e2e5e9; text-align: left; vertical-align: top; }
.iwsf-table thead th { background: #f4f5f7; }
.iwsf-table tbody th { background: #f7f8fa; width: 34%; }
.iwsf-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; }
.iwsf-badge-pending { background: #b26a00; }
.iwsf-badge-info_requested { background: #1f6fb2; }
.iwsf-badge-approved { background: #2e7d32; }
.iwsf-badge-rejected { background: #c0392b; }
.iwsf-btn { display: inline-block; padding: 8px 16px; border: 1px solid #1f3a5f; border-radius: 6px; background: #1f3a5f; color: #fff !important; text-decoration: none; cursor: pointer; font-size: 14px; }
.iwsf-btn-ok { background: #2e7d32; border-color: #2e7d32; }
.iwsf-btn-ko { background: #c0392b; border-color: #c0392b; }
.iwsf-btn-link { background: transparent; border-color: transparent; color: #6b7280 !important; }
.iwsf-manage .iwsf-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.iwsf-manage textarea { width: 100%; box-sizing: border-box; margin-top: 6px; }
.iwsf-manage .iwsf-log { list-style: none; margin: 0; padding: 0; }
.iwsf-manage .iwsf-log li { padding: 6px 0; border-bottom: 1px solid #f0f0f1; font-size: 14px; }

/* Endpoint standalone "Completa i tuoi dati" */
body.iwsf-standalone { background: #f1f3f6; margin: 0; padding: 40px 16px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #22262b; }
.iwsf-standalone-box { max-width: 720px; margin: 0 auto; background: #fff; border-radius: 10px; padding: 32px 36px; box-shadow: 0 2px 14px rgba(0,0,0,.08); }
.iwsf-standalone-box h1 { margin: 0 0 20px; font-size: 24px; }
.iwsf-standalone-box .iwsf-submit .iwsf-btn { border: 0; }

/* Risposta dell'utente nel pannello Segreteria */
.iwsf-reply { margin-top: 16px; padding: 14px 16px; background: #eef3fa; border-left: 4px solid #1f3a5f; border-radius: 6px; }
.iwsf-reply p { margin: 0 0 8px; }
.iwsf-reply p:last-child { margin-bottom: 0; }

/* Occhio password */
.iwsf-pwd-wrap { position: relative; display: block; }
.iwsf-pwd-wrap input { padding-right: 44px !important; }
.iwsf-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 0; background: transparent; color: #6b7280; cursor: pointer; }
.iwsf-eye:hover { color: #1f3a5f; }
.iwsf-eye .iwsf-eye-closed { display: none; }
.iwsf-eye.iwsf-eye-on .iwsf-eye-open { display: none; }
.iwsf-eye.iwsf-eye-on .iwsf-eye-closed { display: block; }

/* Export */
.iwsf-export { margin: 0 0 16px; }
.iwsf-btn-alt { background: #fff; color: #1f3a5f !important; }
