﻿/* ============================================================
   REMARK — Real Estate Intelligence
   Porting HTML + CSS puro della palette/estetica originale
   (Tailwind brand.* in tailwind.config.js -> variabili CSS)

   Sistema a design-token: ogni colore "tematizzabile" passa da
   variabile CSS. Il tema chiaro (ispirato al sito di annunci di
   riferimento: bianco, bordi grigio chiaro, blu primario) sovrascrive
   lo stesso set di variabili sotto :root[data-theme="light"].
   ============================================================ */

:root {
    /* Brand */
    --brand-black: #030303;
    --brand-obsidian: #070A11;
    --brand-dark: #0A0A0A;
    --brand-muted: #8E8E93;
    --brand-pure: #FFFFFF;
    --brand-accent: #5D5CFF;
    --brand-emerald: #0AAB76;
    --brand-platinum: #F4F5F7;
    /* Pagina / sfondo globale */
    --page-bg: #030303;
    --page-bg-with-opacity: rgba(3, 3, 3, .45);
    --grid-line: rgba(255,255,255,0.015);
    --glow-color: rgba(93,92,255,0.15);
    /* Superfici (card, pannelli, elementi annidati) */
    --surface-1: rgba(10,10,10,0.5); /* card / panel */
    --surface-2: rgba(3,3,3,0.5); /* elemento annidato (checkbox, tab-row, pill) */
    --surface-3: rgba(3,3,3,0.75); /* input di form */
    --surface-hover: rgba(255,255,255,0.08);
    --surface-modal: rgba(7,10,17,0.9);
    --overlay: rgba(0,0,0,0.8);
    /* Bordi */
    --border-soft: rgba(255,255,255,0.06);
    --border-softer: rgba(255,255,255,0.04);
    --border-strong: rgba(255,255,255,0.12);
    /* Testo */
    --text-1: var(--brand-platinum); /* alta enfasi / headings */
    --text-2: #d4d4d8; /* corpo testo su card scure */
    --text-3: #a1a1aa; /* secondario */
    --text-4: #71717a; /* label / muted */
    --text-5: #52525b; /* debole / disabilitato */
    /* Ombre */
    --shadow-panel: 0 50px 100px -20px rgba(0,0,0,0.8);
    --shadow-card: 0 25px 50px -12px rgba(0,0,0,0.6);
    --shadow-pill: 0 10px 30px rgba(0,0,0,0.4);
    --shadow-section: 0 -32px 64px rgba(0,0,0,0.98);
    /* Stato / semantica (perlopiù costanti tra i due temi) */
    --danger-text: #fca5a5;
    --danger-strong: #f87171;
    --danger-bg: rgba(220,38,38,0.1);
    --danger-border: rgba(220,38,38,0.3);
    --accent-tint-border: rgba(93,92,255,0.2);
    /* Pulsante primario (bianco su scuro / blu su chiaro) */
    --btn-strong-bg: var(--brand-pure);
    --btn-strong-text: #030303;
    --btn-strong-hover: var(--brand-platinum);
    /* Gradienti decorativi */
    --wordmark-grad: linear-gradient(180deg, #fff 30%, #a1a1aa 100%);
    --price-grad: linear-gradient(135deg, #fff 40%, #0e9f6e 100%);
    --hero-overlay-grad: linear-gradient(to bottom, rgba(3,3,3,0.2), rgba(7,10,17,0.8) 60%, #030303);
    --benefits-overlay-grad: linear-gradient(to bottom, #030303, rgba(3,3,3,0.35) 40%, #030303);
    --workspace-overlay-grad: linear-gradient(to bottom, rgba(3,3,3,0.95), rgba(3,3,3,0.75), rgba(3,3,3,0.95));
    --loading-overlay-grad: linear-gradient(to top, #030303, rgba(3,3,3,0.95) 60%, rgba(3,3,3,0.5));
    --partnership-overlay-grad: linear-gradient(to top, #030303, rgba(3,3,3,0.5) 60%, transparent), linear-gradient(to right, rgba(3,3,3,0.9), transparent, rgba(3,3,3,0.9));
    --mood-photo-opacity-hero: 0.7;
    --mood-photo-opacity-section: 0.4;
    --mood-photo-opacity-loading: 0.55;
    --mood-photo-opacity-partnership: 0.2;
}

:root[data-theme="light"] {
    --brand-pure: #101828;
    --brand-platinum: #101828;
    --brand-muted: #000000;
/*    --brand-muted: #667085;
*/    --brand-accent: #1d4ed8;
    --page-bg: #eef1f6;
     --page-bg-with-opacity: rgba(238, 241, 246, .45);
   --grid-line: rgba(16,24,40,0.035);
    --glow-color: rgba(29,78,216,0.05);
    --surface-1: #ffffff;
    --surface-2: #eef1f6;
    --surface-3: #ffffff;
    --surface-hover: rgba(16,24,40,0.05);
    --surface-modal: #ffffff;
    --overlay: rgba(16,24,40,0.4);
    --border-soft: rgba(16,24,40,0.10);
    --border-softer: rgba(16,24,40,0.06);
    --border-strong: rgba(16,24,40,0.16);
    --text-1: var(--brand-platinum); /* alta enfasi / headings */
/*    --text-2: #344054;
    --text-3: #667085;
    --text-4: #98a2b3;
    --text-5: #b0b7c3;*/
    --text-2: #000000;
    --text-3: #000000;
    --text-4: #000000;
    --text-5: #000000;
    --shadow-panel: 0 24px 60px -12px rgba(16,24,40,0.12);
    --shadow-card: 0 12px 32px -8px rgba(16,24,40,0.10);
    --shadow-pill: 0 6px 16px rgba(16,24,40,0.12);
    --shadow-section: 0 -10px 30px rgba(16,24,40,0.06);
    --danger-text: #b91c1c;
    --danger-strong: #dc2626;
    --danger-bg: rgba(220,38,38,0.08);
    --danger-border: rgba(220,38,38,0.3);
    --accent-tint-border: rgba(29,78,216,0.25);
    --btn-strong-bg: #1d4ed8;
    --btn-strong-text: #ffffff;
    --btn-strong-hover: #1743b0;
    --wordmark-grad: linear-gradient(180deg, #101828 30%, #475467 100%);
    --price-grad: linear-gradient(135deg, #101828 40%, #0e9f6e 100%);
    --hero-overlay-grad: linear-gradient(to bottom, rgba(238,241,246,0.4), rgba(238,241,246,0.85) 60%, #eef1f6);
    --benefits-overlay-grad: linear-gradient(to bottom, #eef1f6, rgba(238,241,246,0.5) 40%, #eef1f6);
    --workspace-overlay-grad: linear-gradient(to bottom, rgba(238,241,246,0.97), rgba(238,241,246,0.9), rgba(238,241,246,0.97));
    --loading-overlay-grad: linear-gradient(to top, #eef1f6, rgba(238,241,246,0.95) 60%, rgba(238,241,246,0.5));
    --partnership-overlay-grad: linear-gradient(to top, #eef1f6, rgba(238,241,246,0.6) 60%, transparent), linear-gradient(to right, rgba(238,241,246,0.9), transparent, rgba(238,241,246,0.9));
    --mood-photo-opacity-section: 0;
    --mood-photo-opacity-loading: 0;
    --mood-photo-opacity-partnership: 0;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--page-bg);
    color: var(--brand-pure);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
}

html, body, h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    min-height: 100vh;
    position: relative;
}

html.loaded body #view-landing-container {
    opacity: 1;
    transition: opacity 500ms ease-in;
}

.radial-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1100px;
    height: 500px;
    background: radial-gradient(circle at 50% 50%, var(--glow-color), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

:root[data-theme="light"] .radial-glow {
    display: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input, select {
    font-family: inherit;
}

::placeholder {
    color: var(--text-4);
    opacity: 1;
}

#view-loading.hidden {
    opacity: 0;
    transition: opacity ease-out .5s;
    pointer-events: none;
    display:block !important;
}

.hidden {
    display: none !important;
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    background: var(--surface-1);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-pill);
    backdrop-filter: blur(8px);
}

    .theme-toggle:hover {
        color: var(--brand-pure);
    }

    .theme-toggle .icon {
        font-size: 13px;
        line-height: 1;
    }

/* ---------- Topbar ---------- */
.topbar {
    width: 100%;
    max-width: 1180px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-soft);
    position: relative;
    z-index: 50;
    background: var(--surface-2);
    backdrop-filter: blur(8px);
}

.topbar .brand {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brand-muted);
}

.topbar .brand span {
    color: var(--brand-platinum);
    font-weight: 900;
    letter-spacing: 0.12em;
}

.topbar nav a {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-muted);
    margin-left: 24px;
}

.topbar nav a:hover {
    color: var(--brand-pure);
}

/* ---------- Layout ---------- */
main#app {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 16px 80px;
    position: relative;
    z-index: 10;
}

.view {
    width: 100%;
}

/* ---------- Hero / Form ---------- */
.hero-heading {
    max-width: 720px;
    margin: 48px auto 24px;
    text-align: center;
}

.hero-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--brand-emerald);
    background: rgba(10,171,118,0.1);
    border: 1px solid rgba(10,171,118,0.2);
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.hero-heading h1 {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 900;
    color: var(--brand-platinum);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 16px;
}

.hero-heading p {
    font-size: 15px;
    color: var(--text-3);
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
}

.panel {
    background: var(--surface-1);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-panel);
    position: relative;
    overflow: hidden;
}

form#valuation-form {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    text-align: left;
}

#mappa-immobile {
    height:300px;
    width:100%;
}

#mappa-immobile-modal {
    opacity: 0;
    transition: opacity, ease, 300ms;
}

