/**
 * CTM Alerts - Stili frontend
 * Bottone alert, CTA, dashboard "I miei Alert", badge stato
 */

/* ─── Alert CTA (bottone nella pagina recensione) ──────────────── */

.ctm-alert-cta {
    background: linear-gradient(135deg, #f0fdf9, #ecfdf5);
    border: 1px solid #a7f3d0;
    border-radius: 0.3rem;
    padding: 20px 24px;
    text-align: center;
}

.ctm-alert-cta--active {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: #6ee7b7;
}

/* CTA compatta: riga singola con bottone */
.ctm-alert-cta--compact {
    padding: 14px 20px;
}

.ctm-alert-cta__row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ctm-alert-cta__label {
    font-size: 14px;
    color: #374151;
}

button.ctm-alert-btn.ctm-alert-btn--expand {
    background: #008572;
    color: #fff;
    padding: 8px 20px;
    font-size: 13px;
    white-space: nowrap;
}
button.ctm-alert-btn.ctm-alert-btn--expand:hover {
    background: #006b5c;
    color: #fff;
    text-decoration: none;
}

.ctm-auth-collapsible {
    margin-top: 16px;
}

.ctm-alert-cta__text {
    font-size: 15px;
    color: #374151;
    margin-bottom: 14px;
}

.ctm-alert-cta__icon {
    font-size: 18px;
    margin-right: 6px;
}

/* ─── Bottoni Alert ────────────────────────────────────────────── */

.ctm-alert-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
}

.ctm-alert-btn--register {
    background: #008572;
    color: #fff;
}
.ctm-alert-btn--register:hover {
    background: #006b5c;
    color: #fff;
    text-decoration: none;
}

.ctm-alert-btn--activate,
.ctm-alert-btn--add-portfolio {
    background: #008572;
    color: #fff;
}
.ctm-alert-btn--activate:hover,
.ctm-alert-btn--add-portfolio:hover {
    background: #006b5c;
}

.ctm-alert-btn--deactivate,
.ctm-alert-btn--remove,
.ctm-alert-btn--remove-portfolio {
    background: #f3f4f6;
    color: #6b7280;
    padding: 6px 14px;
    font-size: 13px;
}
.ctm-alert-btn--deactivate:hover,
.ctm-alert-btn--remove:hover,
.ctm-alert-btn--remove-portfolio:hover {
    background: #e5e7eb;
    color: #374151;
}

.ctm-alert-btn--portfolio-link {
    background: #ecfdf5;
    color: #008572;
    padding: 6px 14px;
    font-size: 13px;
    text-decoration: none;
}
.ctm-alert-btn--portfolio-link:hover {
    background: #d1fae5;
    color: #006b5c;
    text-decoration: none;
}

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

/* ─── Riga attivazione (bottone + select soglia) ───────────────── */

.ctm-alert-activate-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ctm-alert-soglia-label {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ctm-alert-soglia-select,
.ctm-alert-soglia-edit {
    padding: 4px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: #374151;
    cursor: pointer;
}

/* ─── Social proof count ───────────────────────────────────────── */

.ctm-alert-count {
    display: block;
    margin-top: 12px;
    font-size: 12px;
    color: #9ca3af;
}

/* ─── Alert Status (quando attivo) ─────────────────────────────── */

.ctm-alert-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ctm-alert-status__icon {
    font-size: 20px;
}

.ctm-alert-status__text {
    font-size: 15px;
    font-weight: 600;
    color: #008572;
}

/* ─── Login form (dashboard) ───────────────────────────────────── */

.ctm-alert-login {
    max-width: 400px;
    margin: 40px auto;
    text-align: center;
}

.ctm-alert-login h3 {
    font-size: 20px;
    color: #111827;
    margin-bottom: 12px;
}

.ctm-alert-login p {
    color: #6b7280;
    margin-bottom: 24px;
    font-size: 14px;
}

.ctm-alert-login .login-submit input[type="submit"] {
    background: #008572;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 32px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.ctm-alert-login .login-submit input[type="submit"]:hover {
    background: #006b5c;
}

.ctm-alert-register-link {
    margin-top: 16px;
    font-size: 13px;
}
.ctm-alert-register-link a {
    color: #008572;
    font-weight: 600;
}

/* ─── Dashboard "I miei Alert" ─────────────────────────────────── */

.ctm-miei-alert {
    margin: 0px;
}

.ctm-alert-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f9fafb;
    border-radius: 12px;
    color: #6b7280;
}

.ctm-alert-empty p {
    margin: 0 0 8px;
}

.ctm-alert-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ctm-alert-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border-radius: 0.3rem;
    overflow: hidden;
}

