:root {
    --bg: #f3f6fa;
    --surface: #ffffff;
    --surface-soft: #f7fafc;
    --surface-blue: #eef6ff;

    --text: #13202e;
    --muted: #64748b;

    --primary: #1f6fb2;
    --primary-dark: #155a92;
    --primary-soft: #e4f1fb;

    --accent: #f0a126;
    --accent-soft: #fff4df;

    --border: #dbe6ef;
    --danger: #b42318;
    --warning: #9a6700;
    --success: #1f7a4d;

    --shadow: 0 10px 26px rgba(15, 35, 55, 0.07);
    --shadow-soft: 0 6px 18px rgba(15, 35, 55, 0.05);

    --radius: 18px;
    --radius-sm: 13px;
    --max-width: 1120px;

    --header-height: 68px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: min(var(--max-width), calc(100% - 28px));
    margin: 0 auto;
}

/* HEADER APP */

.site-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    box-shadow: 0 4px 18px rgba(15, 35, 55, 0.04);
}

.header-inner {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    text-decoration: none;
}

.brand::before {
    content: "◆";
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 900;
    border: 1px solid #f3d8a6;
    flex: 0 0 auto;
}

.brand-title {
    display: block;
    font-size: 1.04rem;
    font-weight: 900;
    color: var(--primary-dark);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.brand-subtitle {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 360px;
}

/* MENU HAMBURGER */

.menu-toggle {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text);
    display: block;
    position: relative;
    border-radius: 99px;
}

.menu-toggle span::before,
.menu-toggle span::after {
    content: "";
    width: 20px;
    height: 2px;
    background: var(--text);
    display: block;
    position: absolute;
    left: 0;
    border-radius: 99px;
}

.menu-toggle span::before {
    top: -7px;
}

.menu-toggle span::after {
    top: 7px;
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 35, 55, 0.35);
    z-index: 110;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s ease;
}

.menu-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.main-nav {
    position: fixed;
    top: 12px;
    right: 12px;
    bottom: 12px;
    width: min(360px, calc(100vw - 24px));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 35, 55, 0.18);
    z-index: 120;
    padding: 14px;
    transform: translateX(calc(100% + 20px));
    transition: 0.24s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.main-nav.is-open {
    transform: translateX(0);
}

.nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 4px 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.nav-title {
    font-weight: 900;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

.nav-close {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 12px;
    border-radius: 15px;
    font-weight: 800;
    color: var(--text);
}

.nav-link:hover {
    background: var(--surface-soft);
}

.nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.nav-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff !important;
    margin-top: 6px;
}

.nav-cta .nav-icon {
    background: rgba(255, 255, 255, 0.18);
}

.nav-separator {
    height: 1px;
    background: var(--border);
    margin: 8px 4px;
}

/* HERO APP */

.hero {
    padding: 30px 0 22px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 18px;
    align-items: stretch;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--accent-soft);
    color: #805100;
    font-weight: 900;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 0.86rem;
    margin-bottom: 14px;
    border: 1px solid #f1d7a5;
}

.hero h1 {
    font-size: clamp(1.75rem, 3.2vw, 3rem);
    line-height: 1.06;
    letter-spacing: -0.055em;
    margin: 0 0 12px;
    color: var(--primary-dark);
    max-width: 820px;
}

.hero p {
    font-size: 1rem;
    color: var(--muted);
    max-width: 760px;
    margin: 0 0 12px;
}

.hero-actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 18px;
}

/* BUTTONS */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 14px;
    font-weight: 900;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: 0.18s ease;
    font-size: 0.94rem;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(31, 111, 178, 0.16);
}

.button-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.button-secondary:hover {
    background: var(--surface-soft);
}

.button-soft {
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-color: #cce1ef;
}

/* CARDS APP */

.hero-card,
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.hero-card {
    padding: 18px;
}

.hero-card h2,
.card h3 {
    margin-top: 0;
    color: var(--primary-dark);
    letter-spacing: -0.025em;
}

.hero-card h2 {
    font-size: 1.12rem;
    margin-bottom: 10px;
}

.hero-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.hero-card li {
    margin: 6px 0;
}

.section {
    padding: 22px 0;
}

.section-header {
    max-width: 800px;
    margin-bottom: 14px;
}

.section-header h2 {
    margin: 0 0 6px;
    font-size: clamp(1.35rem, 2.3vw, 2rem);
    letter-spacing: -0.04em;
    color: var(--primary-dark);
}

.section-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.card {
    padding: 16px;
    transition: 0.18s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.card h3 {
    margin-bottom: 7px;
    font-size: 1.05rem;
}

.card p {
    color: var(--muted);
    margin: 0 0 12px;
    font-size: 0.95rem;
}

.card-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 900;
    margin-bottom: 11px;
    border: 1px solid #cfe2ef;
    font-size: 1rem;
}

/* STAT APP */

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: left;
    box-shadow: var(--shadow-soft);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--primary-dark);
    line-height: 1;
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 7px;
    font-weight: 800;
}

/* NOTICE / FLASH */

.notice {
    background: #fffaf1;
    border: 1px solid #edd7aa;
    color: #493613;
    border-radius: var(--radius);
    padding: 15px 16px;
    font-size: 0.96rem;
}

.notice strong {
    color: #322607;
}

.flash {
    padding: 12px 14px;
    border-radius: 14px;
    margin: 10px 0;
    border: 1px solid var(--border);
    background: var(--surface);
}

.flash.warning {
    border-color: #eadfaf;
    background: #fffdf5;
    color: var(--warning);
}

.flash.success {
    border-color: #b9dfc3;
    background: #f0fbf3;
    color: var(--success);
}

.flash.error {
    border-color: #e5b8b8;
    background: #fff3f3;
    color: var(--danger);
}

/* FOOTER */

.site-footer {
    margin-top: 36px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.93rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--muted);
    font-weight: 800;
}

/* FORM APP */

input,
select,
textarea {
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus,
button:focus,
a:focus {
    outline: 3px solid rgba(31, 111, 178, 0.18);
    outline-offset: 2px;
}

/* UTILITY */

.app-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    padding: 18px;
}

.compact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compact-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 13px;
}

/* RESPONSIVE */

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

    .cards-grid,
    .stats-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .brand-subtitle {
        max-width: 260px;
    }
}

@media (max-width: 640px) {
    :root {
        --header-height: 64px;
    }

    .container {
        width: min(100% - 22px, var(--max-width));
    }

    .brand-title {
        font-size: 0.98rem;
    }

    .brand-subtitle {
        display: none;
    }

    .hero {
        padding: 22px 0 14px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 0.96rem;
    }

    .cards-grid,
    .stats-strip {
        grid-template-columns: 1fr;
    }

    .button {
        width: 100%;
    }

    .hero-actions {
        width: 100%;
    }

    .main-nav {
        width: calc(100vw - 20px);
        top: 10px;
        right: 10px;
        bottom: 10px;
    }
}
/* FOTO PROFILO - STILE APP / SOCIAL */

.avatar {
    display: block;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-soft);
    border: 3px solid #ffffff;
    box-shadow: 0 8px 22px rgba(15, 35, 55, 0.14);
}

.avatar-sm {
    width: 48px;
    height: 48px;
}

.avatar-md {
    width: 88px;
    height: 88px;
}

.avatar-lg {
    width: 150px;
    height: 150px;
}

.avatar-xl {
    width: 220px;
    height: 220px;
}

.photo-editor {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 16px;
    box-shadow: var(--shadow-soft);
}

.photo-editor-grid {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.photo-preview-wrap {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: var(--surface-soft);
    border: 4px solid #ffffff;
    box-shadow: 0 12px 28px rgba(15, 35, 55, 0.16);
    touch-action: none;
    cursor: grab;
    margin: 0 auto;
}

.photo-preview-wrap.is-dragging {
    cursor: grabbing;
}

.photo-preview-img {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: none;
    transform-origin: center center;
    user-select: none;
    pointer-events: none;
}

.photo-preview-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-soft), var(--surface-soft));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-weight: 900;
    text-align: center;
    padding: 24px;
}

.photo-editor-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.photo-editor-controls label {
    font-weight: 900;
    color: var(--text);
}

.photo-editor-controls input[type="file"],
.photo-editor-controls input[type="range"] {
    width: 100%;
}

.photo-help {
    color: var(--muted);
    font-size: 0.92rem;
    margin: 0;
}

.photo-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.86rem;
    font-weight: 900;
    width: fit-content;
}

@media (max-width: 720px) {
    .photo-editor-grid {
        grid-template-columns: 1fr;
    }

    .photo-preview-wrap {
        width: 200px;
        height: 200px;
    }

    .avatar-xl {
        width: 180px;
        height: 180px;
    }
}
.nav-link.is-active {
    background: var(--primary-soft);
    color: var(--primary-dark);
}
/* MENU APP - VERSIONE PIÙ PULITA */

.main-nav {
    overflow-y: auto;
}

.nav-link {
    padding: 11px 12px;
    font-size: 0.96rem;
}

.nav-icon {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--primary);
    color: transparent;
    font-size: 0;
    flex: 0 0 auto;
}

.nav-link.is-active .nav-icon {
    background: var(--accent);
}

.nav-link.nav-cta .nav-icon {
    background: #ffffff;
}

.nav-group-title {
    margin: 12px 6px 4px;
    font-size: 0.76rem;
    font-weight: 900;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.nav-close {
    font-weight: 900;
    color: var(--primary-dark);
}
/* =========================================================
   TALENTI IN COMUNE - DASHBOARD SOCIAL APP
   Layout operativo a tre colonne: azioni, feed, riepilogo.
   ========================================================= */

:root {
    --tic-page-bg: #f0f2f5;
    --tic-card-bg: #ffffff;
    --tic-line: #d8e0ea;
    --tic-line-soft: #e7edf4;
    --tic-text: #17212f;
    --tic-muted: #667085;
    --tic-blue: #0b66b2;
    --tic-blue-dark: #084f8d;
    --tic-blue-soft: #e8f2fd;
    --tic-orange: #f0a126;
    --tic-green: #1f7a4d;
    --tic-purple: #6d5bd0;
    --tic-shadow: 0 2px 10px rgba(15, 35, 55, 0.07);
    --tic-radius: 18px;
}

body {
    background: var(--tic-page-bg);
    color: var(--tic-text);
    font-size: 16px;
}

.site-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #d9e1ea;
    box-shadow: 0 1px 6px rgba(15, 35, 55, 0.06);
}

.site-header .container {
    width: min(1480px, calc(100% - 28px));
}

.header-inner {
    min-height: 62px;
}

.brand-title {
    color: var(--tic-blue-dark);
}

.brand-subtitle {
    color: #667085;
}

.tic-dashboard {
    padding: 16px 0 36px;
}

.tic-shell {
    width: min(1480px, calc(100% - 28px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px minmax(0, 680px) 320px;
    gap: 16px;
    align-items: start;
}

.tic-left,
.tic-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 78px;
}

.tic-feed {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.tic-card,
.tic-composer,
.tic-stat-card {
    background: var(--tic-card-bg);
    border: 1px solid var(--tic-line);
    border-radius: var(--tic-radius);
    box-shadow: var(--tic-shadow);
}

.tic-card {
    padding: 15px;
}

.tic-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tic-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tic-blue), var(--tic-blue-dark));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex: 0 0 auto;
}

.tic-avatar-small {
    width: 42px;
    height: 42px;
}

.tic-user-text {
    min-width: 0;
}

.tic-user-text h1 {
    margin: 0;
    color: var(--tic-blue-dark);
    font-size: 1.08rem;
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.tic-user-text p {
    margin: 3px 0 0;
    color: var(--tic-muted);
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.tic-quick-menu {
    padding: 7px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tic-quick-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    padding: 8px 10px;
    color: var(--tic-text);
    font-weight: 800;
}

.tic-quick-menu a:hover,
.tic-admin-card a:hover,
.tic-mini-list a:hover,
.tic-list-item:hover {
    background: #f3f7fb;
}

.tic-menu-dot,
.tic-list-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--tic-blue-soft);
    border: 1px solid #cbddeb;
    flex: 0 0 auto;
    position: relative;
}

.tic-menu-dot::after,
.tic-list-icon::after {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--tic-blue);
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
}