#mappa-immobile-modal.shown {
    opacity:1;
}

@media (min-width: 768px) {
    form #valuation-form {
        padding: 40px;
    }
}

.form-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--brand-emerald);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {

    .form-grid.cols-4 {
        grid-template-columns: 2fr 2fr 2fr;
    }

    .form-grid.cols-3 {
        grid-template-columns: 2fr 1fr;
    }

    .form-grid.cols-sm-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-grid.cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    .form-grid.cols-sm-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-left: 4px;
    margin-bottom: 0;
}

.field input[type="text"],
.field input[type="number"],
.field select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--surface-3);
    border: 1px solid var(--border-soft);
    color: var(--brand-platinum);
    font-weight: 600;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.field input:focus, .field select:focus {
    border-color: rgba(10,171,118,0.6);
}

.field select {
    cursor: pointer;
}

.form-divider {
    width: 100%;
    height: 1px;
    background: var(--border-soft);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-softer);
    cursor: pointer;
    user-select: none;
}

.checkbox-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-emerald);
}

.checkbox-row span {
    font-size: 12px;
    color: var(--text-2);
    font-weight: 500;
}

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

.toggle-btn {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-softer);
    background: var(--surface-2);
    color: var(--text-3) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    transition: all 0.2s;
    text-transform: none !important;
    letter-spacing: initial !important;
    justify-content: center;
}