.ctm-alert-table thead th {
    background: #008572;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: #fff;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;

}

.ctm-alert-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    color: #374151;
}

.ctm-alert-table tbody tr:hover {
    background: #f9fafb;
}

.ctm-alert-cert-link {
    color: #008572;
    text-decoration: none;
    font-weight: 600;
}
.ctm-alert-cert-link:hover {
    text-decoration: underline;
}

.ctm-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ─── Badge sottostanti ───────────────────────────────────────── */

.ctm-sotto-badge {
    display: inline-block;
    background: #ccfbf1;
    color: #0f766e;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin: 2px 2px;
    white-space: nowrap;
    line-height: 1.4;
}

/* ─── Badge distanza ───────────────────────────────────────────── */

.ctm-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.ctm-badge--safe {
    background: #d1fae5;
    color: #065f46;
}

.ctm-badge--warn {
    background: #fef3c7;
    color: #92400e;
}

.ctm-badge--danger {
    background: #fee2e2;
    color: #991b1b;
}

.ctm-badge--breached {
    background: #7f1d1d;
    color: #fff;
}

/* Badge livello alert (sistema semplificato) */
.ctm-badge--alert {
    background: #fee2e2;
    color: #dc2626;
}

/* ─── Badge stato alert ────────────────────────────────────────── */

.ctm-stato {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ctm-stato--attivo {
    background: #dbeafe;
    color: #1e40af;
}

.ctm-stato--watch {
    background: #fef3c7;
    color: #92400e;
}

.ctm-stato--warning {
    background: #fee2e2;
    color: #991b1b;
}

.ctm-stato--critical {
    background: #fca5a5;
    color: #7f1d1d;
}

.ctm-stato--breached {
    background: #7f1d1d;
    color: #fff;
}

/* ─── Auth Box (form login/registrazione inline) ──────────────── */

.ctm-auth-box {
    max-width: 360px;
    margin: 16px auto 0;
}
.ctm-auth-box--centered {
    margin: 20px auto;
}

/* Tab switcher */
.ctm-auth-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
}
.ctm-auth-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.ctm-auth-tab:hover {
    color: #6b7280;
}
.ctm-auth-tab--active {
    color: #008572;
    border-bottom-color: #008572;
}

/* Input fields */
.ctm-auth-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ctm-auth-input:focus {
    outline: none;
    border-color: #008572;
    box-shadow: 0 0 0 3px rgba(0, 133, 114, 0.1);
}