.tic-menu-dot-orange::after { background: var(--tic-orange); }
.tic-menu-dot-green::after { background: var(--tic-green); }
.tic-menu-dot-purple::after { background: var(--tic-purple); }
.tic-menu-dot-gray::after { background: #667085; }
.tic-menu-dot-blue::after { background: var(--tic-blue); }
.tic-menu-dot-primary::after { background: var(--tic-blue-dark); }

.tic-quick-menu strong {
    margin-left: auto;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #d92d20;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
}

.tic-admin-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tic-admin-card h2,
.tic-section-head h2 {
    margin: 0;
    color: var(--tic-blue-dark);
    font-size: 1.08rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.tic-admin-card a {
    padding: 8px 10px;
    border-radius: 12px;
    color: var(--tic-text);
    font-weight: 800;
}

.tic-composer {
    display: flex;
    gap: 12px;
    padding: 15px;
}

.tic-composer-content {
    min-width: 0;
    flex: 1;
}

.tic-composer h2 {
    margin: 0;
    color: var(--tic-blue-dark);
    font-size: 1.2rem;
    letter-spacing: -0.035em;
}

.tic-composer p,
.tic-section-head p,
.tic-safety-card p {
    margin: 5px 0 0;
    color: var(--tic-muted);
}

.tic-actions-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.tic-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.tic-stat-card {
    padding: 14px;
}

.tic-stat-card strong {
    display: block;
    color: var(--tic-blue-dark);
    font-size: 1.75rem;
    line-height: 1;
}

.tic-stat-card span {
    display: block;
    margin-top: 6px;
    color: var(--tic-muted);
    font-size: 0.88rem;
    font-weight: 800;
}

.tic-section-head {
    margin-bottom: 12px;
}

.tic-list,
.tic-mini-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.tic-list-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 11px;
    border: 1px solid var(--tic-line-soft);
    border-radius: 16px;
    background: #fbfdff;
}

.tic-list-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 12px rgba(15, 35, 55, 0.14);
    flex: 0 0 auto;
}

.tic-list-body {
    min-width: 0;
}

.tic-list-body h3 {
    margin: 0 0 4px;
    color: var(--tic-blue-dark);
    font-size: 1rem;
    line-height: 1.25;
}

.tic-list-body p {
    margin: 0 0 4px;
    color: var(--tic-muted);
    font-size: 0.91rem;
}

.tic-pill-link {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--tic-blue-soft);
    color: var(--tic-blue-dark);
    font-weight: 900;
    white-space: nowrap;
}

.tic-pill-link:hover {
    background: #d9ebfa;
}

.tic-empty {
    padding: 13px;
    border-radius: 14px;
    background: #fff7e6;
    border: 1px solid #efd49a;
    color: #5a420f;
    font-size: 0.94rem;
}

.tic-account-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tic-account-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #edf1f5;
}

.tic-account-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.tic-account-list span {
    color: var(--tic-muted);
}

.tic-account-list strong {
    color: var(--tic-text);
    text-align: right;
}

.tic-mini-list a {
    position: relative;
    display: block;
    padding: 10px 38px 10px 11px;
    border: 1px solid var(--tic-line-soft);
    border-radius: 14px;
    background: #fbfdff;
}

.tic-mini-list strong,
.tic-mini-list span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tic-mini-list strong {
    color: var(--tic-blue-dark);
    font-size: 0.94rem;
}

.tic-mini-list span {
    margin-top: 2px;
    color: var(--tic-muted);
    font-size: 0.84rem;
}

.tic-mini-list em {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #d92d20;
    color: #ffffff;
    font-style: normal;
    font-size: 0.74rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tic-full-button {
    width: 100%;
    margin-top: 12px;
}

.tic-safety-card p {
    font-size: 0.92rem;
}

.tic-dashboard .button {
    min-height: 40px;
    border-radius: 999px;
    padding: 8px 13px;
}

.site-footer .container {
    width: min(1480px, calc(100% - 28px));
}

@media (max-width: 1220px) {
    .tic-shell {
        grid-template-columns: 240px minmax(0, 1fr) 280px;
    }
}

@media (max-width: 980px) {
    .tic-shell {
        width: min(760px, calc(100% - 22px));
        grid-template-columns: 1fr;
    }

    .tic-left,
    .tic-right {
        position: static;
    }

    .tic-left { order: 1; }
    .tic-feed { order: 2; }
    .tic-right { order: 3; }

    .tic-quick-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .site-header .container,
    .site-footer .container,
    .tic-shell {
        width: min(100% - 18px, 760px);
    }

    .tic-dashboard {
        padding-top: 10px;
    }

    .tic-composer {
        align-items: flex-start;
    }

    .tic-actions-row {
        flex-direction: column;
    }

    .tic-actions-row .button {
        width: 100%;
    }

    .tic-stats,
    .tic-quick-menu {
        grid-template-columns: 1fr;
    }

    .tic-list-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .tic-pill-link {
        grid-column: 1 / -1;
        text-align: center;
    }
}


/* =========================================================
   PUBLIC APP LAYOUT - stile social civico, pubblico e mobile first
   ========================================================= */

.public-app {
    padding: 18px 0 34px;
}

.public-shell {
    width: min(1480px, calc(100% - 28px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px minmax(0, 680px) 320px;
    gap: 18px;
    align-items: start;
}

.public-shell-list {
    grid-template-columns: 300px minmax(0, 760px) 300px;
}

.public-left,
.public-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 86px;
}

.public-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.public-brand-panel {
    text-align: left;
}

.public-logo-mark {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 900;
    margin-bottom: 10px;
}

.public-brand-panel h1 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 1.18rem;
    letter-spacing: -0.04em;
}

.public-brand-panel p {
    margin: 5px 0 0;
    color: var(--muted);
}

.public-hero-card {
    background: #ffffff;
    border: 1px solid #dbe4ee;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 4px 14px rgba(15, 35, 55, 0.06);
}

.public-compact-hero {
    padding: 20px;
}

.public-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    background: #fff5df;
    border: 1px solid #f0d29b;
    color: #594017;
    font-weight: 900;
    font-size: 0.82rem;
    margin-bottom: 12px;
}

.public-hero-text h2 {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.55rem);
    line-height: 1.07;
    color: var(--primary-dark);
    letter-spacing: -0.06em;
}

.public-hero-text p {
    margin: 12px 0 16px;
    color: var(--muted);
    font-size: 1.03rem;
}

.public-title-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.public-feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.public-post-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border: 1px solid #e3ebf3;
    border-radius: 18px;
    background: #fbfdff;
}

.public-post-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 5px 15px rgba(15, 35, 55, 0.14);
}

.public-post-avatar-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e7f1fb;
    color: var(--primary-dark);
    font-weight: 900;
}

.public-post-body {
    min-width: 0;
}

.public-post-body h3 {
    margin: 0 0 4px;
    color: var(--primary-dark);
    font-size: 1.08rem;
    letter-spacing: -0.025em;
}

.public-post-body p {
    margin: 0 0 8px;
    color: var(--muted);
}

.public-post-meta {
    color: #52647a !important;
    font-size: 0.9rem;
    font-weight: 700;
}

.public-post-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.public-post-actions span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.public-post-actions a {
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 12px;
    background: #e7f1fb;
    color: var(--primary-dark);
    font-weight: 900;
}

.public-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.public-tags span {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 800;
}

.public-filter-card h2 {
    margin: 0 0 12px;
    color: var(--primary-dark);
    font-size: 1.08rem;
}

.public-filter-card form {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.public-filter-card label {
    font-weight: 900;
    color: #1f2937;
    margin-top: 3px;
}

.public-filter-card input,
.public-filter-card select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 9px 11px;
    background: #ffffff;
}

.public-filter-card .button {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}

@media (max-width: 1200px) {
    .public-shell,
    .public-shell-list {
        grid-template-columns: 240px minmax(0, 1fr) 280px;
    }
}

@media (max-width: 980px) {
    .public-shell,
    .public-shell-list {
        width: min(760px, calc(100% - 22px));
        grid-template-columns: 1fr;
    }

    .public-left,
    .public-right {
        position: static;
    }

    .public-left {
        order: 1;
    }

    .public-feed {
        order: 2;
    }

    .public-right {
        order: 3;
    }
}

@media (max-width: 640px) {
    .public-app {
        padding-top: 12px;
    }

    .public-shell,
    .public-shell-list {
        width: min(100% - 18px, 760px);
        gap: 12px;
    }

    .public-hero-card,
    .social-card {
        border-radius: 18px;
    }

    .public-hero-card {
        padding: 17px;
    }

    .public-hero-text h2 {
        font-size: 1.72rem;
    }

    .public-title-row {
        flex-direction: column;
    }

    .public-title-row .social-mini-button {
        width: 100%;
        text-align: center;
    }

    .public-post-card {
        grid-template-columns: 46px minmax(0, 1fr);
        padding: 12px;
    }

    .public-post-avatar {
        width: 46px;
        height: 46px;
    }

    .public-post-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .public-post-actions a {
        text-align: center;
    }
}


/* =========================================================
   SOCIAL DETAIL + MESSAGGI + PWA REFINEMENT
   ========================================================= */
.public-detail-shell {
    grid-template-columns: 280px minmax(0, 700px) 320px;
}

.public-detail-hero h2 {
    margin: 0;
    font-size: clamp(1.55rem, 2.2vw, 2.35rem);
    line-height: 1.08;
    color: var(--primary-dark);
    letter-spacing: -0.05em;
}

.social-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 1px solid rgba(244, 166, 42, 0.35);
    color: #6b4300;
    font-weight: 900;
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.social-page-avatar,
.social-avatar-img-large {
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 10px 24px rgba(15, 35, 55, 0.14);
    flex: 0 0 auto;
}

.social-page-avatar {
    width: 54px;
    height: 54px;
}

.social-avatar-img-large {
    width: 62px;
    height: 62px;
}

.social-text-block {
    color: #34445a;
    line-height: 1.72;
    font-size: 1rem;
}

.social-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.social-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e7f1fb;
    color: var(--primary-dark);
    font-weight: 900;
    font-size: 0.86rem;
}

.social-inline-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.messages-shell,
.conversation-shell {
    grid-template-columns: 280px minmax(0, 760px) 320px;
}

.conversation-row.has-unread {
    background: #f2f8ff;
    border-color: #b9d8f2;
}

.inline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.76rem;
    margin-left: 5px;
}

.conversation-header-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.conversation-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.conversation-actions form {
    margin: 0;
}

.chat-card {
    padding: 14px;
}

.chat-thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    display: flex;
}

.chat-message.is-mine {
    justify-content: flex-end;
}

.chat-message.is-other {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: min(78%, 620px);
    border: 1px solid #dbe4ee;
    border-radius: 18px;
    padding: 12px 14px;
    background: #f8fbfe;
}

.chat-message.is-mine .chat-bubble {
    background: #e7f1fb;
    border-color: #c3dbef;
}

.chat-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
    font-size: 0.86rem;
}

.chat-meta strong {
    color: var(--primary-dark);
}

.chat-meta span,
.chat-bubble small {
    color: var(--muted);
    font-weight: 800;
}

.chat-bubble p {
    margin: 0;
    color: var(--text);
    line-height: 1.55;
}

.reply-card textarea,
.social-card textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 12px;
    font-size: 1rem;
    resize: vertical;
    background: #ffffff;
}

.form-label {
    display: block;
    color: var(--primary-dark);
    font-weight: 900;
    margin-bottom: 8px;
}