.toggle-btn:hover {
    border-color: var(--border-strong);
}

.toggle-btn.active,
.toggle-element input[type="checkbox"]:checked + label{
    background: rgba(10,171,118,0.1);
    border-color: var(--brand-emerald);
    color: var(--brand-platinum);
    box-shadow: 0 8px 24px rgba(10,171,118,0.05);
}

.form-submit-row {
    display: flex;
    justify-content: space-evenly;
    padding-top: 24px;
    border-top: 1px solid var(--border-soft);
}

.btn-primary {
    padding: 16px 48px;
    border-radius: 12px;
    background: var(--btn-strong-bg);
    color: var(--btn-strong-text);
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: none;
    box-shadow: var(--shadow-pill);
    transition: transform 0.15s, background-color 0.15s;
}

/*.btn-primary:hover {
    background: var(--btn-strong-hover);
    color: var(--brand-accent);
}*/

.btn-primary:active {
    transform: scale(0.98);
}

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

.btn-secondary {
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--border-softer);
    border: 1px solid var(--border-soft);
    color: var(--brand-pure)!important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

.btn-white {
    padding: 12px 20px;
    border-radius: 12px;
    background: var(--btn-strong-bg);
    color: var(--btn-strong-text);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    transition: background-color 0.15s;
}

    .btn-white:hover {
        background: var(--btn-strong-hover);
    }

