/* ==========================================
   RESET E VARIABILI COLORI (Palette Italcase 2000)
   ========================================== */
:root {
    --bg-dark: #080d14;
    --card-bg: rgba(13, 20, 31, 0.85);
    --card-border: rgba(0, 142, 214, 0.25);
    --text-primary: #ffffff;
    --text-muted: #94a3b8;
    
    /* Colori estratti dal logo */
    --accent-blue: #008ed6;     /* Blu "Ital" */
    --accent-magenta: #d8007e;  /* Magenta "2000 / Case" */
    
    --btn-dark: rgba(255, 255, 255, 0.05);
}

/* Reset base corretto */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-dark) url('sfondo.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-primary);
    min-height: 100vh;
}

body.page-center {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

body.page-full {
    display: block;
    padding: 40px 20px;
}

/* ==========================================
   STRUTTURA SCHEDA PRINCIPALE (Card a Vetro - Pagine interne/Login)
   ========================================== */
.app-card {
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 32px 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8),
                0 0 30px rgba(0, 142, 214, 0.1);
    text-align: center;
}

.wide-card {
    max-width: 520px;
}

/* Header & Logo */
.brand-header {
    margin-bottom: 24px;
}

.avatar-box img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-blue);
    box-shadow: 0 0 25px rgba(0, 142, 214, 0.35);
    margin-bottom: 12px;
}

.brand-title {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.accent-text {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-magenta));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tagline {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.agency-bio {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 14px;
    padding: 0 8px;
}

/* Separatore con scritta al centro */
.divider-label {
    position: relative;
    margin: 20px 0;
    text-align: center;
}

.divider-label::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    z-index: 1;
}

.divider-label span {
    position: relative;
    z-index: 2;
    background: #0d141f;
    padding: 0 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

/* ==========================================
   BOTTONI A PILA (Stack Buttons)
   ========================================== */
.links-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stack-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-cyan {
    background: rgba(0, 142, 214, 0.12);
    color: var(--accent-blue);
    border-color: rgba(0, 142, 214, 0.35);
}

.btn-cyan:hover {
    background: var(--accent-blue);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 142, 214, 0.4);
}

.btn-purple {
    background: rgba(216, 0, 126, 0.12);
    color: #ff3da9;
    border-color: rgba(216, 0, 126, 0.35);
}

.btn-purple:hover {
    background: var(--accent-magenta);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(216, 0, 126, 0.4);
}

.btn-dark {
    background: var(--btn-dark);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-dark:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Footer pagine interne */
.app-footer {
    margin-top: 24px;
}

.mini-logo {
    max-width: 200px;
    opacity: 0.6;
}

/* ==========================================
   SLIDER E CARDS (Galleria)
   ========================================== */
.gallery-admin-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.slider-container {
    position: relative;
    margin: 15px 0;
}

.slider-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 10px 5px 20px 5px;
    cursor: grab;
    user-select: none;
    scrollbar-width: none;
}

.slider-track::-webkit-scrollbar { display: none; }
.slider-track.active { cursor: grabbing; }

.media-card {
    flex: 0 0 80%;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.card-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(0deg, rgba(8, 13, 20, 0.95) 0%, transparent 100%);
    text-align: left;
}

.card-caption h3 {
    font-size: 16px;
    color: #ffffff;
}

.badge-tag {
    font-size: 10px;
    color: var(--accent-magenta);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.card-delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(216, 0, 126, 0.9);
    color: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}

.card-delete-btn:hover {
    transform: scale(1.1);
    background: #ff0055;
}

/* ==========================================
   BENTO GRID HUB FULLSCREEN (Dashboard / Area Riservata)
   ========================================== */
.hub-top-bar {
    text-align: center;
    margin-bottom: 30px;
}

.bento-wrapper {
    max-width: 1000px;
    margin: 0 auto 30px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.bento-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 22px;
    padding: 24px;
    backdrop-filter: blur(16px);
    text-align: left;
}

@media (min-width: 768px) {
    .hero-box { grid-column: span 2; }
}

.status-pill {
    background: var(--accent-magenta);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
}

.hero-box h2 {
    font-size: 22px;
    margin: 12px 0 6px 0;
}

.hero-box p {
    font-size: 14px;
    color: var(--text-muted);
}

.inline-btn {
    width: auto;
    display: inline-flex;
    margin-top: 14px;
}

.box-head {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-blue);
    margin-bottom: 12px;
}

.box-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.accordion-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 8px;
    overflow: hidden;
}