.reply-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.legal-shell {
    width: min(980px, calc(100% - 28px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.legal-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.legal-content h1 {
    margin: 0;
    color: var(--primary-dark);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    letter-spacing: -0.05em;
}

.legal-content h2 {
    color: var(--primary-dark);
    margin: 0 0 8px;
    font-size: 1.16rem;
}

.legal-content p,
.legal-content li {
    color: #34445a;
    line-height: 1.7;
}

.legal-content ul {
    margin: 0;
    padding-left: 20px;
}

@media (max-width: 980px) {
    .public-detail-shell,
    .messages-shell,
    .conversation-shell,
    .legal-shell {
        grid-template-columns: 1fr;
        width: min(760px, calc(100% - 22px));
    }

    .conversation-header-card {
        display: block;
    }

    .conversation-actions {
        justify-content: flex-start;
        margin-top: 12px;
    }
}

@media (max-width: 640px) {
    .public-detail-left {
        display: block;
    }

    .public-detail-hero {
        align-items: flex-start;
    }

    .public-detail-hero h2 {
        font-size: 1.5rem;
    }

    .social-inline-list {
        grid-template-columns: 1fr;
    }

    .chat-bubble {
        max-width: 92%;
    }

    .chat-meta {
        display: block;
    }

    .reply-actions .button,
    .conversation-actions .button,
    .conversation-actions form,
    .conversation-actions button {
        width: 100%;
    }
}

/* =========================================================
   MOBILE CLEANUP - menu hamburger senza duplicazioni visibili
   Su smartphone le voci già presenti nel menu hamburger non
   vengono ripetute fuori dal menu. Restano visibili solo i
   contenuti realmente utili della pagina.
   ========================================================= */

@media (max-width: 980px) {
    /* Home pubblica: il riquadro logo/navigazione laterale duplica l'header e il menu */
    .public-home .public-left {
        display: none !important;
    }

    /* Dashboard e pagine utente: le scorciatoie sono già nel menu hamburger */
    .social-sidebar-left .social-quick-nav,
    .social-sidebar-left .social-admin-box {
        display: none !important;
    }

    /* Mantiene la scheda personale sopra il contenuto principale, ma senza menu duplicati */
    .social-sidebar-left {
        gap: 10px;
    }

    /* Sulle pagine pubbliche di elenco i filtri restano visibili perché non sono menu */
    .public-shell-list .public-left,
    .public-detail-shell .public-left {
        display: flex !important;
    }
}

@media (max-width: 640px) {
    /* Su smartphone pieno la dashboard parte subito dai dati utili */
    .social-dashboard {
        padding-top: 10px;
    }

    .social-profile-box {
        padding: 14px !important;
    }

    .social-profile-box h1 {
        font-size: 1rem;
    }

    .social-profile-box p {
        font-size: 0.84rem;
    }

    /* Le card laterali informative vanno dopo il contenuto, senza occupare l'apertura pagina */
    .social-sidebar-right {
        order: 4;
    }

    /* Home pubblica più diretta: niente navigazione duplicata sotto l'header */
    .public-home .public-feed {
        order: 1;
    }

    .public-home .public-right {
        order: 2;
    }
}

/* =========================================================
   MOBILE FACEBOOK-LIKE CLEANUP v2
   Su smartphone niente colonne laterali/menu duplicati fuori
   dall'hamburger: resta un feed centrale compatto e leggibile.
   ========================================================= */

@media (max-width: 760px) {
    /* Dashboard: nasconde tutta la colonna sinistra perché le sue voci sono già nel menu hamburger */
    .social-dashboard .social-sidebar-left {
        display: none !important;
    }

    .social-dashboard .social-shell {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 10px 10px 18px !important;
    }

    .social-dashboard .social-feed,
    .social-dashboard .social-sidebar-right {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .social-dashboard .social-feed {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    .social-dashboard .social-sidebar-right {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-top: 10px !important;
    }

    .social-dashboard .social-card,
    .social-dashboard .social-composer,
    .social-dashboard .social-stats article {
        border-radius: 18px !important;
        box-shadow: 0 3px 12px rgba(15, 35, 55, 0.07) !important;
    }

    .social-dashboard .social-composer {
        padding: 14px !important;
        gap: 10px !important;
        align-items: flex-start !important;
    }

    .social-dashboard .social-composer h2,
    .social-dashboard .social-section-title h2 {
        font-size: 1.08rem !important;
        line-height: 1.2 !important;
    }

    .social-dashboard .social-composer p,
    .social-dashboard .social-section-title p,
    .social-dashboard .social-list-content p,
    .social-dashboard .social-small-text {
        font-size: 0.95rem !important;
        line-height: 1.42 !important;
    }

    /* I contatori non devono diventare enormi card verticali */
    .social-dashboard .social-stats {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .social-dashboard .social-stats article {
        min-height: 66px !important;
        padding: 10px 6px !important;
        text-align: center !important;
    }

    .social-dashboard .social-stats strong {
        font-size: 1.35rem !important;
    }

    .social-dashboard .social-stats span {
        margin-top: 4px !important;
        font-size: 0.74rem !important;
        white-space: nowrap !important;
    }

    .social-dashboard .social-list-item {
        grid-template-columns: auto minmax(0, 1fr) !important;
        gap: 9px !important;
        padding: 10px !important;
    }

    .social-dashboard .social-list-content h3 {
        font-size: 0.98rem !important;
        line-height: 1.22 !important;
    }

    .social-dashboard .social-mini-button {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        text-align: center !important;
        min-height: 40px !important;
        padding: 9px 12px !important;
    }

    .social-dashboard .social-full-button {
        min-height: 42px !important;
    }

    .social-dashboard .social-account-list div {
        align-items: center !important;
    }

    /* Home pubblica: nasconde colonne laterali informative e link duplicati su smartphone */
    main.public-home > .public-shell {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 10px 10px 18px !important;
    }

    main.public-home > .public-shell > .public-left,
    main.public-home > .public-shell > .public-right {
        display: none !important;
    }

    main.public-home .public-feed {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    main.public-home .public-hero,
    main.public-home .public-card,
    main.public-home .public-feed-card {
        border-radius: 18px !important;
    }

    main.public-home .public-hero {
        padding: 18px !important;
    }

    main.public-home .public-hero h1 {
        font-size: 1.65rem !important;
        line-height: 1.12 !important;
    }

    main.public-home .public-hero p {
        font-size: 0.98rem !important;
        line-height: 1.45 !important;
    }

    main.public-home .public-stats {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    main.public-home .public-stats article,
    main.public-home .public-stats div,
    main.public-home .public-stats li {
        min-height: 58px !important;
        padding: 8px 6px !important;
        border-radius: 15px !important;
        text-align: center !important;
    }

    /* Elenchi pubblici: i filtri sono utili, ma non devono sembrare un secondo menu. */
    .public-shell-list {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 10px 18px !important;
        gap: 10px !important;
    }

    .public-shell-list .public-left {
        position: static !important;
        width: 100% !important;
    }

    .public-shell-list .public-left .public-nav-links,
    .public-shell-list .public-left .public-page-links,
    .public-shell-list .public-left .side-nav,
    .public-shell-list .public-left nav:not(.filters-nav) {
        display: none !important;
    }

    .public-shell-list .public-right {
        display: none !important;
    }
}

@media (max-width: 420px) {
    .social-dashboard .social-stats,
    main.public-home .public-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* =========================================================
   PROFILO MODIFICA - FORM APP STYLE
   ========================================================= */

.tic-item-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.tic-pill-link-secondary {
    background: #ffffff;
    border: 1px solid #dbe4ee;
}

.tic-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tic-form label {
    display: block;
    font-weight: 900;
    margin-bottom: 7px;
    color: #111827;
}

.tic-form input[type="text"],
.tic-form input[type="email"],
.tic-form input[type="url"],
.tic-form input[type="file"],
.tic-form select,
.tic-form textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid #dbe4ee;
    border-radius: 15px;
    padding: 11px 13px;
    background: #ffffff;
    color: #111827;
    font-size: 1rem;
}

.tic-form textarea {
    resize: vertical;
    line-height: 1.55;
}

.tic-form-grid {
    display: grid;
    gap: 16px;
}

.tic-form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tic-form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tic-form-block {
    margin-top: 2px;
}

.tic-check-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: #667085;
}

.tic-check-row label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid #dbe4ee;
    border-radius: 999px;
    background: #f8fbfe;
    margin: 0;
    font-weight: 800;
}

.tic-tags-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.tic-tags-box {
    border: 1px solid #dbe4ee;
    border-radius: 16px;
    padding: 13px;
    background: #fbfdff;
}

.tic-tags-box strong {
    color: #0b568f;
}

.tic-tags-box div {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 10px;
}

.tic-tags-box label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #667085;
    font-size: 0.94rem;
    font-weight: 800;
}

.pwa-install-box {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #cfe0ef;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(15, 35, 55, 0.22);
}

.pwa-install-box div {
    flex: 1;
    min-width: 0;
}

.pwa-install-box strong,
.pwa-install-box span {
    display: block;
}

.pwa-install-box strong {
    color: #0b568f;
    font-size: 0.98rem;
}

.pwa-install-box span {
    color: #667085;
    font-size: 0.86rem;
}

.pwa-install-box button {
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    background: #0b66b2;
    color: #ffffff;
    font-weight: 900;
}

.pwa-install-box .pwa-install-close {
    width: 38px;
    padding: 0;
    background: #eef5fc;
    color: #0b568f;
}

@media (max-width: 760px) {
    .tic-form-grid.two,
    .tic-form-grid.three,
    .tic-tags-grid {
        grid-template-columns: 1fr;
    }

    .tic-item-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .tic-item-actions .tic-pill-link {
        flex: 1;
        text-align: center;
    }

    .tic-check-row {
        flex-direction: column;
    }

    .tic-check-row label {
        border-radius: 15px;
    }
}

/* =========================================================
   FIX LOGO, TEMA VERDE, MESSAGGI E PWA - 2026-05-16
   ========================================================= */
:root {
    --bg: #f3f7f4;
    --surface: #ffffff;
    --surface-soft: #f8fbf8;
    --surface-blue: #eaf7ef;
    --text: #17221b;
    --muted: #647268;
    --primary: #0b7a35;
    --primary-dark: #065f2a;
    --primary-soft: #eaf7ef;
    --accent: #0b7a35;
    --accent-soft: #eaf7ef;
    --border: #cfe8d8;
    --success: #1f7a4d;
    --tic-page-bg: #f3f7f4;
    --tic-card-bg: #ffffff;
    --tic-line: #cfe8d8;
    --tic-line-soft: #e3f1e8;
    --tic-text: #17221b;
    --tic-muted: #647268;
    --tic-blue: #0b7a35;
    --tic-blue-dark: #065f2a;
    --tic-blue-soft: #eaf7ef;
    --tic-orange: #0b7a35;
    --tic-green: #159447;
    --tic-purple: #087233;
}

body {
    background: var(--bg);
    color: var(--text);
}

.site-header {
    background: rgba(255, 255, 255, 0.97);
    border-bottom-color: var(--border);
}

.brand-with-logo {
    gap: 0;
    min-width: 0;
}

.brand-with-logo::before {
    display: none !important;
    content: none !important;
}

.brand-logo {
    display: block;
    width: min(300px, 56vw);
    height: auto;
    max-height: 54px;
    object-fit: contain;
    object-position: left center;
}

.brand-text-fallback {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

.menu-toggle {
    border-color: var(--border);
    color: var(--primary-dark);
}

.button,
.social-mini-button,
.tic-pill-link,
.nav-cta {
    background: var(--primary) !important;
    color: #ffffff !important;
}

.button-secondary,
.public-post-actions a {
    background: var(--primary-soft) !important;
    color: var(--primary-dark) !important;
}

.social-dashboard {
    padding: 18px 0 34px;
    background: radial-gradient(circle at top left, rgba(234, 247, 239, 0.9), transparent 34%), var(--bg);
}

.social-shell {
    width: min(1480px, calc(100% - 28px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px minmax(0, 760px) 320px;
    gap: 18px;
    align-items: start;
}

.social-sidebar {
    min-width: 0;
}

.social-sidebar-left,
.social-sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 86px;
}

.social-feed {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.social-card,
.social-composer {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 3px 14px rgba(6, 95, 42, 0.06);
}

.social-card {
    padding: 16px;
    min-width: 0;
}

.social-composer {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 16px;
    min-width: 0;
}

.social-composer-body,
.social-list-content,
.social-section-title,
.social-profile-box > div {
    min-width: 0;
}

.social-profile-box {
    display: flex;
    align-items: center;
    gap: 13px;
}

.social-profile-box h1,
.social-section-title h2,
.social-composer h2,
.social-list-content h3 {
    margin: 0;
    color: var(--primary-dark);
    letter-spacing: -0.035em;
    line-height: 1.18;
}

.social-profile-box h1 {
    font-size: 1.55rem;
}

.social-profile-box p,
.social-section-title p,
.social-composer p,
.social-list-content p,
.social-small-text {
    color: var(--muted);
    margin: 5px 0 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: normal;
}

.social-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #159447, #065f2a);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex: 0 0 auto;
    box-shadow: 0 8px 18px rgba(6, 95, 42, 0.18);
}

.social-avatar-small {
    width: 44px;
    height: 44px;
}

.social-quick-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.social-quick-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 13px;
    color: var(--text);
    font-weight: 850;
}

.social-quick-nav a:hover {
    background: var(--primary-soft);
}

.social-quick-nav a span,
.social-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--primary-soft);
    flex: 0 0 auto;
}

.social-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-list-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fbfefc;
    min-width: 0;
}

.social-list-content h3 {
    font-size: 1rem;
}

.social-list-content strong {
    overflow-wrap: anywhere;
}

.social-mini-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.social-empty {
    padding: 13px;
    border-radius: 14px;
    background: #fffaf0;
    border: 1px solid #eadfaf;
    color: #5a420f;
}

.conversation-row.has-unread {
    background: #f0fbf3;
    border-color: #a9dab9;
}

.inline-badge {
    background: #ffffff;
    color: var(--primary-dark);
}

.chat-card,
.reply-card {
    min-width: 0;
}

.chat-bubble,
.chat-meta,
.reply-card textarea,
.social-card textarea {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.footer-links a:hover,
.nav-link:hover,
.public-tags span,
.social-tags span {
    color: var(--primary-dark);
}

@media (max-width: 1220px) {
    .social-shell,
    .messages-shell,
    .conversation-shell {
        grid-template-columns: 250px minmax(0, 1fr) 290px;
    }
}

@media (max-width: 980px) {
    .social-shell,
    .messages-shell,
    .conversation-shell {
        width: min(760px, calc(100% - 22px));
        grid-template-columns: 1fr;
    }

    .social-sidebar-left,
    .social-sidebar-right {
        position: static;
    }
}

@media (max-width: 760px) {
    .brand-logo {
        width: min(230px, 62vw);
        max-height: 48px;
    }

    .social-dashboard .social-sidebar-left {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .site-header .container,
    .site-footer .container,
    .social-shell,
    .messages-shell,
    .conversation-shell {
        width: min(100% - 18px, 760px) !important;
    }

    .brand-logo {
        width: min(210px, 58vw);
        max-height: 44px;
    }

    .social-list-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .social-mini-button {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* =========================================================
   FIX CONVERSAZIONE + NOME APP PWA - 2026-05-16
   ========================================================= */
.conversation-shell .social-profile-box {
    align-items: flex-start;
}

.conversation-shell .social-profile-box > div,
.conversation-header-card .social-section-title,
.chat-bubble,
.chat-meta strong,
.chat-meta span {
    min-width: 0;
}

.conversation-shell .social-profile-box h1,
.conversation-shell .social-profile-box p,
.chat-meta strong,
.chat-meta span,
.chat-bubble p,
.social-small-text,
.nav-head div,
.nav-title {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.conversation-shell .social-profile-box h1 {
    font-size: 1.08rem;
    letter-spacing: -0.02em;
    line-height: 1.22;
}

.conversation-header-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.conversation-header-card .social-section-title h2 {
    font-size: clamp(1.22rem, 2vw, 1.65rem);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.conversation-actions {
    min-width: 0;
}

.chat-bubble {
    max-width: min(76%, 560px);
}

.chat-meta {
    align-items: flex-start;
}

.chat-meta strong {
    max-width: 58%;
}

.chat-meta span {
    text-align: right;
    flex: 0 1 auto;
}

@media (max-width: 1220px) {
    .conversation-shell {
        grid-template-columns: 250px minmax(0, 1fr) 290px;
    }

    .conversation-shell .social-profile-box h1 {
        font-size: 1rem;
    }
}

@media (max-width: 980px) {
    .conversation-header-card {
        grid-template-columns: 1fr;
    }

    .conversation-actions {
        justify-content: flex-start;
        margin-top: 12px;
    }

    .chat-bubble {
        max-width: 88%;
    }
}

@media (max-width: 640px) {
    .conversation-shell .social-profile-box h1 {
        font-size: 1rem;
    }

    .chat-bubble {
        max-width: 100%;
        width: 100%;
    }

    .chat-message.is-mine,
    .chat-message.is-other {
        justify-content: stretch;
    }

    .chat-meta {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .chat-meta strong,
    .chat-meta span {
        max-width: 100%;
        text-align: left;
    }
}

/* Admin utenti */
.admin-users-page {
    padding-top: 28px;
}

.admin-users-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}

.admin-users-hero > div:first-child,
.admin-users-stats,
.admin-users-filters,
.admin-user-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.admin-users-hero > div:first-child {
    padding: 24px;
}

.admin-users-hero h1 {
    margin: 12px 0 8px;
    color: var(--primary-dark);
}

.admin-users-hero p {
    margin: 0;
    color: var(--muted);
    max-width: 760px;
}

.admin-users-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 16px;
}

.admin-users-stats article {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    text-align: center;
}

.admin-users-stats strong {
    display: block;
    color: var(--primary-dark);
    font-size: 1.8rem;
    line-height: 1;
}

.admin-users-stats span {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 800;
    margin-top: 6px;
}

.admin-users-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 220px auto auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    margin-bottom: 16px;
}

.admin-users-filters label,
.admin-user-danger label {
    display: block;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.admin-users-filters input,
.admin-users-filters select,
.admin-user-danger input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 11px 12px;
    font-size: 1rem;
    background: #fff;
    color: var(--text);
}

.admin-users-warning {
    margin-bottom: 18px;
}

.admin-users-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-user-card {
    padding: 18px;
}

.admin-user-main {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.admin-user-identity {
    min-width: 0;
}

.admin-user-identity h2 {
    margin: 0 0 6px;
    color: var(--primary-dark);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-user-identity p {
    margin: 4px 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.admin-user-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.admin-user-counts span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--primary-soft);
    color: var(--primary-dark);
    padding: 7px 10px;
    font-size: 0.9rem;
    font-weight: 800;
}

.admin-user-danger {
    margin-top: 14px;
    border: 1px solid #f0c7c7;
    border-radius: 18px;
    background: #fffafa;
    overflow: hidden;
}

.admin-user-danger summary {
    cursor: pointer;
    padding: 13px 15px;
    font-weight: 900;
    color: #8a1f1f;
}

.admin-user-danger-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0 15px 15px;
}

.admin-user-danger form {
    background: #fff;
    border: 1px solid #f0d3d3;
    border-radius: 16px;
    padding: 15px;
}

.admin-user-danger h3 {
    margin: 0 0 8px;
    color: #8a1f1f;
}

.admin-user-danger p {
    color: var(--muted);
    margin: 0 0 12px;
}

.button-danger {
    background: #a52828;
    color: #fff;
    border-color: #a52828;
}

.button-danger:hover {
    background: #7f1d1d;
    border-color: #7f1d1d;
    color: #fff;
}

@media (max-width: 920px) {
    .admin-users-hero {
        grid-template-columns: 1fr;
    }

    .admin-users-filters {
        grid-template-columns: 1fr;
    }

    .admin-user-danger-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .admin-users-stats {
        grid-template-columns: 1fr;
    }

    .admin-user-main {
        flex-direction: column;
    }
}


/* =========================================================
   FIX ADMIN PROFILI - layout verde/app + azioni mancanti
   ========================================================= */
.admin-profiles-page {
    padding: 28px 0 44px;
    background: radial-gradient(circle at top left, rgba(234, 247, 239, 0.95), transparent 34%), var(--bg);
}

.admin-profiles-wrap {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
}

.admin-profiles-hero,
.admin-profiles-filters,
.admin-profile-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 3px 14px rgba(6, 95, 42, 0.06);
}

.admin-profiles-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    padding: 22px;
    margin-bottom: 16px;
}

.admin-profiles-hero h1,
.admin-profiles-filters h2,
.admin-profile-card h2,
.admin-profile-card h3,
.admin-profiles-panel h2 {
    color: var(--primary-dark);
}

.admin-profiles-hero h1 {
    margin: 10px 0 8px;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    letter-spacing: -0.04em;
}

.admin-profiles-hero p,
.admin-profiles-filters p,
.admin-profile-card p,
.admin-profile-card dd,
.admin-profile-photo-status,
.admin-technical-details {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.admin-profiles-panel {
    padding: 16px;
    border-radius: 18px;
    background: var(--primary-soft);
    border: 1px solid var(--border);
}

.admin-profiles-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.admin-profiles-links a,
.admin-filter-pills a,
.admin-soft-button {
    background: var(--primary-soft) !important;
    color: var(--primary-dark) !important;
    border: 1px solid var(--border);
}

.admin-profiles-links a,
.admin-filter-pills a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 12px;
    font-weight: 900;
    text-align: center;
}

.admin-profiles-filters {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 18px;
    margin-bottom: 16px;
}

.admin-profiles-filters h2,
.admin-profiles-filters p {
    margin: 0;
}

.admin-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.admin-filter-pills a.is-active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary);
}

.admin-profiles-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-profile-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    min-width: 0;
}

.admin-profile-media img,
.admin-profile-no-photo {
    width: 132px;
    height: 132px;
    border-radius: 28px;
    display: block;
    object-fit: cover;
    border: 1px solid var(--border);
    box-shadow: 0 10px 22px rgba(6, 95, 42, 0.12);
}

.admin-profile-no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-soft);
    color: var(--muted);
    text-align: center;
    padding: 10px;
    font-weight: 900;
}