/* Bottoni auth */
.ctm-alert-btn--login,
.ctm-alert-btn--register-submit,
.ctm-alert-btn--reset-submit {
    width: 100%;
    background: #008572;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.ctm-alert-btn--login:hover,
.ctm-alert-btn--register-submit:hover,
.ctm-alert-btn--reset-submit:hover {
    background: #006b5c;
}
.ctm-alert-btn--login:disabled,
.ctm-alert-btn--register-submit:disabled,
.ctm-alert-btn--reset-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Link "Password dimenticata?" / "Torna al login" */
.ctm-auth-forgot {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}
.ctm-auth-forgot:hover {
    color: #008572;
    text-decoration: none;
}

/* Testo introduttivo reset password */
.ctm-auth-reset-intro {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px;
    text-align: center;
}

/* Messaggio feedback (errore/successo) */
.ctm-auth-message {
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 13px;
    text-align: center;
}
.ctm-auth-message--success {
    background: #d1fae5;
    color: #065f46;
}
.ctm-auth-message--error {
    background: #fee2e2;
    color: #991b1b;
}

/* ─── Info text ────────────────────────────────────────────────── */

.ctm-alert-info-text {
    margin-top: 16px;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

/* ─── Soglia Help Text ─────────────────────────────────────────── */

.ctm-alert-soglia-help {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 10px;
    text-align: center;
    line-height: 1.5;
}

.ctm-alert-distanza-attuale {
    display: inline-block;
    font-weight: 600;
    color: #374151;
    margin-top: 4px;
}

/* ─── Dashboard: Riepilogo ────────────────────────────────────── */

.ctm-alert-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.3rem;
    padding: 20px 24px;
    margin-bottom: 8px;
}

.ctm-alert-summary__stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.ctm-alert-summary__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ctm-alert-summary__number {
    font-size: 28px;
    font-weight: 700;
    color: #008572;
    line-height: 1;
}

.ctm-alert-summary__stat--warn .ctm-alert-summary__number {
    color: #92400e;
}

.ctm-alert-summary__stat--danger .ctm-alert-summary__number {
    color: #991b1b;
}

.ctm-alert-summary__stat--breached .ctm-alert-summary__number {
    color: #7f1d1d;
}

.ctm-alert-summary__label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.ctm-alert-summary__empty {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* ─── Dashboard: Section Titles ───────────────────────────────── */

.ctm-section-title {
    font-size: 18px;
    color: #111827;
    margin: 28px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

/* ─── Guida utente (sezione "Come funziona") ─────────────────── */

.ctm-guide-section {
    margin-top: 12px;
}

.ctm-guide-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

.ctm-guide-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}

.ctm-guide-card__desc {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px;
}

.ctm-guide-card__note {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.6;
    margin: 15px 0 15px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.ctm-guide-levels {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ctm-guide-level {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ctm-guide-level .ctm-badge,
.ctm-guide-level .ctm-stato {
    min-width: 80px;
    text-align: center;
    flex-shrink: 0;
}

.ctm-guide-level__desc {
    color: #4b5563;
    font-size: 13px;
    line-height: 1.4;
}

.ctm-guide-schedule {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ctm-guide-schedule__time {
    display: inline-block;
    background: #f0fdf4;
    color: #166534;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #bbf7d0;
}

.ctm-guide-disclaimer {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 4px;
}

.ctm-guide-disclaimer p {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.7;
    margin: 0;
}

.ctm-guide-disclaimer strong {
    color: #4b5563;
}

/* ─── Login Page [ct_login] ───────────────────────────────────── */

.ctm-auth-page {
    max-width: 400px;
    margin: 0 auto;
    padding: 8px 0;
}

.ctm-auth-page .ctm-auth-box {
    max-width: 100%;
}

.ctm-auth-logged {
    text-align: center;
    padding: 24px;
}

.ctm-auth-logged p {
    margin: 0 0 16px;
    color: #374151;
    font-size: 15px;
}

.ctm-alert-btn--primary {
    display: inline-block;
    background: #008572;
    color: #fff;
    padding: 10px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.ctm-alert-btn--primary:hover {
    background: #006b5c;
    color: #fff;
    text-decoration: none;
}

/* ─── Dashboard [ct_dashboard] ───────────────────────────────── */

.ctm-dashboard {
    width: 100%;
}

.ctm-dashboard__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.ctm-dashboard__title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #111827;
}

.ctm-dashboard__logout {
    color: #6b7280;
    font-size: 13px;
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s;
}

.ctm-dashboard__logout:hover {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}

/* Stats rapide */
.ctm-dashboard__stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.ctm-dashboard__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 24px;
    background: #ecfdf5;
    border: 2px solid #a7f3d0;
    border-radius: 12px;
    min-width: 100px;
}

.ctm-dashboard__stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #008572;
    line-height: 1;
}

.ctm-dashboard__stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.ctm-dashboard__stat--danger {
    background: #fef2f2;
    border: 2px solid #fca5a5;
}

.ctm-dashboard__stat--danger .ctm-dashboard__stat-number {
    color: #991b1b;
}

.ctm-dashboard__cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.ctm-dashboard__card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.ctm-dashboard__card:hover {
    border-color: #008572;
    box-shadow: 0 4px 12px rgba(0, 133, 114, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.ctm-dashboard__card-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0fdf9;
    border-radius: 12px;
    color: #008572;
}

.ctm-dashboard__card-body {
    flex: 1;
    min-width: 0;
}

.ctm-dashboard__card-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.ctm-dashboard__card-desc {
    margin: 0 0 8px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.ctm-dashboard__card-count {
    font-size: 12px;
    font-weight: 600;
    color: #008572;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ctm-dashboard__card-arrow {
    flex-shrink: 0;
    font-size: 20px;
    color: #d1d5db;
    transition: color 0.2s;
}

.ctm-dashboard__card:hover .ctm-dashboard__card-arrow {
    color: #008572;
}

/* ─── Dashboard: Preferenze notifiche ─────────────────────────── */

.ctm-dashboard__prefs {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}

.ctm-dashboard__prefs-title {
    margin: 0 0 20px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.ctm-dashboard__pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ctm-dashboard__pref-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ctm-dashboard__pref-row--disabled {
    opacity: 0.5;
}

.ctm-dashboard__pref-info {
    flex: 1;
}

.ctm-dashboard__pref-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.ctm-dashboard__pref-desc {
    display: block;
    font-size: 13px;
    color: #6b7280;
}

/* ─── Toggle Switch ──────────────────────────────────────────── */

.ctm-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.ctm-toggle__input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.ctm-toggle__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d1d5db;
    transition: 0.3s;
    border-radius: 26px;
}

.ctm-toggle__slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ctm-toggle__input:checked + .ctm-toggle__slider {
    background: #008572;
}

.ctm-toggle__input:checked + .ctm-toggle__slider::before {
    transform: translateX(22px);
}

.ctm-toggle__input:focus + .ctm-toggle__slider {
    box-shadow: 0 0 0 3px rgba(0, 133, 114, 0.2);
}

.ctm-toggle--disabled .ctm-toggle__slider {
    cursor: not-allowed;
    background: #e5e7eb;
}

/* ─── Responsive ───────────────────────────────────────────────── */

@media (max-width: 768px) {
    .ctm-alert-cta {
        padding: 16px;
    }

    .ctm-alert-activate-row {
        flex-direction: column;
        gap: 12px;
    }

    .ctm-alert-btn {
        width: 100%;
        text-align: center;
    }

    .ctm-alert-status {
        flex-direction: column;
        gap: 8px;
    }

    /* CTA compatta: stack su mobile */
    .ctm-alert-cta__row {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .ctm-alert-btn--expand {
        width: 100%;
    }

    /* Dashboard: card layout su mobile */
    .ctm-alert-table thead {
        display: none;
    }

    .ctm-alert-table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        padding: 12px;
        background: #fff;
    }

    .ctm-alert-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border-bottom: 1px solid #f9fafb;
        text-align: right;
    }

    .ctm-alert-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
        font-size: 12px;
        text-transform: uppercase;
        text-align: left;
        flex-shrink: 0;
        margin-right: 12px;
    }

    .ctm-alert-table tbody td:last-child {
        border-bottom: none;
        justify-content: center;
        padding-top: 10px;
    }

    /* Auth box: full width su mobile */
    .ctm-auth-box {
        max-width: 100%;
    }

    /* Riepilogo: stack verticale su mobile */
    .ctm-alert-summary__stats {
        gap: 16px;
    }

    .ctm-alert-summary__number {
        font-size: 24px;
    }

    /* Section title più compatto */
    .ctm-section-title {
        font-size: 16px;
        margin: 20px 0 12px;
    }

    /* FAB: adatta posizione su mobile */
    .ctm-fab {
        bottom: 16px;
        right: 16px;
    }

    .ctm-fab__panel {
        width: calc(100vw - 40px);
        max-width: 300px;
        right: 0;
    }

    /* Reset page: full width su mobile */
    .ctm-reset-box {
        padding: 24px 16px;
    }

    /* Dashboard: stack su mobile */
    .ctm-dashboard__cards {
        grid-template-columns: 1fr;
    }

    .ctm-dashboard__header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .ctm-dashboard__title {
        font-size: 18px;
    }

    /* Dashboard stats: wrap su mobile */
    .ctm-dashboard__stats {
        justify-content: center;
        gap: 12px;
    }

    .ctm-dashboard__stat {
        padding: 12px 16px;
        min-width: 80px;
    }

    .ctm-dashboard__stat-number {
        font-size: 22px;
    }

    /* Prefs: stack label e toggle su mobile */
    .ctm-dashboard__pref-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ─── FAB Menu Utente ─────────────────────────────────────────── */

.ctm-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

.ctm-fab__trigger {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #008572;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ctm-fab__trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.ctm-fab__avatar {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    user-select: none;
}

.ctm-fab__panel {
    position: absolute;
    bottom: 64px;
    right: 0;
    width: 260px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    animation: ctm-fab-in 0.15s ease-out;
}

@keyframes ctm-fab-in {
    from { opacity: 0; transform: translateY(8px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ctm-fab__header {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.ctm-fab__name {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
    display: block;
}

.ctm-fab__email {
    font-size: 12px;
    color: #9ca3af;
    display: block;
    margin-top: 2px;
}

.ctm-fab__nav {
    padding: 8px 0;
}

.ctm-fab__link {
    display: block;
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}
.ctm-fab__link:hover {
    background: #f9fafb;
    color: #008572;
    text-decoration: none;
}

.ctm-fab__link--logout {
    color: #ef4444;
}
.ctm-fab__link--logout:hover {
    background: #fef2f2;
    color: #dc2626;
    text-decoration: none;
}

/* ─── Reset Password Page ─────────────────────────────────────── */

.ctm-reset-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40vh;
    padding: 40px 20px;
}

.ctm-reset-box {
    max-width: 400px;
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
}

.ctm-reset-box h2 {
    font-size: 20px;
    color: #111827;
    margin: 0 0 8px;
}

.ctm-reset-box p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px;
}

.ctm-alert-btn--reset-password {
    width: 100%;
    background: #008572;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.ctm-alert-btn--reset-password:hover {
    background: #006b5c;
}
.ctm-alert-btn--reset-password:disabled {
    opacity: 0.7;
    cursor: wait;
}