.accordion-item summary {
    padding: 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.accordion-content {
    padding: 12px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.max-btn {
    max-width: 260px;
    margin: 0 auto;
}

/* ==========================================
   WIDGET DASHBOARD STORICO AGENZIA & EDITING
   ========================================== */
.property-highlight {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

@media (min-width: 600px) {
    .property-highlight {
        flex-direction: row;
        align-items: center;
    }
}

.property-gallery {
    flex: 0 0 160px;
}

.prop-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--card-border);
}

.property-info {
    flex: 1;
    text-align: left;
}

.prop-title {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.prop-details {
    font-size: 12px;
    color: var(--accent-blue);
    font-weight: 700;
    margin-bottom: 8px;
}

.prop-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.file-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.file-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 142, 214, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 142, 214, 0.3);
    border-radius: 8px;
    font-size: 12px;
    text-decoration: none;
    font-weight: 600;
}

.file-btn:hover {
    background: var(--accent-blue);
    color: #fff;
}

.btn-logout {
    max-width: 160px;
    margin: 12px auto 0 auto;
    padding: 8px 12px;
    font-size: 12px;
}

.box-head-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.btn-icon {
    background: rgba(0, 142, 214, 0.2);
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--accent-blue);
    color: #fff;
}

.edit-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 14px;
    border: 1px solid var(--card-border);
}

.quick-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.edit-panel input, .edit-panel textarea, .quick-form input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
}

.edit-panel input:focus, .quick-form input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.btn-add {
    padding: 10px;
    font-size: 13px;
}

.file-inputs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: left;
}

.form-btns {
    display: flex;
    gap: 10px;
}

.btn-delete {
    background: rgba(216, 0, 126, 0.2);
    color: var(--accent-magenta);
    border: 1px solid rgba(216, 0, 126, 0.4);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: var(--accent-magenta);
    color: #fff;
}

.btn-delete-inline {
    background: rgba(216, 0, 126, 0.2);
    color: var(--accent-magenta);
    border: 1px solid rgba(216, 0, 126, 0.4);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.btn-delete-inline:hover {
    background: var(--accent-magenta);
    color: #fff;
}

.action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.client-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Liste dinamiche (Storico & Clienti) */
.sold-history-list, .clients-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
}

.sold-item, .client-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sold-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.sold-details, .client-info {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.sold-details h4, .client-info strong {
    font-size: 13px;
    color: #fff;
}

.client-info .contact-text {
    font-size: 12px;
    color: var(--text-muted);
}

.sold-date {
    font-size: 11px;
    color: #2ec4b6;
    font-weight: 600;
}

.file-link {
    font-size: 11px;
    color: var(--accent-blue);
    text-decoration: none;
    margin-top: 2px;
}

.file-link:hover {
    text-decoration: underline;
}

.chat-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    transition: transform 0.2s;
}

.chat-btn:hover {
    transform: scale(1.1);
}

/* ==========================================
   SCHERMATA LOGIN
   ========================================== */
.input-field input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 10px;
    transition: border-color 0.2s ease;
}

.input-field input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 142, 214, 0.3);
}

.error-text {
    color: #ff3860;
    font-size: 13px;
    font-weight: 600;
    margin: 6px 0;
}

/* ==========================================
   NUOVA HOME ITALCASE 2000 (body.home)
   ========================================== */
:root {
    --bg: #0a0f17;
    --surface: #111822;
    --surface-2: #161f2b;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #f1f5f9;
    --muted: #8b98a9;
    --blue: #008ed6;
    --magenta: #d8007e;
    --radius: 16px;
    --serif: 'Playfair Display', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.home *, body.home *::before, body.home *::after { box-sizing: border-box; }
:where(body.home) :where(ul, p, h1, h2) { margin: 0; padding: 0; }

body.home {
    display: block;
    margin: 0;
    padding: 0;
    font-family: var(--sans);
    color: var(--text);
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(0, 142, 214, 0.12), transparent 60%),
        radial-gradient(700px 400px at -10% 110%, rgba(216, 0, 126, 0.08), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

body.home.menu-open { overflow: hidden; }

/* TOP BAR */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 15, 23, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    height: 68px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.menu-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
}
.menu-toggle:hover { border-color: var(--blue); background: rgba(0, 142, 214, 0.08); }

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}
.topbar-brand img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line-strong);
}
.topbar-name {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.topbar-name strong { color: var(--magenta); font-weight: 700; }

.topbar-call {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: filter .2s;
}
.topbar-call:hover { filter: brightness(1.1); }

/* MENU LATERALE */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    width: min(320px, 86vw);
    background: var(--surface);
    border-right: 1px solid var(--line);
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
}