.admin-profile-photo-status {
    margin-top: 8px;
    font-size: 0.88rem;
}

.admin-profile-main,
.admin-profile-head > div,
.admin-profile-head,
.admin-profile-card section,
.admin-profile-form,
.admin-profile-meta div {
    min-width: 0;
}

.admin-profile-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.admin-profile-card h2 {
    margin: 7px 0 6px;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    line-height: 1.18;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
}

.admin-status-badge {
    display: inline-flex;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.82rem;
    font-weight: 900;
}

.admin-profile-top-actions,
.admin-profile-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-profile-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.admin-profile-meta div {
    background: #fbfefc;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
}

.admin-profile-meta dt {
    font-weight: 900;
    color: var(--primary-dark);
    font-size: 0.82rem;
    margin-bottom: 3px;
}

.admin-profile-meta dd {
    margin: 0;
}

.admin-profile-tags {
    margin-bottom: 12px;
}

.admin-profile-text-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.admin-profile-text-grid section,
.admin-technical-details {
    background: #fbfefc;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 13px;
}

.admin-profile-text-grid h3,
.admin-profile-text-grid p {
    margin: 0;
}

.admin-profile-text-grid h3 {
    margin-bottom: 6px;
    font-size: 0.98rem;
}

.admin-technical-details {
    margin-top: 12px;
}

.admin-technical-details summary {
    cursor: pointer;
    font-weight: 900;
    color: var(--primary-dark);
}

.admin-profile-note {
    margin-top: 12px;
}

.admin-profile-form {
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.admin-profile-form label {
    display: block;
    font-weight: 900;
    margin-bottom: 6px;
    color: var(--primary-dark);
}

.admin-profile-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    font-size: 1rem;
    resize: vertical;
    min-height: 86px;
}

.admin-profile-actions {
    margin-top: 11px;
    justify-content: flex-start;
}

.admin-danger-button {
    background: #8a1f11 !important;
    color: #ffffff !important;
}

@media (max-width: 980px) {
    .admin-profiles-hero,
    .admin-profiles-filters,
    .admin-profile-card {
        grid-template-columns: 1fr;
    }

    .admin-profiles-filters {
        display: grid;
    }

    .admin-filter-pills,
    .admin-profile-top-actions {
        justify-content: flex-start;
    }

    .admin-profile-meta,
    .admin-profile-text-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .admin-profiles-wrap {
        width: min(100% - 18px, 760px);
    }

    .admin-profiles-links,
    .admin-profile-meta,
    .admin-profile-text-grid {
        grid-template-columns: 1fr;
    }

    .admin-profile-media img,
    .admin-profile-no-photo {
        width: 110px;
        height: 110px;
        border-radius: 22px;
    }

    .admin-profile-top-actions a,
    .admin-profile-actions .button {
        width: 100%;
    }
}

/* Fix admin profili - area eliminazione */
.admin-danger-zone {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(185, 28, 28, .22);
    border-radius: 18px;
    background: #fff7f7;
}

.admin-danger-zone summary {
    cursor: pointer;
    font-weight: 800;
    color: #8b1e1e;
}

.admin-danger-zone p {
    margin: .75rem 0 1rem;
    color: #5f2a2a;
    line-height: 1.55;
}

.admin-profile-delete-actions {
    margin-top: .85rem;
}

.admin-danger-button-strong {
    background: #8b1e1e !important;
    border-color: #8b1e1e !important;
    color: #fff !important;
}

.admin-danger-zone .form-control {
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(185, 28, 28, .28);
    border-radius: 12px;
    padding: .75rem .85rem;
}

.reserved-data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.reserved-data-grid label {
    display: block;
    font-weight: 800;
    margin-bottom: 6px;
}

.reserved-data-grid input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 1rem;
    background: #fff;
}

.reserved-data-grid input[readonly] {
    background: #f7fbf8;
    color: var(--muted);
}

.reserved-data-grid small {
    display: block;
    color: var(--muted);
    margin-top: 5px;
    line-height: 1.35;
}

.municipality-autocomplete-wrap {
    position: relative;
}

.municipality-results {
    position: absolute;
    z-index: 80;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    max-height: 260px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(6, 95, 42, .16);
    padding: 6px;
}

.municipality-result-item {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: transparent;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
}

.municipality-result-item:hover,
.municipality-result-item:focus {
    background: var(--soft);
    outline: none;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--border);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    font-weight: 900;
    color: var(--primary-dark);
}