/* ---------- Loading view ---------- */
#view-loading {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: var(--page-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px;
}

.loading-topline {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 16px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-3);
}

.loading-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
}

.loading-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--brand-platinum);
    background: rgba(10,171,118,0.1);
    border: 1px solid rgba(10,171,118,0.2);
    padding: 6px 16px;
    border-radius: 999px;
}

.loading-phrase {
    font-size: clamp(20px, 4vw, 34px);
    font-weight: 700;
    color: var(--brand-platinum);
    max-width: 720px;
    line-height: 1.3;
    transition: opacity 0.4s, transform 0.4s, filter 0.4s;
}

.loading-steps {
    display: flex;
    justify-content: center;
    gap: 24px;
    border-top: 1px solid var(--border-soft);
    padding-top: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-5);
}

    .loading-steps span.active {
        color: var(--brand-pure);
    }

    .loading-steps span.done {
        color: var(--brand-emerald);
    }

/* ---------- Results ---------- */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-soft);
    padding: 32px 0 16px;
    flex-wrap: wrap;
    gap: 12px;
}

    .results-header h2 {
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.15em;
        color: var(--brand-emerald);
        margin: 0 0 4px;
    }

    .results-header p {
        margin: 0;
        font-size: 15px;
        font-weight: 600;
    }

        .results-header p span {
            text-decoration: underline;
            text-decoration-color: rgba(10,171,118,0.4);
            text-underline-offset: 4px;
        }

.dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 24px;
}

@media (min-width: 768px) {
    .dash-grid.cols-3 {
        grid-template-columns: 1fr 2fr;
    }
}

@media (min-width: 768px) {
    .dash-grid.cols-3-even {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .dash-grid.cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

#min-max {
    margin-top:16px;
}

.card {
    background: var(--surface-1);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-card);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.spatial-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

    .spatial-card .tag {
        font-size: 9px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--brand-emerald);
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 4px;
    }

    .spatial-card h4 {
        font-size: 12px;
        font-weight: 700;
        color: var(--brand-platinum);
        text-transform: uppercase;
        margin: 0 0 6px;
    }

    .spatial-card p {
        font-size: 11px;
        color: var(--text-3);
        line-height: 1.6;
        margin: 0;
    }

.spatial-stats {
    border-top: 1px solid var(--border-softer);
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
}

    .spatial-stats .row {
        display: flex;
        justify-content: space-between;
        gap: 8px;
    }

        .spatial-stats .row span:first-child {
            color: var(--text-4);
        }

        .spatial-stats .row span:last-child {
            color: var(--text-2);
            font-weight: 700;
            font-family: ui-monospace, monospace;
        }

        .spatial-stats .row span.accent {
            color: var(--brand-emerald);
        }