.menu-open .menu-overlay { opacity: 1; visibility: visible; }
.menu-open .side-menu { transform: translateX(0); }

.side-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.side-head img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line-strong);
}
.side-title { font-weight: 700; font-size: 16px; }
.side-sub { font-size: 12px; color: var(--muted); }

.menu-close {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
}
.menu-close:hover { color: var(--text); border-color: var(--line-strong); }

.side-label {
    margin: 18px 0 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--muted);
}

.side-links { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.side-links a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 12px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background .2s;
}
.side-links a i { width: 18px; text-align: center; color: var(--muted); }
.side-links a:hover { background: var(--surface-2); }
.side-links a:hover i { color: var(--blue); }
.side-links a.is-active { background: rgba(0, 142, 214, 0.12); }
.side-links a.is-active i { color: var(--blue); }

.side-foot {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
}
.side-foot a { color: var(--text); text-decoration: none; }
.side-foot i { width: 16px; margin-right: 8px; color: var(--muted); }

/* HUB HOME */
.hub {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 20px 24px;
}

.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: center;
}

@media (min-width: 860px) {
    .hero { grid-template-columns: 1.4fr 1fr; gap: 48px; }
    .hub { padding-top: 72px; }
}

.eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 16px;
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(34px, 6vw, 56px);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.hero h1 span { color: var(--magenta); }

.lead {
    margin-top: 18px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--muted);
    max-width: 46ch;
}

.hero-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .2s, filter .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }

.btn-ghost {
    border: 1px solid var(--line-strong);
    color: var(--text);
}
.btn-ghost:hover { border-color: var(--text); }