.admin-user-reserved-data {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--soft);
    color: var(--text);
}

.admin-user-reserved-data strong {
    color: var(--primary-dark);
}

@media (max-width: 760px) {
    .reserved-data-grid {
        grid-template-columns: 1fr;
    }
}


.tic-character-counter {
    margin-top: 6px;
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.35;
}

.tic-character-counter.is-ok {
    color: var(--primary-dark);
    font-weight: 700;
}

.tic-character-counter.is-warning {
    color: #8a5b00;
    font-weight: 700;
}

.tic-character-counter.is-error {
    color: #9b1c1c;
    font-weight: 700;
}

.admin-danger-actions {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #f1c9c9;
    background: #fff7f7;
    border-radius: 16px;
}

.admin-danger-actions h3 {
    margin-top: 0;
    color: #7f1d1d;
}

.admin-danger-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: end;
}

@media (max-width: 780px) {
    .admin-danger-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   HOME - NUMERI PIU' CHIARI E ORDINATI - 2026-05-16
   ========================================================= */
.public-numbers-card {
    padding: 18px;
}

.public-numbers-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.public-number-box {
    min-height: 128px;
    padding: 16px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f4fbf6 100%);
    box-shadow: 0 8px 22px rgba(6, 95, 42, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 5px;
}

.public-number-box strong {
    display: block;
    color: var(--primary-dark);
    font-size: clamp(1.65rem, 3vw, 2.2rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.public-number-box span {
    display: block;
    color: var(--text);
    font-weight: 900;
    font-size: 0.98rem;
    line-height: 1.15;
}

.public-number-box small {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.25;
}

.public-logo-symbol {
    display: block;
    width: 58px;
    height: 58px;
    object-fit: contain;
    margin-bottom: 10px;
    filter: drop-shadow(0 8px 14px rgba(6, 95, 42, 0.14));
}

@media (max-width: 900px) {
    .public-numbers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .public-numbers-grid {
        grid-template-columns: 1fr;
    }
    .public-number-box {
        min-height: auto;
    }
}


/* Fix layout, area utente e cancellazioni - 20260517 */

.break-anywhere,
.nav-user-email,
.tic-user-text p,
.tic-mini-list span,
.tic-list-body h3,
.tic-list-body p,
.public-post-meta,
.public-post-body h3,
.public-post-body p,
.social-profile-box h1,
.social-profile-box p,
.social-account-list strong,
.social-account-list span,
.social-text-block,
.social-section-title h2,
.social-section-title p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.nav-user-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.nav-user-text {
    min-width: 0;
}

.nav-user-avatar,
.tic-avatar-img {
    display: inline-flex;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    object-fit: cover;
    flex: 0 0 auto;
    border: 2px solid rgba(8, 114, 51, 0.16);
    background: #fff;
}

.nav-user-avatar:not(img) {
    align-items: center;
    justify-content: center;
    background: var(--success);
    color: #fff;
    font-weight: 900;
}

.nav-user-email {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 800;
    margin-top: 2px;
    max-width: 240px;
}

.tic-avatar.tic-avatar-img,
.tic-avatar-img.tic-avatar {
    padding: 0;
    overflow: hidden;
}

.tic-list-avatar,
.public-post-avatar,
.social-page-avatar,
.social-avatar-img-large {
    object-fit: cover;
}

.tic-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.tic-inline-delete-form,
.button-inline-form,
.social-delete-form,
.social-nav-form {
    margin: 0;
}

.tic-pill-link,
.tic-pill-link:visited,
.tic-pill-link-danger,
.tic-pill-link-danger:visited {
    text-decoration: none;
}

button.tic-pill-link {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.tic-pill-link-danger,
.button-danger {
    background: #fff3f3 !important;
    color: #b42318 !important;
    border: 1px solid #f1b8b8 !important;
}

.tic-pill-link-danger:hover,
.button-danger:hover {
    background: #ffe4e4 !important;
}

.button-inline-form {
    display: inline-flex;
}

.social-nav-form button {
    width: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
    border: 0;
    background: transparent;
    color: #b42318;
    font-family: inherit;
    font-weight: 900;
    font-size: 1rem;
    padding: 10px 0;
    cursor: pointer;
    text-align: left;
}

.social-nav-form button span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #b42318;
    flex: 0 0 auto;
}

.social-delete-form {
    margin-top: 10px;
}

.public-right .social-card .button[href$="login.php"],
.public-right .social-card .button {
    white-space: normal;
}

.social-profile-box,
.tic-user-card,
.public-post-card,
.tic-list-item {
    min-width: 0;
}

.social-profile-box > div,
.tic-user-text,
.public-post-body,
.tic-list-body {
    min-width: 0;
}

.social-account-list div {
    min-width: 0;
}

.social-account-list strong {
    min-width: 0;
}

@media (max-width: 760px) {
    .footer-inner,
    .site-footer .container,
    .site-footer .footer-inner {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        align-items: center;
    }

    .site-footer {
        text-align: center;
    }

    .tic-item-actions,
    .public-post-actions,
    .social-composer-actions {
        justify-content: stretch;
    }

    .tic-item-actions > *,
    .tic-item-actions .tic-pill-link,
    .tic-item-actions button,
    .button-inline-form,
    .button-inline-form button {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .nav-user-email {
        max-width: min(64vw, 250px);
    }
}

/* Fix mobile immagini profilo e footer centrato - 20260517 */
.social-profile-box img.social-page-avatar,
.public-detail-hero img.social-avatar-img-large,
img.social-page-avatar,
img.social-avatar-img-large {
    display: inline-block !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    overflow: hidden !important;
    flex: 0 0 auto !important;
}

.social-profile-box img.social-page-avatar,
img.social-page-avatar {
    width: 54px !important;
    height: 54px !important;
    max-width: 54px !important;
    min-width: 54px !important;
    aspect-ratio: 1 / 1 !important;
}

.public-detail-hero img.social-avatar-img-large,
img.social-avatar-img-large {
    width: 62px !important;
    height: 62px !important;
    max-width: 62px !important;
    min-width: 62px !important;
    aspect-ratio: 1 / 1 !important;
}

@media (max-width: 760px) {
    .public-detail-hero img.social-avatar-img-large,
    img.social-avatar-img-large {
        width: 48px !important;
        height: 48px !important;
        max-width: 48px !important;
        min-width: 48px !important;
    }

    .social-profile-box img.social-page-avatar,
    img.social-page-avatar {
        width: 46px !important;
        height: 46px !important;
        max-width: 46px !important;
        min-width: 46px !important;
    }

    .social-profile-box {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }

    .site-footer,
    .site-footer .container,
    .site-footer .footer-inner,
    footer.site-footer,
    footer.site-footer .container.footer-inner {
        text-align: center !important;
    }

    .site-footer .container.footer-inner,
    footer.site-footer .container.footer-inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 16px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .site-footer .container.footer-inner > div,
    footer.site-footer .container.footer-inner > div {
        width: 100% !important;
        max-width: 520px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    .site-footer .footer-links,
    footer.site-footer .footer-links {
        width: 100% !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }
}


/* Fix area personale: avatar tondi, layout stabile, footer mobile centrato - 20260517 area fix */
.tic-account-avatar,
.tic-account-avatar img,
.area-avatar-img {
    width: 54px !important;
    height: 54px !important;
    max-width: 54px !important;
    min-width: 54px !important;
    max-height: 54px !important;
    min-height: 54px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: inline-flex !important;
    flex: 0 0 54px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    border: 2px solid rgba(8, 114, 51, 0.16) !important;
    background: #ffffff !important;
}

.tic-account-avatar {
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    background: var(--success, #087233) !important;
    font-weight: 900 !important;
}

.tic-account-avatar img {
    border: 0 !important;
    flex-basis: auto !important;
}

.tic-user-card,
.tic-composer.tic-area-hero {
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

.tic-user-card > img,
.tic-composer.tic-area-hero > img,
.tic-user-card .area-avatar-img,
.tic-composer.tic-area-hero .area-avatar-img {
    width: 54px !important;
    height: 54px !important;
    max-width: 54px !important;
    min-width: 54px !important;
    flex: 0 0 54px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.tic-area-title,
.tic-user-text,
.tic-composer-content,
.tic-list-body,
.tic-mini-list a,
.tic-mini-list span,
.tic-card p,
.tic-card h1,
.tic-card h2,
.tic-card h3 {
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}

.tic-area-title h1,
.tic-area-title p,
.tic-user-text h1,
.tic-user-text p,
.tic-composer-content h2,
.tic-composer-content p {
    white-space: normal !important;
}

.tic-area-delete-form {
    margin: 0 !important;
    display: inline-flex !important;
}

.tic-area-delete-button {
    border-color: #ffd6d2 !important;
    background: #fff5f3 !important;
    color: #9f1d14 !important;
}

.tic-area-delete-button:hover,
.tic-area-delete-button:focus {
    background: #ffe7e3 !important;
    color: #7a150f !important;
}

@media (max-width: 760px) {
    .tic-account-avatar,
    .tic-account-avatar img,
    .area-avatar-img,
    .tic-user-card > img,
    .tic-composer.tic-area-hero > img,
    .tic-user-card .area-avatar-img,
    .tic-composer.tic-area-hero .area-avatar-img {
        width: 46px !important;
        height: 46px !important;
        max-width: 46px !important;
        min-width: 46px !important;
        max-height: 46px !important;
        min-height: 46px !important;
        flex: 0 0 46px !important;
    }

    .tic-user-card,
    .tic-composer.tic-area-hero {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: left !important;
    }

    .tic-area-title h1,
    .tic-user-text h1,
    .tic-composer-content h2 {
        font-size: 1.05rem !important;
        line-height: 1.15 !important;
    }

    .tic-item-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .tic-area-delete-form,
    .tic-area-delete-form button {
        width: 100% !important;
    }

    body .site-footer,
    body footer.site-footer {
        text-align: center !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    body .site-footer .container.footer-inner,
    body footer.site-footer .container.footer-inner,
    body .site-footer .footer-inner,
    body footer.site-footer .footer-inner {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        margin: 0 auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body .site-footer .container.footer-inner > div,
    body footer.site-footer .container.footer-inner > div,
    body .site-footer .footer-inner > div,
    body footer.site-footer .footer-inner > div {
        width: 100% !important;
        max-width: 560px !important;
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body .site-footer .footer-links,
    body footer.site-footer .footer-links {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        gap: 14px !important;
    }
}

/* =========================================================
   DECORAZIONE CIVICA LEGGERA - PORTA SANT'ANGELO - FIX 20260517
   Obiettivo: immagine integrata nel layout, non immagine grande in colonna.
   ========================================================= */
.public-home .public-shell {
    grid-template-columns: 280px minmax(0, 800px) 320px;
}

.public-home .public-feed {
    min-width: 0;
}

.tic-decor-hero {
    position: relative;
    overflow: hidden;
    min-height: 315px;
    display: block;
    padding: 34px 34px 32px;
    background:
        radial-gradient(circle at 83% 30%, rgba(11,122,53,.13), transparent 31%),
        linear-gradient(135deg, #ffffff 0%, #fffdf6 49%, #eef8f1 100%);
    border-color: rgba(11,122,53,.18);
    isolation: isolate;
}

.tic-decor-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../img/decor/network-pattern.svg');
    background-repeat: no-repeat;
    background-size: min(560px, 72%) auto;
    background-position: 72% 45%;
    opacity: .34;
    pointer-events: none;
    z-index: 0;
}

.tic-decor-hero::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 56%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.60) 26%, rgba(255,255,255,0) 72%);
    pointer-events: none;
    z-index: 2;
}

.tic-decor-hero-text {
    position: relative;
    z-index: 4;
    max-width: 520px;
}

.tic-decor-hero-text h2 {
    max-width: 620px;
}

.tic-decor-hero-text p {
    max-width: 520px;
}

.tic-decor-hero-visual {
    position: absolute;
    z-index: 1;
    right: 18px;
    top: 10px;
    bottom: 0;
    width: 44%;
    min-width: 265px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    opacity: .86;
}

.tic-decor-hero-visual picture {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.tic-decor-hero-visual img {
    display: block;
    width: auto;
    height: min(100%, 420px);
    max-width: 100%;
    object-fit: contain;
    object-position: right bottom;
    filter:
        saturate(.82)
        contrast(.92)
        brightness(1.06)
        drop-shadow(0 22px 28px rgba(6,95,42,.13));
    mix-blend-mode: multiply;
    transform: translate(12px, 22px);
}

.public-numbers-card,
.public-feed > .social-card {
    position: relative;
    overflow: hidden;
}

.public-numbers-card::after,
.public-feed > .social-card::after {
    content: "";
    position: absolute;
    right: -38px;
    top: -48px;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(11,122,53,.035);
    pointer-events: none;
}

.public-number-box::before {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    margin-bottom: 4px;
    background: rgba(11,122,53,.10);
    border: 1px solid rgba(11,122,53,.14);
    box-shadow: inset 0 0 0 8px rgba(255,255,255,.50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-weight: 900;
}

.public-number-box:nth-child(1)::before { content: "👤"; font-size: 1rem; }
.public-number-box:nth-child(2)::before { content: "☷"; font-size: 1rem; }
.public-number-box:nth-child(3)::before { content: "⌁"; font-size: 1.2rem; }
.public-number-box:nth-child(4)::before { content: "✦"; font-size: 1rem; }

.tic-dev-contact-card {
    background: linear-gradient(180deg, #ffffff 0%, #f3fbf6 100%) !important;
}

.tic-dev-mail-button,
.footer-dev-link,
.tic-footer-contact-button {
    border-color: rgba(11,122,53,.28) !important;
}

.footer-dev-link {
    padding: 8px 12px;
    border: 1px solid rgba(11,122,53,.22);
    border-radius: 999px;
    background: #f2faf5;
}

.tic-footer-contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid rgba(11,122,53,.28);
    border-radius: 14px;
    background: #ffffff;
    color: var(--primary-dark);
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(6,95,42,.06);
}

.tic-footer-contact-button::before {
    content: "✉";
    font-weight: 900;
}

.site-footer .tic-footer-contact-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 1020px) {
    .site-footer .tic-footer-contact-wrap {
        justify-content: flex-end;
    }
}

@media (max-width: 1180px) {
    .public-home .public-shell {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .tic-decor-hero {
        min-height: 300px;
    }

    .tic-decor-hero-visual {
        width: 40%;
        min-width: 235px;
        opacity: .62;
    }

    .tic-decor-hero-text {
        max-width: 500px;
    }
}

@media (max-width: 900px) {
    .tic-decor-hero {
        min-height: 360px;
        padding: 28px 26px 24px;
    }

    .tic-decor-hero::after {
        width: 100%;
        height: 62%;
        top: 0;
        bottom: auto;
        background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.88) 58%, rgba(255,255,255,0) 100%);
    }

    .tic-decor-hero-text {
        max-width: 100%;
    }

    .tic-decor-hero-visual {
        right: 0;
        left: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        min-width: 0;
        height: 190px;
        opacity: .72;
        align-items: flex-end;
    }

    .tic-decor-hero-visual img {
        width: min(330px, 78vw);
        height: auto;
        max-height: 220px;
        transform: translateY(18px);
    }
}

@media (max-width: 760px) {
    .public-home .public-shell {
        width: min(100% - 24px, 720px) !important;
    }

    .tic-decor-hero {
        min-height: 410px;
        padding: 22px 20px 20px;
        border-radius: 22px;
    }

    .tic-decor-hero::before {
        background-size: 380px auto;
        background-position: 92% 56%;
        opacity: .24;
    }

    .tic-decor-hero-text h2 {
        font-size: clamp(1.65rem, 8vw, 2.25rem) !important;
        line-height: 1.04 !important;
    }

    .tic-hero-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .tic-decor-hero-visual {
        height: 220px;
    }

    .tic-decor-hero-visual img {
        width: min(330px, 86vw);
        max-height: 240px;
        opacity: .78;
    }

    .public-numbers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .public-number-box {
        min-height: 120px !important;
        padding: 13px 12px !important;
    }

    .public-number-box::before {
        width: 30px;
        height: 30px;
    }

    .site-footer .tic-footer-contact-wrap {
        width: 100% !important;
        max-width: 560px !important;
        margin: 10px auto 0 !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .tic-footer-contact-button {
        width: min(100%, 360px);
    }
}

@media (max-width: 420px) {
    .tic-decor-hero {
        min-height: 395px;
    }

    .tic-decor-hero-visual {
        height: 205px;
    }

    .public-numbers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .public-number-box strong {
        font-size: 1.45rem !important;
    }

    .public-number-box span {
        font-size: .86rem !important;
    }

    .public-number-box small {
        font-size: .72rem !important;
    }
}

/* =========================================================
   HOME MOCKUP APPROVATO - layout desktop/mobile 20260517
   ========================================================= */
.tic-home-v2 {
    background:
        radial-gradient(circle at 18% 8%, rgba(11,122,53,.055), transparent 28%),
        radial-gradient(circle at 78% 2%, rgba(240,210,155,.10), transparent 24%),
        linear-gradient(180deg, #f7fbf8 0%, #f1f8f3 100%) !important;
}

.tic-home-v2 .tic-home-shell {
    width: min(1500px, calc(100% - 34px)) !important;
    grid-template-columns: 280px minmax(0, 840px) 300px !important;
    gap: 18px !important;
    align-items: start !important;
}

.tic-home-v2 .social-card,
.tic-home-v2 .public-hero-card {
    border-color: rgba(6,95,42,.13) !important;
    box-shadow: 0 16px 42px rgba(6,95,42,.075) !important;
}

.tic-home-v2 .tic-user-panel {
    padding: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
}

.tic-user-panel-top {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 18px;
    background: linear-gradient(135deg, #087233 0%, #065f2a 100%);
    color: #ffffff;
}

.tic-user-panel-top h1,
.tic-user-panel h1 {
    margin: 0 !important;
    color: inherit !important;
    font-size: 1.18rem !important;
    line-height: 1.15 !important;
    letter-spacing: -.03em !important;
    overflow-wrap: anywhere !important;
}

.tic-user-panel-top p,
.tic-user-panel p {
    margin: 4px 0 0 !important;
    color: rgba(255,255,255,.88) !important;
    line-height: 1.35 !important;
}

.tic-home-user-avatar,
.tic-home-user-avatar img,
.tic-user-panel .nav-user-avatar,
.tic-user-panel .nav-user-avatar img {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 3px solid rgba(255,255,255,.85) !important;
    box-shadow: 0 10px 24px rgba(0,0,0,.17) !important;
}

.tic-home-user-avatar-empty {
    background: #eaf7ef !important;
    color: #065f2a !important;
    font-weight: 900 !important;
}

.tic-user-facts {
    padding: 16px 18px 4px;
    display: grid;
    gap: 10px;
}

.tic-user-facts span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #17221b;
    font-weight: 700;
    font-size: .95rem;
}

.tic-user-facts span::before,
.tic-home-quick-nav a::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0b7a35;
    box-shadow: 0 0 0 5px rgba(11,122,53,.09);
    flex: 0 0 auto;
}

.tic-inline-action {
    display: inline-flex;
    margin: 12px 18px 18px;
    color: #065f2a;
    font-weight: 900;
}

.tic-home-quick-nav {
    position: relative;
    padding: 18px !important;
    overflow: hidden;
}

.tic-home-quick-nav h2 {
    margin: 0 0 12px !important;
    color: #065f2a !important;
    font-size: 1.05rem !important;
}

.tic-home-quick-nav::after {
    content: "";
    display: block;
    margin: 24px -18px -18px;
    height: 145px;
    background-image: url('../img/decor/porta-sant-angelo-mark.webp');
    background-repeat: no-repeat;
    background-size: 190px auto;
    background-position: center bottom;
    opacity: .23;
}

.tic-home-quick-nav a {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 11px 12px !important;
    border-radius: 13px !important;
    color: #17221b !important;
    font-weight: 800 !important;
}

.tic-home-quick-nav a:hover {
    background: #eef8f1 !important;
    color: #065f2a !important;
}

.tic-home-quick-nav a span {
    display: none !important;
}

.tic-hero-mockup {
    min-height: 282px !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 30px 34px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 38% !important;
    align-items: center !important;
    gap: 12px !important;
    background:
        linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.95) 42%, rgba(255,255,255,.56) 100%),
        radial-gradient(circle at 72% 50%, rgba(11,122,53,.12), transparent 35%),
        linear-gradient(135deg, #fffef9 0%, #f4fbf6 100%) !important;
}

.tic-hero-mockup::before {
    content: "";
    position: absolute;
    left: -60px;
    top: 40px;
    width: 330px;
    height: 250px;
    background-image: url('../img/decor/network-pattern.svg');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: .20;
    pointer-events: none;
    z-index: 0;
}

.tic-hero-copy {
    position: relative !important;
    z-index: 3 !important;
    max-width: 540px !important;
}

.tic-hero-copy h2 {
    margin: 0 !important;
    font-size: clamp(2rem, 3.3vw, 3.05rem) !important;
    line-height: 1.05 !important;
    letter-spacing: -.055em !important;
    color: #062014 !important;
}

.tic-hero-copy p {
    margin: 18px 0 22px !important;
    max-width: 470px !important;
    color: #33423a !important;
    font-size: 1.05rem !important;
    line-height: 1.55 !important;
}

.tic-hero-actions {
    display: flex !important;
    gap: 14px !important;
    flex-wrap: wrap !important;
}

.tic-hero-actions .button {
    min-height: 48px !important;
    padding-inline: 22px !important;
    border-radius: 12px !important;
    font-weight: 900 !important;
}

.tic-hero-porta {
    position: absolute !important;
    z-index: 1 !important;
    right: 26px !important;
    bottom: -10px !important;
    width: 42% !important;
    height: 106% !important;
    min-width: 310px !important;
    background-image: url('../img/decor/porta-sant-angelo-hero-soft.webp') !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    background-position: right bottom !important;
    opacity: .72 !important;
    mix-blend-mode: multiply !important;
    filter: saturate(.82) contrast(.98) brightness(1.05) drop-shadow(0 28px 30px rgba(6,95,42,.08)) !important;
    pointer-events: none !important;
}

.tic-numbers-section {
    padding: 22px !important;
}

.tic-numbers-section .social-section-title h2,
.tic-section-card .social-section-title h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tic-numbers-section .social-section-title h2::before,
.tic-section-card .social-section-title h2::before {
    content: "";
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(11,122,53,.12);
    box-shadow: inset 0 0 0 1px rgba(11,122,53,.13);
}

.tic-numbers-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
}

.tic-number-card {
    min-height: 145px !important;
    padding: 18px 16px !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, #fff 0%, #fbfdfb 100%) !important;
}

.tic-number-card::before {
    content: "" !important;
    width: 46px !important;
    height: 46px !important;
    margin-bottom: 10px !important;
    border-radius: 50% !important;
    display: block !important;
    background: #e9f4e9 !important;
    border: 1px solid rgba(11,122,53,.13) !important;
}

.tic-number-card strong {
    font-size: 2.05rem !important;
    color: #0b7a35 !important;
    line-height: 1 !important;
}

.tic-number-card span {
    margin-top: 8px !important;
    color: #17221b !important;
    font-weight: 900 !important;
}

.tic-number-card small {
    margin-top: 6px !important;
    color: #5f6e65 !important;
    line-height: 1.35 !important;
}

.tic-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.tic-preview-card {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    min-height: 155px;
    background: #ffffff !important;
}

.tic-preview-card .public-post-actions a {
    width: 100%;
    text-align: center;
    border: 1px solid rgba(11,122,53,.22);
    background: #ffffff !important;
    color: #065f2a !important;
}

.tic-request-preview .public-post-avatar-empty {
    background: #fff4df !important;
    color: #9a5b00 !important;
}

.tic-info-card {
    padding: 20px !important;
}

.tic-info-card .social-section-title h2::before,
.tic-mobile-info-stack a::before {
    content: "";
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    background: #e9f4e9;
    border: 1px solid rgba(11,122,53,.12);
    margin-right: 8px;
    vertical-align: middle;
}

.tic-info-card .social-section-title h2 {
    display: flex;
    align-items: center;
}

.tic-mobile-info-stack,
.tic-mobile-bottom-cta {
    display: none !important;
}

.tic-home-footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #f7fbf8 0%, #eaf7ef 100%) !important;
    border-top: 1px solid rgba(11,122,53,.14) !important;
}

.tic-home-footer::before,
.tic-home-footer::after {
    content: "";
    position: absolute;
    bottom: 12px;
    width: 180px;
    height: 90px;
    background-image: url('../img/decor/network-pattern.svg');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: .15;
    pointer-events: none;
}

.tic-home-footer::before { left: 30px; }
.tic-home-footer::after { right: 30px; transform: scaleX(-1); }

.tic-footer-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr) minmax(220px, .8fr) !important;
    align-items: center !important;
    gap: 22px !important;
    position: relative;
    z-index: 1;
}

.tic-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tic-footer-brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.tic-footer-links {
    justify-content: center !important;
}

.tic-footer-contact-button {
    max-width: 330px;
    justify-self: end;
}

.tic-footer-credit {
    text-align: center;
    font-size: .84rem;
    color: #5f6e65;
    padding: 8px 14px 14px;
    position: relative;
    z-index: 1;
}

@media (max-width: 1260px) {
    .tic-home-v2 .tic-home-shell {
        grid-template-columns: 245px minmax(0, 1fr) 280px !important;
    }

    .tic-hero-mockup {
        grid-template-columns: minmax(0, 1fr) 34% !important;
    }

    .tic-hero-porta {
        width: 38% !important;
        min-width: 260px !important;
        opacity: .55 !important;
    }
}

@media (max-width: 980px) {
    .tic-home-v2 .tic-home-shell {
        width: min(760px, calc(100% - 22px)) !important;
        grid-template-columns: 1fr !important;
    }

    .tic-home-left { order: 1 !important; }
    .tic-home-main { order: 2 !important; }
    .tic-home-right { order: 3 !important; }

    .tic-home-right {
        display: none !important;
    }

    .tic-home-quick-nav {
        display: none !important;
    }

    .tic-user-panel-top {
        grid-template-columns: 54px minmax(0, 1fr);
        padding: 14px;
        background: #ffffff !important;
        color: #17221b !important;
    }

    .tic-user-panel-top p {
        color: #496056 !important;
    }

    .tic-user-facts,
    .tic-inline-action {
        display: none !important;
    }

    .tic-home-user-avatar,
    .tic-home-user-avatar img,
    .tic-user-panel .nav-user-avatar,
    .tic-user-panel .nav-user-avatar img {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
        border-color: #ffffff !important;
    }

    .tic-hero-mockup {
        min-height: 360px !important;
        grid-template-columns: 1fr !important;
        padding: 22px !important;
        align-items: start !important;
        background:
            linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(255,255,255,.94) 55%, rgba(255,255,255,.70) 100%),
            linear-gradient(135deg, #fffef9 0%, #eef8f1 100%) !important;
    }

    .tic-hero-porta {
        right: -10px !important;
        bottom: 0 !important;
        width: 78% !important;
        height: 185px !important;
        min-width: 0 !important;
        opacity: .42 !important;
        background-image: url('../img/decor/porta-sant-angelo-hero-soft-mobile.webp') !important;
        background-position: right bottom !important;
    }

    .tic-hero-copy h2 {
        font-size: clamp(1.65rem, 7.2vw, 2.25rem) !important;
        max-width: 370px !important;
    }

    .tic-hero-copy p {
        font-size: .98rem !important;
        max-width: 360px !important;
    }

    .tic-hero-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        max-width: 420px;
    }

    .tic-hero-actions .button {
        width: 100% !important;
        justify-content: center !important;
    }

    .tic-mobile-info-stack {
        display: grid !important;
        gap: 8px !important;
    }

    .tic-mobile-info-stack a {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) 18px;
        align-items: center;
        gap: 10px;
        padding: 13px 14px;
        border: 1px solid rgba(11,122,53,.14);
        border-radius: 14px;
        background: #ffffff;
        color: #17221b;
        box-shadow: 0 8px 22px rgba(6,95,42,.06);
    }

    .tic-mobile-info-stack a::after {
        content: ">";
        color: #065f2a;
        font-weight: 900;
    }

    .tic-mobile-info-stack strong,
    .tic-mobile-info-stack span {
        display: block;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .tic-mobile-info-stack strong {
        color: #065f2a;
        font-size: .95rem;
    }

    .tic-mobile-info-stack span {
        color: #5f6e65;
        font-size: .84rem;
        margin-top: 2px;
    }

    .tic-mobile-bottom-cta {
        display: inline-flex !important;
        width: 100%;
        justify-content: center;
        margin-top: -2px;
    }

    .tic-card-grid {
        grid-template-columns: 1fr !important;
    }

    .tic-home-requests-section {
        display: none !important;
    }

    .tic-footer-inner {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        justify-items: center !important;
    }

    .tic-footer-brand {
        justify-content: center !important;
        flex-direction: column;
        text-align: center !important;
    }

    .tic-footer-links {
        justify-content: center !important;
    }

    .tic-footer-contact-button {
        justify-self: center !important;
        width: min(100%, 360px) !important;
    }
}

@media (max-width: 640px) {
    .tic-home-v2 .tic-home-shell {
        width: min(100% - 18px, 760px) !important;
        gap: 12px !important;
    }

    .tic-hero-mockup {
        border-radius: 20px !important;
        min-height: 350px !important;
    }

    .tic-numbers-section {
        padding: 14px !important;
    }

    .tic-numbers-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }

    .tic-number-card {
        min-height: 108px !important;
        padding: 12px !important;
    }

    .tic-number-card::before {
        width: 34px !important;
        height: 34px !important;
        margin-bottom: 5px !important;
    }

    .tic-number-card strong {
        font-size: 1.42rem !important;
    }

    .tic-number-card span {
        font-size: .82rem !important;
        line-height: 1.1 !important;
    }

    .tic-number-card small {
        display: none !important;
    }

    .tic-preview-card {
        grid-template-columns: 54px minmax(0, 1fr) !important;
        min-height: auto !important;
    }

    .tic-home-footer::before,
    .tic-home-footer::after {
        width: 110px;
        opacity: .10;
    }
}

@media (max-width: 420px) {
    .tic-hero-mockup {
        min-height: 335px !important;
        padding: 20px 18px !important;
    }

    .tic-hero-copy p {
        margin: 12px 0 16px !important;
    }

    .tic-hero-porta {
        width: 86% !important;
        height: 165px !important;
        opacity: .35 !important;
    }
}

/* Fix mobile quick info cards: keep title and description in the central column.
   Previously the generated icon, title, subtitle and arrow occupied separate grid cells,
   forcing the subtitle into the narrow arrow column and making text vertical. */
@media (max-width: 980px) {
    .tic-mobile-info-stack a {
        display: grid !important;
        grid-template-columns: 42px minmax(0, 1fr) 22px !important;
        grid-template-rows: auto auto !important;
        align-items: center !important;
        column-gap: 12px !important;
        row-gap: 2px !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 13px 14px !important;
        overflow: hidden !important;
    }

    .tic-mobile-info-stack a::before {
        grid-column: 1 !important;
        grid-row: 1 / span 2 !important;
        width: 38px !important;
        height: 38px !important;
        margin: 0 !important;
        align-self: center !important;
    }

    .tic-mobile-info-stack a strong {
        grid-column: 2 !important;
        grid-row: 1 !important;
        min-width: 0 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        line-height: 1.2 !important;
    }

    .tic-mobile-info-stack a span {
        grid-column: 2 !important;
        grid-row: 2 !important;
        min-width: 0 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        line-height: 1.25 !important;
    }

    .tic-mobile-info-stack a::after {
        grid-column: 3 !important;
        grid-row: 1 / span 2 !important;
        align-self: center !important;
        justify-self: end !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        line-height: 1 !important;
    }
}

@media (max-width: 640px) {
    .tic-mobile-info-stack a {
        border-radius: 16px !important;
        padding: 14px 16px !important;
    }
}

/* Performance tuning - PageSpeed 20260517 */
.tic-section-card,
.tic-home-requests-section,
.tic-info-card,
.tic-home-footer {
    content-visibility: auto;
    contain-intrinsic-size: 320px;
}

.tic-preview-card .public-post-avatar,
.public-post-avatar {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
}

@media (max-width: 980px) {
    .tic-section-card,
    .tic-home-requests-section,
    .tic-info-card,
    .tic-home-footer {
        contain-intrinsic-size: 520px;
    }
}


/* Upload foto: scelta file o fotocamera e avatar area personale stabile - 20260517 */
.photo-source-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.photo-source-button {
    appearance: none;
    border: 1px solid rgba(8, 114, 51, 0.22);
    background: #ffffff;
    color: var(--success, #087233);
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(6, 95, 42, 0.06);
}

.photo-source-button:hover,
.photo-source-button:focus {
    background: #eaf7ef;
    outline: 2px solid rgba(8, 114, 51, 0.16);
    outline-offset: 2px;
}

.photo-source-button-camera {
    background: var(--success, #087233);
    color: #ffffff;
    border-color: var(--success, #087233);
}

.photo-source-button-camera:hover,
.photo-source-button-camera:focus {
    background: var(--success-dark, #065f2a);
}

body.tic-page-area .tic-account-avatar {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    flex: 0 0 54px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    border-radius: 50% !important;
    padding: 0 !important;
    line-height: 1 !important;
    position: relative !important;
}

body.tic-page-area .tic-account-avatar > img {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 50% !important;
    transform: none !important;
    position: static !important;
    inset: auto !important;
    margin: 0 !important;
}

@media (max-width: 760px) {
    .photo-source-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .photo-source-button {
        width: 100%;
        min-height: 42px;
    }

    body.tic-page-area .tic-account-avatar {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        max-width: 46px !important;
        min-height: 46px !important;
        max-height: 46px !important;
        flex-basis: 46px !important;
    }
}


/* Fix upload foto - 20260517: niente terzo pulsante nativo, due azioni chiare */
.photo-editor [data-photo-input],
.photo-editor-controls input[type="file"][data-photo-input] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    max-width: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.photo-source-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
    max-width: 430px;
}

.photo-source-button {
    min-height: 44px;
    border-radius: 999px;
    font-size: 0.95rem;
}

@media (max-width: 760px) {
    .photo-source-actions {
        grid-template-columns: 1fr 1fr !important;
        max-width: none;
    }

    .photo-source-button {
        min-height: 46px;
        font-size: 1rem;
        padding: 10px 12px;
    }
}


/* Fix definitivo upload foto - 20260517
   Mostra solo i due pulsanti personalizzati e usa l'input file reale nascosto. */
.photo-native-input,
.photo-editor input[type="file"][data-photo-input] {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.photo-source-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.photo-source-button {
    appearance: none;
    border: 1px solid rgba(8, 114, 51, 0.28);
    background: #eaf7ef;
    color: #065f2a;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1.1;
}

.photo-source-button:hover,
.photo-source-button:focus {
    background: #dff3e6;
    outline: 3px solid rgba(8, 114, 51, 0.16);
    outline-offset: 2px;
}

.photo-source-button-camera {
    background: #087233;
    color: #ffffff;
    border-color: #087233;
}

.photo-source-button-camera:hover,
.photo-source-button-camera:focus {
    background: #065f2a;
}

@media (max-width: 720px) {
    .photo-source-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }

    .photo-source-button {
        width: 100%;
        text-align: center;
        min-height: 44px;
    }
}


/* Fix PWA iOS install help - 20260518 */
.pwa-install-box {
    position: fixed;
    left: max(16px, env(safe-area-inset-left));
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(8, 114, 51, .20);
    border-radius: 22px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 45px rgba(6, 95, 42, .18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.pwa-install-box > div {
    flex: 1 1 auto;
    min-width: 0;
}

.pwa-install-box strong {
    display: block;
    color: #065f2a;
    font-size: 1rem;
    line-height: 1.2;
}

.pwa-install-box span {
    display: block;
    margin-top: 2px;
    color: #52625a;
    font-size: .88rem;
    line-height: 1.35;
}

.pwa-install-box button:not(.pwa-install-close) {
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: #087233;
    color: #fff;
    font-weight: 800;
    padding: 10px 16px;
    cursor: pointer;
}

.pwa-install-box .pwa-install-close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(8, 114, 51, .20);
    background: #f3f7f4;
    color: #065f2a;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.pwa-ios-install-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 18px;
    background: rgba(13, 31, 22, .42);
}

.pwa-ios-install-panel {
    width: min(520px, 100%);
    border-radius: 28px;
    border: 1px solid rgba(8, 114, 51, .18);
    background: #ffffff;
    color: #17221b;
    box-shadow: 0 24px 70px rgba(6, 95, 42, .25);
    overflow: hidden;
}

.pwa-ios-install-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 10px;
}

.pwa-ios-install-head h2 {
    margin: 0;
    color: #065f2a;
    font-size: 1.18rem;
    line-height: 1.25;
}

.pwa-ios-install-close {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(8, 114, 51, .18);
    border-radius: 50%;
    background: #f3f7f4;
    color: #065f2a;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
}

.pwa-ios-install-body {
    padding: 0 20px 20px;
}

.pwa-ios-install-body p {
    margin: 0 0 14px;
    color: #52625a;
    line-height: 1.45;
}

.pwa-ios-steps {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pwa-ios-steps li {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border-radius: 18px;
    background: #f3f7f4;
    border: 1px solid rgba(8, 114, 51, .12);
}

.pwa-ios-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #087233;
    color: #fff;
    font-weight: 800;
}

.pwa-ios-step-text strong {
    color: #065f2a;
}

.pwa-ios-note {
    margin-top: 14px !important;
    padding: 12px;
    border-radius: 18px;
    background: #fffaf0;
    border: 1px solid #f0d9a5;
    color: #5b4b23 !important;
    font-size: .92rem;
}

@media (min-width: 821px) {
    .pwa-install-box {
        left: auto;
        width: min(440px, calc(100vw - 32px));
    }
}

@media (max-width: 520px) {
    .pwa-install-box {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .pwa-install-box button:not(.pwa-install-close) {
        width: calc(100% - 46px);
    }

    .pwa-ios-install-modal {
        padding: 12px;
    }

    .pwa-ios-install-panel {
        border-radius: 24px;
    }
}

/* Fix PWA iOS install robust - 20260518 */
.pwa-install-box {
    cursor: default;
}

.pwa-install-content {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.pwa-install-content strong,
.pwa-install-content span {
    pointer-events: none;
}

.pwa-install-main {
    flex: 0 0 auto;
}

.pwa-install-box .pwa-install-content + .pwa-install-main {
    border: 0;
    border-radius: 999px;
    background: #087233;
    color: #fff;
    font-weight: 800;
    padding: 10px 16px;
    cursor: pointer;
}

.pwa-ios-install-modal {
    touch-action: manipulation;
}

.pwa-ios-install-panel {
    max-height: min(86vh, 680px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 520px) {
    .pwa-install-box .pwa-install-content {
        flex: 1 1 calc(100% - 46px);
    }

    .pwa-install-box .pwa-install-main {
        width: calc(100% - 46px);
    }
}


/* Fix Apple install box generico e compatto - 20260518 */
.pwa-install-box {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto 34px;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 12px 12px 14px !important;
    border-radius: 18px !important;
    max-width: 520px;
    margin: 0 auto;
}

.pwa-install-box .pwa-install-content {
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    text-align: left !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.pwa-install-box .pwa-install-content strong {
    display: block !important;
    color: #065f2a !important;
    font-size: .98rem !important;
    line-height: 1.18 !important;
    font-weight: 900 !important;
}

.pwa-install-box .pwa-install-content span {
    display: block !important;
    margin-top: 3px !important;
    color: #52625a !important;
    font-size: .82rem !important;
    line-height: 1.25 !important;
    font-weight: 500 !important;
}

.pwa-install-box .pwa-install-main {
    min-height: 38px !important;
    padding: 9px 15px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #087233 !important;
    color: #fff !important;
    font-size: .9rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

.pwa-install-box .pwa-install-close {
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

@media (max-width: 520px) {
    .pwa-install-box {
        left: max(14px, env(safe-area-inset-left)) !important;
        right: max(14px, env(safe-area-inset-right)) !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        grid-template-columns: minmax(0, 1fr) 34px !important;
        gap: 9px !important;
        padding: 12px !important;
    }

    .pwa-install-box .pwa-install-main {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }
}

/* Fix globale avatar tondi ovunque - 20260519
   Forza tutte le immagini usate come avatar a restare circolari, anche quando
   il markup contiene span > img o quando una regola mobile eredita dimensioni diverse. */
.user-avatar,
.user-avatar-has-image,
.user-avatar-initial,
.tic-avatar,
.tic-avatar-small,
.tic-account-avatar,
.tic-home-user-avatar,
.nav-user-avatar,
.social-avatar,
.social-avatar-small,
.tic-list-avatar,
.public-post-avatar,
.public-detail-hero .social-avatar-img-large,
.social-profile-box .social-page-avatar {
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    object-fit: cover !important;
    object-position: center center !important;
    flex: 0 0 auto !important;
    box-sizing: border-box !important;
}

.user-avatar-has-image > img,
.tic-avatar > img,
.tic-avatar-small > img,
.tic-account-avatar > img,
.tic-home-user-avatar > img,
.nav-user-avatar > img,
.social-avatar > img,
.social-avatar-small > img,
.tic-list-avatar > img,
.public-post-avatar > img,
.public-detail-hero .social-avatar-img-large > img,
.social-profile-box .social-page-avatar > img,
img.user-avatar,
img.user-avatar-has-image,
img.tic-avatar,
img.tic-avatar-small,
img.tic-account-avatar,
img.tic-home-user-avatar,
img.nav-user-avatar,
img.social-avatar,
img.social-avatar-small,
img.tic-list-avatar,
img.public-post-avatar,
img.social-avatar-img-large,
img.social-page-avatar {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Dimensioni standard, così le foto non diventano rettangolari nei diversi blocchi. */
.tic-account-avatar,
.tic-account-avatar > img,
.area-avatar-img {
    width: 54px !important;
    height: 54px !important;
}

.nav-user-avatar,
.nav-user-avatar > img {
    width: 44px !important;
    height: 44px !important;
}

.tic-avatar,
.tic-avatar > img,
.tic-list-avatar,
.tic-list-avatar > img,
.public-post-avatar,
.public-post-avatar > img {
    width: 58px !important;
    height: 58px !important;
}

.tic-avatar-small,
.tic-avatar-small > img,
.social-avatar-small,
.social-avatar-small > img {
    width: 46px !important;
    height: 46px !important;
}

.tic-home-user-avatar,
.tic-home-user-avatar > img,
.social-avatar,
.social-avatar > img {
    width: 64px !important;
    height: 64px !important;
}

.social-page-avatar,
.social-page-avatar > img,
.social-avatar-img-large,
.social-avatar-img-large > img {
    width: 72px !important;
    height: 72px !important;
}

@media (max-width: 760px) {
    .tic-account-avatar,
    .tic-account-avatar > img,
    .area-avatar-img,
    .nav-user-avatar,
    .nav-user-avatar > img,
    .tic-avatar,
    .tic-avatar > img,
    .tic-list-avatar,
    .tic-list-avatar > img,
    .public-post-avatar,
    .public-post-avatar > img,
    .social-avatar,
    .social-avatar > img,
    .social-page-avatar,
    .social-page-avatar > img,
    .social-avatar-img-large,
    .social-avatar-img-large > img {
        width: 48px !important;
        height: 48px !important;
    }

    .tic-avatar-small,
    .tic-avatar-small > img,
    .social-avatar-small,
    .social-avatar-small > img {
        width: 42px !important;
        height: 42px !important;
    }
}

/* Piccolo respiro tra avatar e testo nelle card profilo - 20260519 */
.public-post-card,
.tic-preview-card.public-post-card {
    column-gap: 20px !important;
}

.public-post-card .public-post-avatar,
.tic-preview-card .public-post-avatar {
    margin-right: 2px !important;
}

@media (max-width: 640px) {
    .public-post-card,
    .tic-preview-card.public-post-card {
        column-gap: 18px !important;
    }
}

/* Fix avatar tondi nelle card profilo - 20260519
   Dopo l'aggiunta dello spazio, alcune immagini con classe public-post-avatar
   potevano ereditare proporzioni rettangolari. Qui fissiamo dimensione e crop. */
.public-post-card img.public-post-avatar,
.tic-preview-card img.public-post-avatar,
.public-post-card .public-post-avatar > img,
.tic-preview-card .public-post-avatar > img {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center center !important;
    overflow: hidden !important;
    display: block !important;
    flex: 0 0 64px !important;
}

.public-post-card .public-post-avatar,
.tic-preview-card .public-post-avatar {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    flex: 0 0 64px !important;
}

.public-post-card,
.tic-preview-card.public-post-card {
    gap: 22px !important;
    column-gap: 22px !important;
}

@media (max-width: 640px) {
    .public-post-card img.public-post-avatar,
    .tic-preview-card img.public-post-avatar,
    .public-post-card .public-post-avatar > img,
    .tic-preview-card .public-post-avatar > img,
    .public-post-card .public-post-avatar,
    .tic-preview-card .public-post-avatar {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        min-height: 52px !important;
        max-width: 52px !important;
        max-height: 52px !important;
        flex-basis: 52px !important;
    }

    .public-post-card,
    .tic-preview-card.public-post-card {
        gap: 20px !important;
        column-gap: 20px !important;
    }
}

/* Fix area personale avatar - 20260519
   Impedisce che la foto profilo diventi grande/rettangolare nella card centrale
   e impedisce al testo della competenza di andare in verticale. */
body.tic-page-area .tic-user-card,
body.tic-page-area .tic-composer.tic-area-hero {
    display: grid !important;
    grid-template-columns: 54px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 16px !important;
    overflow: hidden !important;
}

body.tic-page-area .tic-user-card .tic-account-avatar,
body.tic-page-area .tic-composer.tic-area-hero .tic-account-avatar,
body.tic-page-area .tic-user-card img.tic-account-avatar,
body.tic-page-area .tic-composer.tic-area-hero img.tic-account-avatar,
body.tic-page-area .tic-user-card .area-avatar-img,
body.tic-page-area .tic-composer.tic-area-hero .area-avatar-img {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center center !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 54px !important;
    grid-column: 1 !important;
    box-sizing: border-box !important;
}

body.tic-page-area .tic-user-card .tic-account-avatar > img,
body.tic-page-area .tic-composer.tic-area-hero .tic-account-avatar > img,
body.tic-page-area .tic-user-card .area-avatar-img > img,
body.tic-page-area .tic-composer.tic-area-hero .area-avatar-img > img {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    margin: 0 !important;
    transform: none !important;
}

body.tic-page-area .tic-user-text,
body.tic-page-area .tic-area-title,
body.tic-page-area .tic-composer-content,
body.tic-page-area .tic-list-body {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    white-space: normal !important;
}

body.tic-page-area .tic-list-item {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    gap: 18px !important;
    align-items: center !important;
}

@media (max-width: 760px) {
    body.tic-page-area .tic-user-card,
    body.tic-page-area .tic-composer.tic-area-hero {
        grid-template-columns: 46px minmax(0, 1fr) !important;
        gap: 14px !important;
    }

    body.tic-page-area .tic-user-card .tic-account-avatar,
    body.tic-page-area .tic-composer.tic-area-hero .tic-account-avatar,
    body.tic-page-area .tic-user-card img.tic-account-avatar,
    body.tic-page-area .tic-composer.tic-area-hero img.tic-account-avatar,
    body.tic-page-area .tic-user-card .area-avatar-img,
    body.tic-page-area .tic-composer.tic-area-hero .area-avatar-img {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        max-width: 46px !important;
        min-height: 46px !important;
        max-height: 46px !important;
        flex-basis: 46px !important;
    }

    body.tic-page-area .tic-list-item {
        grid-template-columns: 28px minmax(0, 1fr) !important;
        gap: 14px !important;
    }

    body.tic-page-area .tic-item-actions {
        grid-column: 1 / -1 !important;
    }
}

/* Fix definitivo dashboard avatar - 20260519
   Nelle liste della dashboard le foto profilo devono restare sempre tonde,
   piccole e non devono mai comprimere il testo in verticale. */
.tic-dashboard .tic-list-item {
    display: grid !important;
    grid-template-columns: 64px minmax(0, 1fr) auto !important;
    column-gap: 22px !important;
    row-gap: 10px !important;
    align-items: center !important;
    overflow: hidden !important;
}

.tic-dashboard .tic-list-item > img,
.tic-dashboard .tic-list-item img.tic-list-avatar,
.tic-dashboard .tic-list-avatar {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    min-height: 58px !important;
    max-width: 58px !important;
    max-height: 58px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    flex: 0 0 58px !important;
    align-self: start !important;
    justify-self: center !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
}

.tic-dashboard .tic-list-body {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    white-space: normal !important;
}

.tic-dashboard .tic-list-body h3,
.tic-dashboard .tic-list-body p,
.tic-dashboard .tic-list-body strong {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
}

.tic-dashboard .tic-item-actions {
    min-width: max-content !important;
}

@media (max-width: 760px) {
    .tic-dashboard .tic-list-item {
        grid-template-columns: 58px minmax(0, 1fr) !important;
        column-gap: 18px !important;
        align-items: start !important;
    }

    .tic-dashboard .tic-list-item > img,
    .tic-dashboard .tic-list-item img.tic-list-avatar,
    .tic-dashboard .tic-list-avatar {
        width: 54px !important;
        height: 54px !important;
        min-width: 54px !important;
        min-height: 54px !important;
        max-width: 54px !important;
        max-height: 54px !important;
        flex-basis: 54px !important;
    }

    .tic-dashboard .tic-item-actions {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        min-width: 0 !important;
        justify-content: stretch !important;
    }
}