.twin-card {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

    .twin-card canvas {
        width: 100%;
        height: 100%;
        min-height: 320px;
        position: absolute;
        inset: 0;
        cursor: grab;
    }

        .twin-card canvas:active {
            cursor: grabbing;
        }

.twin-watermark {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    pointer-events: none;
}

    .twin-watermark .tag {
        font-size: 9px;
        font-weight: 900;
        letter-spacing: 0.1em;
        color: var(--brand-emerald);
        text-transform: uppercase;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .twin-watermark h4 {
        font-size: 11px;
        font-weight: 700;
        color: var(--brand-platinum);
        text-transform: uppercase;
        margin: 2px 0 0;
    }

.twin-footer {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.twin-pill {
    padding: 6px 10px;
    background: var(--surface-2);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 1px solid var(--border-softer);
    font-size: 9px;
    font-family: ui-monospace, monospace;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.kpi-price {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
}

@media (min-width: 768px) {
    .kpi-price {
        grid-column: span 2;
    }
}

.kpi-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-4);
    display: flex;
    align-items: center;
    gap: 4px;
}

.kpi-value {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 900;
    color: var(--brand-platinum);
    letter-spacing: -0.02em;
    margin-top: 2px;
}

.kpi-small-value {
    font-size: clamp(20px, 4vw, 24px);
}

.kpi-footer {
    border-top: 1px solid var(--border-softer);
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

    .kpi-footer span:first-child {
        color: var(--text-3);
        font-weight: 500;
    }

.kpi-pill {
    color: var(--brand-emerald);
    font-weight: 700;
    background: var(--border-softer);
    padding: 3px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    font-family: ui-monospace, monospace;
}

.kpi-secondary {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .kpi-secondary .kpi-value {
        font-size: 28px;
    }

    .kpi-secondary p {
        font-size: 11px;
        color: var(--text-3);
        line-height: 1.6;
        border-top: 1px solid var(--border-softer);
        padding-top: 12px;
        margin: 12px 0 0;
    }

.kpi-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
}

.kpi-mini .kpi-value {
    font-size: 18px;
    margin-top: 2px;
}

.kpi-value-giant {
    font-size: 65px!important;
}

.text-center .divisor {
    font-size: 28px;
}

/* ---------- Chart card ---------- */
.chart-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 440px;
}

@media (min-width: 768px) {
    .chart-card {
        flex-direction: row;
    }
}

.chart-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.chart-head {
    border-bottom: 1px solid var(--border-softer);
    padding-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .chart-head h4 {
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-3);
        margin: 0;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .chart-head p {
        font-size: 11px;
        color: var(--text-3);
        line-height: 1.5;
        margin: 0;
    }

.tab-row {
    display: flex;
    padding: 4px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    gap: 4px;
    overflow-x: auto;
}

.tab-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    color: var(--text-4);
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .tab-btn:hover {
        color: var(--text-2);
    }

    .tab-btn.active {
        background: var(--surface-hover);
        color: var(--brand-platinum);
    }

.chart-svg-wrap {
    background: var(--surface-2);
    border-radius: 12px;
    padding: 8px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

    .chart-svg-wrap svg {
        width: 100%;
        height: 224px;
        overflow: visible;
        display: block;
    }

.chart-footer-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    font-weight: 900;
    color: var(--text-4);
    font-family: ui-monospace, monospace;
    border-top: 1px solid var(--border-softer);
    padding-top: 8px;
    margin-top: 4px;
}

.chart-side {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 1px solid var(--border-softer);
    padding-top: 24px;
}

@media (min-width: 768px) {

    .chart-side {
        width: 256px;
    }

    .chart-side-inner {
        width: 100%;
        border-top: none;
        border-left: 1px solid var(--border-softer);
        padding-top: 0;
        padding-left: 24px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height:100%;
    }
}

.chart-side h4 {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-4);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
}

.chart-side .big,
.chart-side .bigger {
    font-weight: 700;
    color: var(--brand-platinum);
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-side .big {
    font-size: 22px;
}

.chart-side .bigger {
    font-size: 38px;
}

.chart-side p.desc {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.6;
    margin: 6px 0 0;
}

.chart-side .bar-track {
    width: 100%;
    height: 4px;
    background: var(--border-softer);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 16px;
}

.chart-side .bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--brand-accent);
    transition: width 0.6s;
}

/* ---------- CTA ---------- */
.cta-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    border: 1px solid var(--accent-tint-border);
    position: relative;
}

@media (min-width: 1024px) {
    .cta-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cta-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--brand-emerald);
}

.cta-card.cta-card-info::before {
    background: var(--brand-accent);
}

.cta-card .badge {
    display: inline-flex;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-emerald);
    background: rgba(10,171,118,0.1);
    border: 1px solid rgba(10,171,118,0.2);
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.cta-card h3 {
    font-size: 17px;
    font-weight: 900;
    color: var(--brand-platinum);
    margin: 0 0 6px;
}

.cta-card p {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.6;
    margin: 0;
    max-width: 640px;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .cta-actions {
        flex-direction: row;
        width: auto;
    }
}