.btn-whatsapp {
    width: 100%;
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.35);
    color: #4ade80;
}
.btn-whatsapp:hover { background: #25d366; color: #fff; }

/* Scheda referente */
.agent-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
.agent-logo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line-strong);
    margin-bottom: 16px;
}
.agent-role {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--muted);
}
.agent-name {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 600;
    margin: 4px 0 18px;
}
.agent-contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}
.agent-contacts a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.agent-contacts i { color: var(--blue); }
.agent-contacts a:hover { background: #1c2735; }

/* Servizi */
.services {
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
@media (min-width: 700px) { .services { grid-template-columns: repeat(4, 1fr); } }

.service {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 12px;
    font-size: 15px;
    font-weight: 500;
    background: rgba(17, 24, 34, 0.6);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.service i { color: var(--magenta); }

/* Accesso rapido */
.quick { margin-top: 56px; }

.section-title {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 18px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.quick-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    transition: border-color .2s, transform .2s, background .2s;
}
.quick-card:hover {
    border-color: var(--line-strong);
    background: var(--surface-2);
    transform: translateY(-2px);
}

.quick-icon {
    flex: 0 0 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}
.quick-icon.blue { background: rgba(0, 142, 214, 0.14); color: var(--blue); }
.quick-icon.magenta { background: rgba(216, 0, 126, 0.14); color: #ff3da9; }

.quick-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.quick-text strong { font-size: 15px; font-weight: 600; }
.quick-text small { font-size: 13px; color: var(--muted); }

.quick-arrow { color: var(--muted); font-size: 13px; transition: transform .2s, color .2s; }
.quick-card:hover .quick-arrow { color: var(--text); transform: translateX(3px); }

/* FOOTER HOME */
.site-footer {
    max-width: 1100px;
    margin: 56px auto 0;
    padding: 24px 20px 32px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 13px;
    color: var(--muted);
}
.dev-logo { max-width: 140px; opacity: 0.5; }

/* Mobile */
@media (max-width: 420px) {
    .topbar-call span { display: none; }
    .topbar-call { padding: 10px 12px; }
    .topbar-name { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* Barra superiore Login nella Home */
.staff-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.staff-topbar a.btn-icon {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-logout-mini {
    border-color: var(--accent-magenta);
    color: var(--accent-magenta);
    background: rgba(216, 0, 126, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-logout-mini:hover {
    background: var(--accent-magenta);
    color: #fff;
}

.hero h1 .text-blue {
    color: #008ed6;
}

/* ================= MINI RECENSIONI SIDE MENU ================= */
.side-reviews {
    margin: 14px 0 auto 0;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 142, 214, 0.22);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.side-review-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.side-star-picker {
    display: flex;
    gap: 5px;
    font-size: 16px;
    cursor: pointer;
}

.side-star-picker i {
    color: rgba(255, 255, 255, 0.2);
    transition: color 0.15s ease, transform 0.15s ease;
}

.side-star-picker i.is-active {
    color: #fbbf24;
}

.side-star-picker i:hover {
    transform: scale(1.15);
}

.side-review-form input,
.side-review-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 10px;
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    resize: none;
}

.side-review-form input:focus,
.side-review-form textarea:focus {
    outline: none;
    border-color: #008ed6;
}

.side-review-btn {
    background: #008ed6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s ease;
}

.side-review-btn:hover {
    background: #0077b5;
}

.side-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 2px;
}

.side-review-card {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 8px 10px;
}

.side-review-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.side-review-top strong {
    font-size: 12px;
    color: #ffffff;
}

.side-review-stars {
    font-size: 10px;
    margin-left: auto;
}

.side-review-stars .star-on {
    color: #fbbf24;
}

.side-review-stars .star-off {
    color: rgba(255, 255, 255, 0.2);
}

.side-review-card p {
    font-size: 11.5px;
    color: #cbd5e1;
    line-height: 1.35;
    margin: 0;
}

.side-rev-del {
    background: rgba(216, 0, 126, 0.2);
    color: #d8007e;
    border: 1px solid rgba(216, 0, 126, 0.4);
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 10px;
    cursor: pointer;
}

/* ==========================================
   RUBRICA E CATEGORIE CONTATTI (PAGINA 2)
   ========================================== */

.contacts-expanded-box {
    grid-column: 1 / -1; /* Occupa tutta la larghezza disponibile per gestire comodamente la rubrica */
}

.category-creator-form {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.category-creator-form input {
    flex: 1;
    min-width: 200px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 142, 214, 0.35);
    border-radius: 10px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 13px;
}

.category-creator-form input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.btn-compact {
    width: auto;
    padding: 10px 16px;
    font-size: 13px;
    white-space: nowrap;
}

/* Barra Schede Categorie */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cat-tab,
.cat-tab-wrap {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.cat-tab {
    padding: 6px 14px;
    cursor: pointer;
}

.cat-tab-btn {
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    padding: 6px 8px 6px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cat-del-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.45);
    padding: 6px 10px 6px 4px;
    cursor: pointer;
    font-size: 11px;
}

.cat-del-btn:hover {
    color: var(--accent-magenta);
}

.cat-tab.is-active,
.cat-tab-wrap.is-active {
    background: rgba(0, 142, 214, 0.22);
    border-color: var(--accent-blue);
    color: #ffffff;
}

.cat-count {
    background: rgba(0, 0, 0, 0.35);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
}

/* Select Categorie & Riga Doppio Input */
.quick-form select {
    width: 100%;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(0, 142, 214, 0.4);
    border-radius: 8px;
    padding: 10px 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.input-row-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

@media (min-width: 600px) {
    .input-row-2 {
        grid-template-columns: 1fr 1fr;
    }
}

/* Card Contatto Potenziata */
.client-header-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2px;
}

.client-cat-badge {
    background: rgba(0, 142, 214, 0.2);
    color: var(--accent-blue);
    border: 1px solid rgba(0, 142, 214, 0.35);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.client-note-text {
    font-size: 12px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 8px;
    border-radius: 6px;
    margin-top: 4px;
}

.client-move-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.client-move-row select {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #ffffff;
    font-size: 11px;
    padding: 2px 6px;
}

.call-mini-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 142, 214, 0.25);
    border: 1px solid var(--accent-blue);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

.call-mini-btn:hover {
    background: var(--accent-blue);
}

/* ==========================================
   CARTELLE CATEGORIE CHIUDIBILI (RUBRICA)
   ========================================== */

.category-folders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.folder-accordion {
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(0, 142, 214, 0.25);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.folder-accordion.is-open {
    border-color: var(--accent-blue);
}

.folder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    user-select: none;
}

.folder-header:hover {
    background: rgba(0, 142, 214, 0.12);
}

.folder-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 14px;
}

.folder-icon {
    color: var(--accent-blue);
    font-size: 16px;
}

.folder-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.folder-chevron {
    color: var(--text-muted);
    font-size: 12px;
    transition: transform 0.25s ease;
}

.folder-accordion.is-open .folder-chevron {
    transform: rotate(180deg);
    color: #ffffff;
}

.folder-body {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-folder-msg {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px;
    margin: 0;
}

.cat-edit-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    padding: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: color 0.2s ease;
}

.cat-edit-btn:hover {
    color: var(--accent-blue);
}