/* ---------- Modal ---------- */
#auth-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

    #auth-modal .backdrop {
        position: absolute;
        inset: 0;
        background: var(--overlay);
        backdrop-filter: blur(8px);
    }

    #auth-modal .modal-box {
        width: 100%;
        max-width: 420px;
        padding: 32px;
        border-radius: 16px;
        background: var(--surface-modal);
        border: 1px solid var(--border-soft);
        position: relative;
        z-index: 10;
        text-align: center;
        backdrop-filter: blur(24px);
        box-shadow: var(--shadow-panel);
    }

    #auth-modal .modal-close {
        position: absolute;
        top: 16px;
        right: 16px;
        background: none;
        border: none;
        color: var(--text-4);
        font-size: 16px;
    }

.modal-lock {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    margin: 0 auto 8px;
    background: rgba(10,171,118,0.1);
    border: 1px solid rgba(10,171,118,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-emerald);
}

#auth-modal h3 {
    font-size: 20px;
    font-weight: 900;
    color: var(--brand-platinum);
    margin: 0 0 8px;
}

#auth-modal p.desc {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto 20px;
}

#auth-modal form {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#auth-modal label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-4);
}

#auth-modal input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    color: var(--brand-platinum);
    font-size: 14px;
}

#auth-modal button[type="submit"] {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    background: var(--btn-strong-bg);
    color: var(--btn-strong-text);
    font-weight: 900;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none;
}

/* ---------- Misc ---------- */
.error-banner {
    margin: 16px 0;
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger-text);
    font-size: 13px;
    font-weight: 600;
}

.danger-text {
    color: var(--danger-text);
}

::selection {
    background: rgba(10,171,118,0.3);
}

/* ============================================================
   LANDING — Hero Istituzionale + Seller Benefits + Footer
   ============================================================ */

#view-landing {
    position: relative;
    z-index: 1;
}

#view-landing-container {
    opacity: 0;
}

@keyframes subtleZoom {
    0% {
        transform: scale(1.02);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1.02);
    }
}

.hero-inst {
    position: relative;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 96px 24px 80px;
    text-align: center;
    overflow: hidden;
    z-index:100;
}

#view-landing .bg-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#view-landing .bg-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#view-landing .bg-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--hero-overlay-grad);
}

.hero-inst .content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.wordmark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.wordmark .word {
    font-size: clamp(40px, 8vw, 56px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    background: var(--wordmark-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
}

.wordmark .sub {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.6em;
    color: var(--text-3);
    text-transform: uppercase;
    padding-left: 0.6em;
    padding-top: 8px;
}

.hero-inst h1 {
    font-size: clamp(32px, 6vw, 64px);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--brand-platinum);
    line-height: 1.15;
    margin: 0;
}

.hero-inst h1 .accent {
    background: linear-gradient(90deg, #98b2e1, rgb(10 134 171 / 80%), var(--brand-platinum));
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-inst p.lead {
    font-size: 18px;
    color: var(--text-2);
    font-weight: 500;
    line-height: 1.6;
    max-width: 720px;
    margin: 16px auto 0;
}

.quote-block {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 24px;
    text-align: left;
    border-left: 2px solid var(--brand-emerald);
    border-top: 1px solid var(--border-softer);
    border-right: 1px solid var(--border-softer);
    border-bottom: 1px solid var(--border-softer);
    background: var(--surface-1);
    border-radius: 0 16px 16px 0;
    backdrop-filter: blur(8px);
}

.quote-block p {
    font-style: italic;
    color: var(--brand-platinum);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.benefit-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 768px) {
    .benefit-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.benefit-card {
    padding: 32px;
    border-radius: 16px;
    text-align: left;
    border: 1px solid var(--border-soft);
    background: var(--surface-1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 288px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(8px);
    transition: transform .2s, border-color .2s;
}

.benefit-card:hover {
    transform: translateY(-5px);
}

.benefit-card.sell:hover {
    border-color: rgba(10,171,118,0.4);
}

.benefit-card.buy:hover {
    border-color: rgba(251,191,36,0.4);
}

.benefit-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 18px;
}

.benefit-card.sell .benefit-icon {
    background: rgba(10,171,118,0.1);
    color: var(--brand-emerald);
    border: 1px solid rgba(10,171,118,0.2);
}

.benefit-card.buy .benefit-icon {
    background: rgba(251,191,36,0.1);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.2);
}

.benefit-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--brand-platinum);
    margin: 0 0 8px;
}

.benefit-card p {
    font-size: 14px;
    color: var(--text-3);
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
}

.benefit-card .cta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    padding-top: 16px;
    border-top: 1px solid var(--border-softer);
}

.benefit-card.sell .cta-row {
    color: var(--brand-emerald);
}

.benefit-card.buy .cta-row {
    color: #fbbf24;
}

/* ---------- Seller Benefits ---------- */
.benefits-section {
    width: 100%;
    position: relative;
    z-index: 20;
    overflow: hidden;
    background: var(--page-bg-with-opacity);
    box-shadow: var(--shadow-section);
    border-radius: 40px 40px 0 0;
    border-top: 1px solid var(--border-soft);
}

.benefits-section .bg-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.benefits-section .bg-layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: var(--mood-photo-opacity-section);
    filter: brightness(0.4) contrast(1.15);
    transition: opacity 0.3s ease;
}

.benefits-section .bg-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--benefits-overlay-grad);
}

.benefits-inner {
    position: relative;
    z-index: 10;
    max-width: 1024px;
    margin: 0 auto;
    padding: 80px 24px;
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.benefits-head {
    text-align: center;
}

.benefits-head h2 {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 900;
    color: var(--brand-platinum);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}

.benefits-head p {
    font-size: 15px;
    color: var(--text-3);
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto;
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: stretch;
}

@media (min-width: 1024px) {
    .benefits-grid {
        grid-template-columns: 7fr 5fr;
    }
}

.freemium-card {
    padding: 32px;
    border-radius: 16px;
    border: 1px solid rgba(10,171,118,0.2);
    background: var(--surface-1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    box-shadow: var(--shadow-panel);
}

@media (min-width: 768px) {
    .freemium-card {
        padding: 40px;
    }
}

.freemium-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 6px;
    background: rgba(10,171,118,0.1);
    border: 1px solid rgba(10,171,118,0.2);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-emerald);
}

.freemium-card h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-platinum);
    line-height: 1.3;
    margin: 12px 0 0;
    text-align: left;
}

.freemium-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
    text-align: left;
}

.freemium-price .num {
    font-size: 64px;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: var(--price-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.freemium-price .cap {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-4);
}

.benefit-list {
    list-style: none;
    margin: 0;
    padding: 24px 0 0;
    border-top: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-size: 14px;
    color: var(--text-2);
    text-align: left;
}

.benefit-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.benefit-list li::before {
    content: "✓";
    color: var(--brand-emerald);
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 2px;
}

.benefit-list strong {
    color: var(--brand-platinum);
    font-weight: 700;
}

.auction-toggle {
    margin-top: 8px;
    background: none;
    border: none;
    color: var(--brand-emerald);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
}

.auction-toggle:hover {
    color: var(--brand-platinum);
}

.auction-info {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.auction-info.open {
    max-height: 220px;
}

.auction-info .box {
    margin-top: 8px;
    padding: 16px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auction-info .box strong {
    color: var(--brand-platinum);
}

.auction-info .box .accent {
    color: var(--brand-emerald);
    font-weight: 700;
}

.benefits-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
}

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

.cost-card h4, .legal-card h4 {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-4);
    margin: 0 0 16px;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-softer);
    margin-bottom: 12px;
    gap: 12px;
}

.cost-row .name {
    font-weight: 700;
    font-size: 12px;
    color: var(--text-3);
    display: block;
}

.cost-row .desc {
    font-size: 9px;
    color: var(--text-5);
    font-weight: 500;
    display: block;
}

.cost-row .price {
    font-weight: 800;
    font-size: 12px;
    color: var(--danger-strong);
    text-align: right;
    white-space: nowrap;
}

.cost-row.highlight {
    background: rgba(10,171,118,0.04);
    border-color: rgba(10,171,118,0.2);
}

.cost-row.highlight .name {
    color: var(--brand-platinum);
    font-size: 14px;
}

.cost-row.highlight .desc {
    color: rgba(10,171,118,0.7);
}

.cost-row.highlight .price {
    color: var(--brand-emerald);
    font-size: 14px;
}

.cost-footnote {
    font-size: 10px;
    font-style: italic;
    color: var(--text-4);
    line-height: 1.5;
    margin-top: 12px;
}

.legal-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
    flex: 1;
}

.legal-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(10,171,118,0.1);
    border: 1px solid rgba(10,171,118,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-emerald);
    flex-shrink: 0;
}

.legal-head h5 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-platinum);
    margin: 0;
}

.legal-head span {
    font-size: 9px;
    color: var(--text-4);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.legal-card > p {
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.6;
    border-top: 1px solid var(--border-softer);
    padding-top: 12px;
    margin: 0;
}

.legal-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    font-weight: 700;
    color: var(--text-4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--border-softer);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-softer);
    width: fit-content;
}

.partnership-banner {
    position: relative;
    width: 100%;
    min-height: 280px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: var(--surface-1);
    box-shadow: var(--shadow-panel);
}

.partnership-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: var(--mood-photo-opacity-partnership);
    filter: brightness(0.4) contrast(1.15) grayscale(1);
    transition: opacity 0.3s ease;
}

.partnership-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--partnership-overlay-grad);
}

.partnership-content {
    position: absolute;
    inset: 0;
    z-index: 10;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 6px;
}

.partnership-content .tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(10,171,118,0.9);
}

.partnership-content h4 {
    font-size: clamp(20px, 3vw, 30px);
    font-weight: 900;
    color: var(--brand-platinum);
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.02em;
}

.partnership-content p {
    font-size: 13px;
    color: var(--text-3);
    font-weight: 500;
    line-height: 1.6;
    max-width: 640px;
    margin: 4px 0 0;
}

/* ---------- Footer ---------- */
.site-footer {
    width: 100%;
    border-top: 1px solid var(--border-softer);
    background: var(--page-bg-with-opacity);
    padding: 64px 24px 32px;
    position: relative;
    z-index: 100,
}

.footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

.footer-brand {
    max-width: 340px;
    text-align: left;
}

.footer-brand .name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--brand-pure);
}

.footer-brand .name span {
    font-size: 10px;
    color: var(--brand-muted);
    font-weight: 400;
    letter-spacing: normal;
    margin-left: 6px;
}

.footer-brand p {
    font-size: 13px;
    color: var(--brand-muted);
    line-height: 1.6;
    margin-top: 8px;
}

.footer-cols {
    display: flex;
    flex-direction: column;
    gap: 32px;
    font-size: 13px;
    color: var(--brand-muted);
    text-align: left;
}

@media (min-width: 768px) {
    .footer-cols {
        flex-direction: row;
        gap: 48px;
    }
}

.footer-cols h4 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-pure);
    margin: 0 0 8px;
}

.footer-cols p {
    margin: 2px 0;
}

.footer-bottom {
    max-width: 1080px;
    margin: 48px auto 0;
    border-top: 1px solid var(--border-softer);
    padding-top: 24px;
    text-align: center;
    font-size: 11px;
    color: var(--text-4);
    opacity: 0.7;
}

/* ============================================================
   WORKSPACE — Sfondo dinamico + pulsante di ritorno
   ============================================================ */
#view-workspace {
    position: relative;
    min-height: 100vh;
}

.workspace-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.workspace-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.3s ease;
}

:root[data-theme="light"] .workspace-bg img {
    /*opacity: 0;*/
}

.workspace-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--workspace-overlay-grad);
}

#view-workspace main#app {
    position: relative;
    z-index: 10;
    padding-top: 88px;
}

#view-workspace .radial-glow {
    z-index: 1;
}

.back-home-btn {
    position: fixed;
    top: 80px;
    left: 24px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    background: var(--surface-1);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: var(--shadow-pill);
}

    .back-home-btn:hover {
        color: var(--brand-pure);
    }

/* ---------- Loading: sfondi rotanti ---------- */
.loading-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.loading-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.loading-bg-img.active {
    opacity: 1;
}

.loading-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--loading-overlay-grad);
}

#view-loading .loading-topline, #view-loading .loading-center, #view-loading .loading-steps {
    position: relative;
    z-index: 10;
}

#footer-layout.container {
    position:relative;
    z-index:2;
}
