/* =========================================
   WEDDING SMART PLANNER - DASHBOARD STYLES
   ========================================= */

/* ===== TOKENS ===== */
:root {
    --primary: #e6005c;
    --primary-dark: #c9004f;
    --pink-soft: #fff2f7;
    --pink-light: #ffe6f0;
    --pink-lighter: #fff8fb;
    --text: #111827;
    --text-soft: #374151;
    --muted: #6b7280;
    --border: #ececf0;
    --border-soft: #f3f4f6;
    --success: #22a45d;
    --success-soft: #d1fae5;
    --warning: #f59e0b;
    --warning-soft: #fef3c7;
    --danger: #ef4444;
    --danger-soft: #fee2e2;
    --white: #ffffff;
    --bg: #fafafa;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.07);
    --shadow-pink: 0 6px 18px rgba(230, 0, 92, 0.18);

    --sb-width: 260px;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-script: 'Dancing Script', cursive;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--text); font-weight: 700; }
table { border-collapse: collapse; width: 100%; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.88rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1.2;
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-pink);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline {
    background: var(--white);
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover { background: var(--pink-soft); }
.btn-outline-share {
    background: var(--white);
    color: var(--text-soft);
    border-color: var(--border);
}
.btn-outline-share:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sb-width);
    height: 100vh;
    background: var(--white);
    border-right: 1px solid var(--border-soft);
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    z-index: 50;
}
.sb-logo {
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
    padding: 0 8px 16px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 16px;
}
.logo-script {
    font-family: var(--font-script);
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
}
.logo-block { display: flex; flex-direction: column; line-height: 1; }
.logo-bold { font-weight: 800; letter-spacing: 1px; font-size: 0.92rem; color: var(--text); }
.logo-sub { font-size: 0.5rem; letter-spacing: 3px; color: var(--muted); font-weight: 500; margin-top: 2px; }

.sb-profile {
    text-align: center;
    padding: 12px 0 16px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 16px;
}
.sb-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background:
        linear-gradient(135deg, rgba(255,205,210,0.4), rgba(248,187,208,0.4)),
        radial-gradient(circle at 50% 40%, #fff5e6 0%, #f5d4b8 50%, #c97a4a 100%);
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--pink-light);
}
.sb-couple {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.caret { color: var(--muted); font-size: 0.7rem; }
.sb-meta { color: var(--muted); font-size: 0.72rem; }
.sb-date {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 12px;
}
.sb-cta {
    display: inline-block;
    padding: 8px 14px;
    background: var(--white);
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.15s ease;
}
.sb-cta:hover { background: var(--pink-soft); }

.sb-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
}
.sb-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s ease;
    position: relative;
}
.sb-link:hover { background: var(--pink-soft); color: var(--primary); }
.sb-link.active {
    background: var(--pink-soft);
    color: var(--primary);
    font-weight: 600;
}
.sb-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--primary);
    border-radius: 2px;
}
.sb-icon {
    display: inline-flex;
    align-items: center;
    color: currentColor;
    flex-shrink: 0;
}
.sb-badge {
    margin-left: auto;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.sb-planner {
    margin-top: 16px;
    padding: 16px;
    background: var(--pink-soft);
    border-radius: var(--radius-lg);
}
.sb-planner-label {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 10px;
}
.sb-planner-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.sb-planner-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background:
        linear-gradient(135deg, rgba(252,228,236,0.3), rgba(248,187,208,0.3)),
        radial-gradient(circle at 50% 40%, #fff5e6 0%, #f5d4b8 50%, #b88555 100%);
    flex-shrink: 0;
}
.sb-planner-info strong { font-size: 0.85rem; display: block; }
.online {
    color: var(--success);
    font-size: 0.72rem;
    font-weight: 500;
}
.sb-planner-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    background: var(--white);
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
}
.sb-planner-cta:hover { background: var(--pink-light); }

/* ===== MOBILE HEADER ===== */
.mobile-header {
    display: none;
    background: var(--white);
    border-bottom: 1px solid var(--border-soft);
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 40;
}
.mob-menu, .mob-bell {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.mob-bell .bell-badge {
    position: absolute;
    top: 4px; right: 4px;
    background: var(--primary);
    color: var(--white);
    width: 16px; height: 16px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mob-logo {
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}
.mob-logo .logo-script { font-size: 1.2rem; }
.mob-logo .logo-bold { font-size: 0.78rem; }

.sb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 45;
}

/* ===== MOBILE PROFILE CARD ===== */
.mob-profile-card {
    display: none;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.mob-profile-photo {
    width: 44px; height: 44px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 40%, #fff5e6 0%, #f5d4b8 50%, #c97a4a 100%);
    flex-shrink: 0;
}
.mob-profile-text {
    flex: 1;
    line-height: 1.2;
}
.mob-profile-text strong { font-size: 0.95rem; display: block; }
.mob-profile-text span { color: var(--muted); font-size: 0.8rem; }
.mob-profile-arrow {
    color: var(--muted);
    font-size: 1.4rem;
}

/* ===== MAIN ===== */
.dashboard-main {
    margin-left: var(--sb-width);
    padding: 28px;
    min-height: 100vh;
}

/* ===== PAGE ===== */
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.page-header h1 {
    font-size: 1.7rem;
    margin-bottom: 4px;
}
.hearts { color: var(--primary); }
.page-sub { color: var(--muted); font-size: 0.92rem; }
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.icon-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.icon-btn .badge {
    position: absolute;
    top: -2px; right: -2px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    width: 18px; height: 18px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stats-grid.four { grid-template-columns: repeat(4, 1fr); }
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
}
.stat-label {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: 500;
}
.stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.1;
}
.stat-value.pink { color: var(--primary); }
.stat-value.green { color: var(--success); }
.stat-value small { color: var(--muted); font-size: 1rem; font-weight: 500; }
.stat-value.with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
}
.cal-icon {
    background: var(--pink-light);
    color: var(--primary);
    width: 36px; height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.stat-meta {
    color: var(--muted);
    font-size: 0.78rem;
    margin-top: 8px;
}
.badge-pct {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
}
.badge-pct.pink { background: var(--pink-light); color: var(--primary); }
.badge-pct.grey { background: var(--border-soft); color: var(--muted); }

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border-soft);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-bar span {
    display: block;
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-pill);
    transition: width 0.5s ease;
}
.progress-bar.green span { background: var(--success); }

/* ===== STAT MINI ===== */
.stat-card.mini {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
}
.stat-card.mini strong {
    font-size: 1.4rem;
    font-weight: 800;
    display: block;
    line-height: 1.1;
}
.stat-card.mini small { color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.mini-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--pink-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mini-icon.green { background: var(--success-soft); color: var(--success); }
.mini-icon.orange { background: var(--warning-soft); color: var(--warning); }
.mini-icon.red { background: var(--danger-soft); color: var(--danger); }
.green-bg { background: linear-gradient(180deg, var(--white) 0%, rgba(209,250,229,0.2) 100%); }
.orange-bg { background: linear-gradient(180deg, var(--white) 0%, rgba(254,243,199,0.3) 100%); }
.red-bg { background: linear-gradient(180deg, var(--white) 0%, rgba(254,226,226,0.3) 100%); }
.meta-soft { color: var(--muted); font-size: 0.78rem; }

/* ===== ROW LAYOUTS ===== */
.row-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

/* ===== CARD ===== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
}
.card-flat { margin-bottom: 24px; }
.card.no-pad { padding: 0; overflow: hidden; }
.card-title {
    font-size: 1.05rem;
    margin-bottom: 16px;
    font-weight: 700;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}
.card-head .card-title { margin-bottom: 0; }
.card-link {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 14px;
    transition: opacity 0.15s ease;
}
.card-link:hover { opacity: 0.75; }
.card-link.in-card { padding: 14px 22px; }

/* ===== TIMELINE LIST ===== */
.timeline-list { display: flex; flex-direction: column; gap: 4px; }
.timeline-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 0.88rem;
}
.t-icon {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.t-icon.completed { background: var(--success-soft); color: var(--success); }
.t-icon.pending { background: var(--warning-soft); color: var(--warning); }
.t-icon.heart { background: var(--pink-light); color: var(--primary); }
.t-text { flex: 1; }
.t-status {
    font-size: 0.78rem;
    font-weight: 600;
}
.t-status.green { color: var(--success); }
.t-status.orange { color: var(--warning); }
.t-status.muted { color: var(--muted); font-weight: 500; }

/* ===== DONUT CHART ===== */
.donut { width: 110px; height: 110px; }
.donut-wrap {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 18px;
    align-items: center;
    position: relative;
}
.donut-center {
    position: absolute;
    top: 55px;
    left: 55px;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    line-height: 1.1;
}
.donut-center strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}
.donut-center small { color: var(--muted); font-size: 0.65rem; }

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.82rem;
}
.donut-legend li {
    display: grid;
    grid-template-columns: 10px 1fr auto;
    align-items: center;
    gap: 6px;
}
.donut-legend em { color: var(--text); font-style: normal; font-weight: 600; }
.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.dot.c1 { background: #e6005c; }
.dot.c2 { background: #f48fb1; }
.dot.c3 { background: #fce4ec; border: 1px solid #f8bbd0; }
.dot.c4 { background: #ffe6f0; border: 1px solid #f8bbd0; }
.dot.c5 { background: #ffd6e5; border: 1px solid #f8bbd0; }
.dot.success { background: var(--success); }
.dot.warning { background: var(--warning); }
.dot.danger { background: var(--danger); }

.donut-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 16px;
}
.donut-mini {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}
.donut-mini .donut { width: 110px; height: 110px; }
.donut-mini .donut-center {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.donut-mini .donut-center strong { color: var(--text); font-size: 1.05rem; }
.donut-mini .donut-center small { font-size: 0.7rem; }
.legend-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    flex: 1;
}
.legend-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}
.legend-list em { color: var(--text); font-style: normal; font-weight: 600; margin-left: auto; }

.big-donut {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 12px;
}
.big-donut .donut { width: 100%; height: 100%; }
.big-donut .donut-center {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.big-donut .donut-center strong { font-size: 1.4rem; color: var(--primary); }
.muted-center {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 18px;
}

/* ===== ACTIVITY LIST ===== */
.activity-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 0.88rem;
}
.check-circle {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.check-circle.done {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}
.a-text { flex: 1; }
.a-meta { color: var(--muted); font-size: 0.78rem; }
.a-meta.green { color: var(--success); font-weight: 600; }

/* ===== QUICK GRID (Risorse) ===== */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}
.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 12px;
    background: var(--pink-soft);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    color: var(--text);
}
.quick-item:hover {
    background: var(--pink-light);
    transform: translateY(-2px);
}
.qi-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--white);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.quick-item strong { font-size: 0.82rem; font-weight: 700; margin-bottom: 4px; }
.qi-sub { color: var(--muted); font-size: 0.7rem; line-height: 1.3; }

/* ===== TOOLS GRID ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}
.tool-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 16px;
}
.tool-icon {
    background: var(--pink-light);
    color: var(--primary);
    width: 36px; height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.tool-item h4 { font-size: 0.92rem; margin-bottom: 6px; }
.tool-item p { color: var(--muted); font-size: 0.8rem; line-height: 1.4; margin-bottom: 12px; }
.tool-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 0.78rem;
    border-top: 1px solid var(--border-soft);
    padding-top: 10px;
}
.tool-meta a { color: var(--primary); }

/* ===== TABLES ===== */
.tables-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}
.ts-label { color: var(--muted); font-size: 0.82rem; margin-bottom: 4px; }
.tables-stats strong { font-size: 1.4rem; color: var(--text); font-weight: 800; }
.tables-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    justify-items: center;
}
.t-circle {
    width: 50px; height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: var(--white);
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-soft);
    overflow-x: auto;
}
.tab {
    padding: 10px 18px;
    color: var(--muted);
    font-weight: 500;
    font-size: 0.88rem;
    position: relative;
    white-space: nowrap;
}
.tab.active {
    color: var(--primary);
    font-weight: 700;
}
.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 8px; right: 8px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* ===== STATUS PILL ===== */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-pill.green { background: var(--success-soft); color: var(--success); }
.status-pill.green-soft { background: var(--success-soft); color: var(--success); }
.status-pill.orange { background: var(--warning-soft); color: var(--warning); }
.status-pill.orange-soft { background: var(--warning-soft); color: var(--warning); }
.status-pill.red-soft { background: var(--danger-soft); color: var(--danger); }
.status-pill.grey { background: var(--border-soft); color: var(--muted); }
.status-pill.grey-soft { background: var(--border-soft); color: var(--muted); }
.status-pill.pink-soft { background: var(--pink-light); color: var(--primary); }

/* ===== MONTH LIST ===== */
.month-list { margin-bottom: 24px; }
.month-list li {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
}
.month-list li:last-child { border-bottom: none; }
.m-date { text-align: center; color: var(--muted); font-size: 0.78rem; }
.m-date strong { display: block; font-size: 1.4rem; color: var(--primary); font-weight: 800; }
.m-info h4 { font-size: 0.95rem; margin-bottom: 2px; }
.m-info p { color: var(--muted); font-size: 0.82rem; }

.side-card .side-h { font-size: 0.9rem; margin: 18px 0 12px; }
.cat-list { margin-bottom: 18px; }
.cat-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.88rem;
}
.cat-list em { margin-left: auto; color: var(--text); font-style: normal; font-weight: 700; }
.li-check {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--success);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.li-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin: 0 3px;
}
.li-dot.orange { background: var(--warning); }
.li-dot.grey { background: var(--border); }

.tip-box {
    background: var(--pink-soft);
    border-radius: var(--radius-md);
    padding: 16px;
}
.tip-box strong { display: block; margin-bottom: 6px; font-size: 0.92rem; }
.tip-box p { color: var(--muted); font-size: 0.85rem; margin-bottom: 8px; }

/* ===== GUEST LIST ===== */
.guest-list li {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.88rem;
}
.guest-list li:last-child { border-bottom: none; }
.guest-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5d4b8, #c97a4a);
}
.tableau-empty {
    text-align: center;
    padding: 30px 16px;
    color: var(--muted);
}
.te-icon {
    color: var(--primary);
    margin-bottom: 12px;
    display: inline-flex;
}
.tableau-empty p { font-size: 0.88rem; line-height: 1.5; }

/* ===== TRANSACTIONS ===== */
.trans-list li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
}
.trans-list li:last-child { border-bottom: none; }
.trans-list strong { display: block; font-size: 0.9rem; }
.trans-list span:not(.amount):not(.status-pill) { color: var(--muted); font-size: 0.75rem; }
.amount { font-weight: 700; color: var(--text); font-size: 0.92rem; }

/* ===== DATA TABLE ===== */
.data-table {
    border-collapse: collapse;
    width: 100%;
}
.data-table thead th {
    text-align: left;
    padding: 14px 22px;
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
    background: var(--pink-soft);
    border-bottom: 1px solid var(--border-soft);
}
.data-table tbody td {
    padding: 14px 22px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--pink-soft); }
.data-table .actions { white-space: nowrap; }
.data-table .actions button {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--pink-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
}
.data-table .actions button:hover { background: var(--pink-light); }
.doc-icon { color: var(--primary); margin-right: 6px; }

.pagination-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    border-top: 1px solid var(--border-soft);
    color: var(--muted);
    font-size: 0.85rem;
}
.pagination { display: flex; gap: 4px; }
.pagination button {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--border);
    font-size: 0.85rem;
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.cta-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--pink-soft);
    border: 1px solid var(--pink-light);
}
.cta-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--white);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cta-banner > div { flex: 1; }
.cta-banner strong { display: block; margin-bottom: 4px; font-size: 1rem; }
.cta-banner p { color: var(--muted); font-size: 0.85rem; }

/* ===== DEADLINE LIST ===== */
.deadline-list li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.88rem;
}
.deadline-list li:last-child { border-bottom: none; }
.d-date strong { color: var(--text); font-size: 0.9rem; }
.d-meta { font-size: 0.78rem; }
.d-meta.orange { color: var(--warning); font-weight: 600; }

.todo-list li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.88rem;
}
.todo-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.todo-list input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}
.todo-list input[type="checkbox"]:checked + span { color: var(--muted); text-decoration: line-through; }

/* ===== CHAT ===== */
.chat-grid {
    display: grid;
    grid-template-columns: 320px 1fr 280px;
    gap: 16px;
    height: calc(100vh - 180px);
    min-height: 560px;
}
.chat-list-card { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; }
.search-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius-pill);
    margin-bottom: 12px;
    color: var(--muted);
}
.search-input input {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    font-size: 0.88rem;
}
.search-input.compact { padding: 8px 14px; }

.chat-list { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.chat-list li {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
}
.chat-list li:hover { background: var(--pink-soft); }
.chat-list li.active { background: var(--pink-soft); }
.chat-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 40%, #fff5e6 0%, #f5d4b8 50%, #b88555 100%);
    flex-shrink: 0;
}
.chat-avatar.c2 { background: linear-gradient(135deg, #fff8e1, #d7ccc8); }
.chat-avatar.c3 { background: linear-gradient(135deg, #e1f5fe, #81d4fa); }
.chat-avatar.c4 { background: linear-gradient(135deg, #f3e5f5, #ce93d8); }
.chat-avatar.c5 { background: linear-gradient(135deg, #fce4ec, #f48fb1); }
.chat-avatar.c6 { background: linear-gradient(135deg, #e8f5e9, #a5d6a7); }
.chat-meta { min-width: 0; }
.chat-meta strong {
    display: block;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-msg-preview {
    color: var(--muted);
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.chat-time { text-align: right; font-size: 0.72rem; color: var(--muted); }
.chat-pill {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-pill);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    margin-top: 4px;
}

.chat-center {
    display: flex;
    flex-direction: column;
    padding: 0;
}
.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.chat-header strong { display: block; font-size: 0.95rem; }
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px;
    background: var(--pink-lighter);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.msg {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: var(--radius-lg);
    font-size: 0.88rem;
    position: relative;
}
.msg.incoming {
    background: var(--white);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    border: 1px solid var(--border-soft);
}
.msg.outgoing {
    background: var(--pink-light);
    color: var(--text);
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}
.msg-time {
    display: block;
    font-size: 0.65rem;
    color: var(--muted);
    margin-top: 4px;
    text-align: right;
}

.chat-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-soft);
    background: var(--white);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    outline: none;
    font-size: 0.9rem;
}
.chat-input input:focus { border-color: var(--primary); }
.emoji-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--pink-soft);
}
.send-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-details { padding: 18px; }
.contact-block {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 16px;
}
.big-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background:
        radial-gradient(circle at 50% 40%, #fff5e6 0%, #f5d4b8 50%, #b88555 100%);
}
.contact-block strong { display: block; font-size: 1rem; }
.contact-block .muted { color: var(--muted); font-size: 0.82rem; }
.contact-actions { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.contact-actions button {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--pink-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.contact-actions button:hover { background: var(--pink-light); }

.files-list { margin-bottom: 18px; }
.files-list li {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-soft);
}
.files-list li:last-child { border-bottom: none; }
.file-ico {
    width: 36px; height: 36px;
    border-radius: 8px;
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.file-ico.pink { background: var(--primary); }
.file-ico.green { background: var(--success); }
.file-ico.orange { background: var(--warning); }
.files-list strong { display: block; font-size: 0.82rem; }
.files-list span { color: var(--muted); font-size: 0.7rem; }

/* ===== RISORSE PAGE ===== */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.resource-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    transition: all 0.2s ease;
}
.resource-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.r-icon {
    width: 40px; height: 40px;
    border-radius: 8px;
    background: var(--pink-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.resource-item strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.resource-item span { color: var(--muted); font-size: 0.78rem; }

.guides-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.guide-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
    color: var(--text);
}
.guide-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.guide-photo {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #fff5e6, #f5d4b8);
}
.guide-photo.g1 { background: linear-gradient(135deg, #fff8e1, #ffd4a3); }
.guide-photo.g2 { background: linear-gradient(135deg, #fce4ec, #f8bbd0); }
.guide-photo.g3 { background: linear-gradient(135deg, #f3e5f5, #ce93d8); }
.guide-photo.g4 { background: linear-gradient(135deg, #e8f5e9, #a5d6a7); }
.guide-body { padding: 14px; }
.guide-body strong { display: block; font-size: 0.92rem; margin-bottom: 4px; line-height: 1.3; }
.guide-body span { color: var(--muted); font-size: 0.78rem; }

.downloads-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.download-item {
    flex: 1;
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
}
.d-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--pink-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.download-item strong { display: block; font-size: 0.88rem; }
.download-item span { color: var(--muted); font-size: 0.78rem; }

/* ===== NOTE PAGE ===== */
.notes-row { gap: 16px; }
.notes-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-md);
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-left: 3px solid transparent;
}
.notes-list li:hover { background: var(--pink-soft); }
.notes-list li.active {
    background: var(--pink-soft);
    border-left-color: var(--primary);
}
.notes-list strong { display: block; font-size: 0.92rem; margin-bottom: 2px; }
.notes-list span { color: var(--muted); font-size: 0.78rem; }
.note-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.note-tag.pink { background: var(--pink-light); color: var(--primary); }
.note-tag.pink-light { background: var(--pink-soft); color: var(--primary); }
.note-tag.orange-soft { background: var(--warning-soft); color: var(--warning); }

.note-actions { display: flex; gap: 6px; }
.note-actions button {
    width: 30px; height: 30px;
    border-radius: 8px;
    background: var(--pink-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.note-meta { color: var(--muted); font-size: 0.82rem; margin: 8px 0 14px; }
.note-text { color: var(--text-soft); margin-bottom: 12px; }
.note-bullets { margin-bottom: 18px; }
.note-bullets li {
    padding: 6px 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}
.ref-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.ref-img {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
}
.ref-img.r1 { background: linear-gradient(135deg, #fff5f8, #f8bbd0); }
.ref-img.r2 { background: linear-gradient(135deg, #fff8e1, #ffd4a3); }
.ref-img.r3 { background: linear-gradient(135deg, #fce4ec, #f48fb1); }
.ref-img.r4 { background: linear-gradient(135deg, #e8f5e9, #a5d6a7); }

.prefs-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}
.pref-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    transition: all 0.2s ease;
}
.pref-item:hover { border-color: var(--primary); }
.p-icon {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--pink-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.pref-item strong { font-size: 0.88rem; margin-bottom: 4px; }
.pref-item span { color: var(--muted); font-size: 0.75rem; }

/* ===== SETTINGS GRID ===== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.setting-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    color: var(--text);
    transition: all 0.2s ease;
}
.setting-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.set-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--pink-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.setting-card h4 { font-size: 1rem; margin-bottom: 8px; }
.setting-card p { color: var(--muted); font-size: 0.85rem; line-height: 1.5; margin-bottom: 14px; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--border-soft);
    padding: 8px 4px;
    z-index: 40;
    justify-content: space-around;
}
.bn-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 500;
    flex: 1;
    position: relative;
}
.bn-link.active { color: var(--primary); }
.bn-badge {
    position: absolute;
    top: 2px;
    right: 14px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    width: 16px; height: 16px;
    font-size: 0.62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   RESPONSIVE — TABLET 768-1199
   ========================================= */
@media (max-width: 1199px) {
    :root { --sb-width: 230px; }
    .row-3col { grid-template-columns: 1fr 1fr; }
    .stats-grid, .stats-grid.four { grid-template-columns: 1fr 1fr; }
    .quick-grid { grid-template-columns: repeat(4, 1fr); }
    .tools-grid { grid-template-columns: repeat(3, 1fr); }
    .resources-grid, .settings-grid { grid-template-columns: 1fr 1fr; }
    .guides-grid { grid-template-columns: 1fr 1fr; }
    .prefs-row { grid-template-columns: 1fr 1fr; }

    .chat-grid { grid-template-columns: 280px 1fr; }
    .chat-details { display: none; }
}

/* =========================================
   RESPONSIVE — MOBILE
   ========================================= */
@media (max-width: 767px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
    }
    .sidebar.open { transform: translateX(0); }
    .sb-overlay.active { display: block; }

    .mobile-header { display: flex; }
    .mob-profile-card { display: flex; }

    .dashboard-main {
        margin-left: 0;
        padding: 16px;
        padding-bottom: 90px;
    }

    .bottom-nav { display: flex; }

    /* Page header */
    .page-header { flex-direction: column; align-items: stretch; }
    .page-header h1 { font-size: 1.4rem; }
    .header-actions { flex-wrap: wrap; }
    .header-actions .btn { flex: 1; min-width: 140px; padding: 10px 14px; font-size: 0.82rem; }

    /* Stats grid */
    .stats-grid, .stats-grid.four { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px 16px; }
    .stat-value { font-size: 1.3rem; }
    .stat-card.mini { padding: 14px; }

    /* Rows */
    .row-3col, .row-2col { grid-template-columns: 1fr; gap: 14px; }

    /* Donut wrap */
    .donut-wrap {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .donut-wrap .donut { margin: 0 auto; }
    .donut-center { left: 50%; }
    .donut-row { flex-direction: column; align-items: center; }

    /* Quick grid */
    .quick-grid { grid-template-columns: repeat(3, 1fr); }
    .quick-item { padding: 14px 8px; }
    .quick-item strong { font-size: 0.75rem; }
    .qi-sub { display: none; }

    /* Tools */
    .tools-grid { grid-template-columns: 1fr; }

    /* Tableau */
    .tables-grid { grid-template-columns: repeat(3, 1fr); }
    .t-circle { width: 42px; height: 42px; font-size: 0.85rem; }

    /* Tabs scroll */
    .tabs { gap: 0; }
    .tab { padding: 10px 14px; font-size: 0.82rem; }

    /* Tables — horizontal scroll */
    .card.no-pad { overflow-x: auto; }
    .data-table { min-width: 720px; }
    .pagination-row { flex-direction: column; gap: 10px; align-items: flex-start; }

    /* CTA banner */
    .cta-banner {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
        padding: 20px;
    }

    /* Chat */
    .chat-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    .chat-list-card { display: none; }
    .chat-center { height: calc(100vh - 220px); min-height: 500px; }

    /* Risorse */
    .resources-grid { grid-template-columns: 1fr; }
    .guides-grid { grid-template-columns: 1fr 1fr; }
    .downloads-row { flex-direction: column; }
    .download-item { width: 100%; }
    .downloads-row .btn { width: 100%; }

    /* Note */
    .prefs-row { grid-template-columns: 1fr 1fr; }
    .ref-images { grid-template-columns: 1fr 1fr; }

    /* Settings */
    .settings-grid { grid-template-columns: 1fr; }

    /* Month list */
    .month-list li { grid-template-columns: 56px 1fr; gap: 10px; }
    .month-list .status-pill { grid-column: 2; justify-self: start; }

    /* Deadline / todo */
    .deadline-list li, .todo-list li { grid-template-columns: 1fr auto; gap: 8px; }
    .todo-list .d-meta { grid-column: 1; }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* =========================================================================
   PAGE: LE MIE CONSULENZE
   ========================================================================= */

.cons-top-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) 280px;
    gap: 16px;
    margin-bottom: 24px;
}
.cons-metric { padding: 18px 20px; }
.cons-m-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.cons-m-icon.pink { background: var(--pink-light); color: var(--primary); }
.cons-m-icon.orange { background: var(--warning-soft); color: var(--warning); }
.cons-m-icon.green { background: var(--success-soft); color: var(--success); }
.cons-m-icon.teal { background: #ccfbf1; color: #0d9488; }

/* Planner assegnato mini card */
.planner-assigned-mini {
    padding: 18px;
    grid-row: span 1;
    display: flex;
    flex-direction: column;
}
.planner-assigned-mini > header strong {
    font-size: 0.95rem;
    margin-bottom: 14px;
    display: block;
}
.pa-body {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.pa-photo {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #fff5e6 0%, #f5d4b8 50%, #b88555 100%);
    flex-shrink: 0;
    border: 2px solid var(--pink-light);
}
.pa-body > div { line-height: 1.3; }
.pa-body strong { display: block; font-size: 0.95rem; }
.pa-role { color: var(--muted); font-size: 0.78rem; display: block; margin-bottom: 6px; }
.pa-badge-green {
    display: inline-block;
    background: var(--success-soft);
    color: var(--success);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}
.pa-chat-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 10px;
    padding: 6px;
    border-radius: var(--radius-md);
    transition: background 0.15s ease;
}
.pa-chat-link:hover { background: var(--pink-soft); }

/* Tabs row */
.cons-tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.cons-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    border-bottom: none;
}
.cons-tabs .tab {
    padding: 8px 18px;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
}
.cons-tabs .tab.active {
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
}
.cons-tabs .tab.active::after { display: none; }

.cons-tabs-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.select-soft {
    padding: 8px 32px 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--white);
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.cons-filter-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cons-filter-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Content grid */
.cons-content-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
}
.cons-content-left { display: flex; flex-direction: column; }
.cons-section-title { font-size: 1.05rem; margin-bottom: 14px; }

/* Consultation rows */
.cons-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}
.cons-row {
    display: grid;
    grid-template-columns: 90px 1fr 200px;
    gap: 18px;
    align-items: center;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 18px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cons-row:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.cons-row-photo {
    width: 90px;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    background: radial-gradient(circle at 50% 40%, #fff5e6 0%, #f5d4b8 50%, #c97a4a 100%);
}
.cons-row-photo.cp-giulia {
    background:
        linear-gradient(135deg, rgba(252,228,236,0.4), rgba(248,187,208,0.3)),
        radial-gradient(circle at 50% 35%, #fff5e6 0%, #f5d4b8 60%, #b88555 100%);
}
.cons-row-photo.cp-marco {
    background:
        linear-gradient(135deg, rgba(207,232,242,0.3), rgba(187,222,251,0.3)),
        radial-gradient(circle at 50% 35%, #fff 0%, #e8d5b8 50%, #6b4423 100%);
}
.cons-row-photo.cp-francesca {
    background:
        linear-gradient(135deg, rgba(252,228,236,0.4), rgba(248,187,208,0.3)),
        radial-gradient(circle at 50% 35%, #fff5e6 0%, #f5d4b8 60%, #8d6e63 100%);
}

.cons-row-main { min-width: 0; }
.cons-row-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.cons-row-head h4 {
    font-size: 1rem;
    margin: 0;
}
.cons-row-with {
    color: var(--text-soft);
    font-size: 0.85rem;
    margin-bottom: 2px;
}
.cons-row-with strong { color: var(--text); font-weight: 700; }
.cons-row-sub {
    color: var(--muted);
    font-size: 0.76rem;
    margin-bottom: 10px;
}
.cons-row-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.cons-row-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.78rem;
}
.cons-row-meta svg { color: var(--primary); }

.cons-row-right {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}
.cons-rate-l { color: var(--muted); font-size: 0.76rem; }
.cons-stars { color: var(--warning); font-size: 1rem; }
.cons-rate-text { color: var(--primary); font-size: 0.76rem; font-weight: 600; }
.cons-countdown { color: var(--text); font-size: 0.85rem; }
.cons-countdown strong { font-weight: 700; }

.cons-row-menu {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--muted);
    font-size: 1.2rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}
.cons-row-menu:hover { background: var(--bg); color: var(--text); }

.btn-sm { padding: 7px 14px !important; font-size: 0.8rem !important; }

.cons-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
    margin-bottom: 16px;
}
.cons-empty .empty-icon { color: var(--primary); display: inline-flex; margin-bottom: 14px; }

/* Banner nuova consulenza */
.cons-new-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    background: var(--pink-soft);
    border: 2px dashed var(--primary);
    border-radius: var(--radius-lg);
}
.cnb-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--white);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cnb-text { flex: 1; line-height: 1.4; }
.cnb-text strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.cnb-text p { color: var(--muted); font-size: 0.85rem; }

/* Sidebar destra consulenze */
.cons-content-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cons-side-card { padding: 20px; }
.cons-side-card > header strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}
.cons-check-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}
.cons-check-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--text-soft);
    font-size: 0.82rem;
    line-height: 1.45;
}
.li-check-green {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--success);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.cons-link-arrow {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
}
.cons-quote {
    color: var(--text);
    font-style: italic;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 12px;
}
.cons-quote-stars { color: var(--warning); font-size: 0.95rem; display: block; margin-bottom: 6px; }
.cons-quote-author { color: var(--text); font-weight: 700; font-size: 0.85rem; margin-bottom: 2px; }
.cons-quote-role { color: var(--muted); font-size: 0.78rem; }
.cons-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}
.cons-dots .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--border);
}
.cons-dots .dot.active { background: var(--primary); }

/* =========================================================================
   PAGE: PLANNER ASSEGNATO
   ========================================================================= */

.planner-hero {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    padding: 26px;
    background: linear-gradient(135deg, var(--pink-soft) 0%, var(--white) 100%);
    border: 1px solid var(--pink-light);
    margin-bottom: 20px;
}
.ph-photo-wrap {
    position: relative;
}
.ph-photo {
    width: 180px; height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #fff5e6 0%, #f5d4b8 50%, #b88555 100%);
    border: 4px solid var(--white);
    box-shadow: var(--shadow-md);
}
.ph-status {
    position: absolute;
    bottom: 12px;
    right: 16px;
    background: var(--white);
    color: var(--success);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}
.ph-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.ph-info h2 {
    font-size: 1.7rem;
    margin: 0;
}
.ph-badge-selected {
    display: inline-block;
    background: var(--success);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}
.ph-role {
    color: var(--text-soft);
    font-size: 0.92rem;
    margin-bottom: 10px;
}
.ph-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    margin-bottom: 18px;
}
.ph-rating strong { color: var(--text); font-weight: 800; }
.ph-rating-meta { color: var(--muted); font-size: 0.82rem; }
.ph-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.ph-stats li {
    background: var(--white);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
}
.ph-stats strong {
    display: block;
    font-size: 1.2rem;
    color: var(--text);
    font-weight: 800;
    margin-bottom: 2px;
}
.ph-stats span {
    color: var(--muted);
    font-size: 0.74rem;
}

/* Planner detail grid */
.planner-detail-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.planner-bio {
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 18px;
}
.planner-h {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin: 16px 0 10px;
    font-weight: 700;
}
.planner-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.planner-tag {
    background: var(--pink-light);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}
.planner-text {
    color: var(--text-soft);
    font-size: 0.88rem;
}

.planner-contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}
.pc-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--pink-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pc-label {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    margin-bottom: 2px;
}
.planner-contact-row strong { font-size: 0.88rem; }

.planner-next-appt {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    background: var(--pink-soft);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}
.nappt-date {
    text-align: center;
    color: var(--primary);
    line-height: 1.1;
}
.nappt-date strong { display: block; font-size: 1.4rem; font-weight: 800; }
.nappt-date span { font-size: 0.72rem; }
.nappt-info strong { display: block; font-size: 0.92rem; }
.nappt-info span { color: var(--muted); font-size: 0.78rem; }

/* Planner history */
.planner-history {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.planner-history li {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
}
.planner-history li:last-child { border-bottom: none; }
.ph-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--success);
}
.ph-dot.pink { background: var(--primary); }
.planner-history strong { display: block; font-size: 0.9rem; }
.planner-history span { color: var(--muted); font-size: 0.76rem; }

.change-planner-card {
    display: flex;
    gap: 18px;
    align-items: center;
    background: var(--bg);
    border: 1px dashed var(--border);
}
.cp-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--pink-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.change-planner-card > div { flex: 1; }
.change-planner-card strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.change-planner-card p { color: var(--muted); font-size: 0.85rem; }

/* =========================================================================
   MODAL CONSULENZE REPORT
   ========================================================================= */
.cons-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.cons-modal[hidden] { display: none; }
.cons-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
}
.cons-modal-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: consModalUp 0.25s ease;
}
@keyframes consModalUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.cons-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border-soft);
}
.cons-modal-head h3 { margin: 0; font-size: 1.15rem; }
.cons-modal-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--muted);
    font-size: 1.4rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cons-modal-close:hover { background: var(--pink-light); color: var(--primary); }
.cons-modal-body { padding: 22px 24px; }
.cons-modal-body .report-meta {
    color: var(--muted);
    font-size: 0.85rem;
    padding: 10px 14px;
    background: var(--pink-soft);
    border-radius: var(--radius-md);
    margin: 0 0 18px;
}
.cons-modal-body h4 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    margin: 18px 0 8px;
}
.cons-modal-body ul,
.cons-modal-body ol { margin: 0 0 6px 18px; padding: 0; }
.cons-modal-body li { font-size: 0.9rem; line-height: 1.55; margin-bottom: 4px; }
.cons-modal-body p { font-size: 0.92rem; line-height: 1.55; margin: 0 0 6px; }

.cons-modal-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
    background: var(--pink-soft);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}
.cons-modal-meta div span {
    display: block;
    color: var(--muted);
    font-size: 0.7rem;
    margin-bottom: 2px;
}
.cons-modal-meta div strong { font-size: 0.9rem; }

.cons-report-section { margin-bottom: 22px; }
.cons-report-section h4 {
    font-size: 0.74rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    font-weight: 800;
}
.cons-report-section ul li {
    padding: 6px 0 6px 16px;
    position: relative;
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.5;
}
.cons-report-section ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 800;
}

/* =========================================================================
   RESPONSIVE — CONSULENZE + PLANNER ASSEGNATO
   ========================================================================= */
@media (max-width: 1199px) {
    .cons-top-grid { grid-template-columns: repeat(2, 1fr); }
    .planner-assigned-mini { grid-column: span 2; }
    .cons-content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1023px) {
    .planner-hero { grid-template-columns: 1fr; text-align: center; }
    .ph-photo-wrap { display: inline-block; }
    .ph-stats { grid-template-columns: 1fr 1fr; }
    .planner-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    .cons-top-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .planner-assigned-mini { grid-column: 1 / -1; }

    .cons-tabs-row { flex-direction: column; align-items: stretch; }
    .cons-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; padding-bottom: 4px; }
    .cons-tabs .tab { white-space: nowrap; flex-shrink: 0; }
    .cons-tabs-right { justify-content: space-between; }

    .cons-row {
        grid-template-columns: 70px 1fr;
        gap: 12px;
    }
    .cons-row-photo { width: 70px; border-radius: 50%; }
    .cons-row-right {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding-top: 12px;
        border-top: 1px solid var(--border-soft);
        text-align: left;
    }
    .cons-row-right .btn { flex-shrink: 0; }

    .cons-new-banner {
        flex-direction: column;
        text-align: center;
        padding: 18px;
    }
    .cons-new-banner .btn { width: 100%; }

    .planner-hero { padding: 20px; }
    .ph-photo { width: 130px; height: 130px; }
    .ph-info h2 { font-size: 1.3rem; }
    .ph-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
    .ph-stats li { padding: 10px; }
    .ph-stats strong { font-size: 1rem; }

    .change-planner-card { flex-direction: column; text-align: center; }
    .change-planner-card .btn { width: 100%; }

    .cons-modal-card { max-height: 95vh; }
    .cons-modal-body { padding: 18px; }
    .cons-modal-meta { grid-template-columns: 1fr; }
}

/* =========================================================================
   ============== TASK 1 — TOPBAR PERSISTENTE SPOSI + AI AGENT =============
   ========================================================================= */

/* ===== Topbar persistente (desktop/tablet) ===== */
.adm-topbar.sp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 4px 22px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.sp-greeting h2 {
    font-size: 1.7rem;
    margin-bottom: 4px;
    font-weight: 700;
    line-height: 1.25;
}
.sp-greeting p {
    color: var(--muted);
    font-size: 0.92rem;
}
.sp-greeting .hearts { color: var(--primary); }

.adm-topbar-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Search wrap */
.pl-search-wrap.topbar-search {
    position: relative;
    width: 280px;
}
.pl-search-wrap.topbar-search .search-ico {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}
.pl-search-wrap.topbar-search input.pl-search {
    width: 100%;
    height: 40px;
    padding: 8px 14px 8px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--white);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.pl-search-wrap.topbar-search input.pl-search:focus {
    border-color: var(--primary);
    background: var(--pink-soft);
}

/* Topbar generic icon button (notifiche) */
.adm-topbar .topbar-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.adm-topbar .topbar-btn:hover {
    background: var(--pink-soft);
    color: var(--primary);
    transform: translateY(-1px);
}
.adm-topbar .topbar-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

/* AI button in topbar (replica Planner) */
.adm-topbar .topbar-btn.ai-btn {
    width: auto;
    padding: 0 14px;
    gap: 6px;
    background: linear-gradient(135deg, #fce4ec, #ffe6f0);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
    height: 40px;
}
.adm-topbar .topbar-btn.ai-btn:hover {
    background: var(--primary);
    color: var(--white);
}
.ai-pill {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Micro-pulse dot per suggerimenti proattivi non letti */
.ai-pulse-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--white);
    box-shadow: 0 0 0 0 rgba(230, 0, 92, 0.55);
    animation: aiProactivePulse 1.8s ease-out infinite;
    display: none;
}
.adm-topbar .ai-btn[data-has-suggestions="true"] .ai-pulse-dot,
.ai-fab[data-has-suggestions="true"] .ai-pulse-dot {
    display: block;
}
@keyframes aiProactivePulse {
    0%   { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(230, 0, 92, 0.55); }
    70%  { transform: scale(1.04); box-shadow: 0 0 0 10px rgba(230, 0, 92, 0); }
    100% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(230, 0, 92, 0); }
}

/* Topbar profile pill */
.topbar-profile {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 14px 4px 4px;
    border-radius: var(--radius-pill);
    background: var(--white);
    border: 1px solid var(--border);
}
.topbar-profile .profile-pic {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}
.topbar-profile .profile-pic.couple-pic {
    background: linear-gradient(135deg, #fce4ec, #ec407a);
}
.topbar-profile div {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.topbar-profile strong {
    font-size: 0.85rem;
    color: var(--text);
}
.topbar-profile span {
    font-size: 0.72rem;
    color: var(--muted);
}

/* Su mobile la topbar persistente è nascosta — resta la mob-header */
@media (max-width: 767px) {
    .adm-topbar.sp-topbar { display: none; }
}
/* Su tablet stretto compatta */
@media (max-width: 1199px) {
    .pl-search-wrap.topbar-search { width: 200px; }
    .topbar-profile div { display: none; }
}
@media (max-width: 1023px) {
    .pl-search-wrap.topbar-search { display: none; }
    .sp-greeting h2 { font-size: 1.15rem; }
}

/* =========================================================================
   AI ASSISTANT FLOATING PANEL (replica Planner)
   ========================================================================= */

.ai-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 80;
}
.ai-panel {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 420px;
    max-width: calc(100vw - 32px);
    height: 580px;
    max-height: calc(100vh - 100px);
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 90;
    animation: aiSlideUp 0.25s ease;
}
.ai-panel[hidden],
.ai-overlay[hidden] { display: none !important; }
@keyframes aiSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ai-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-soft);
    background: linear-gradient(135deg, var(--pink-soft), var(--white));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    cursor: move;
    user-select: none;
}
.ai-head .ai-head-actions,
.ai-head .ai-head-actions * { cursor: pointer; }

.ai-head-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ai-icon-large {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #c2185b);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ai-head-title strong {
    display: block;
    font-size: 0.95rem;
}
.ai-online {
    color: var(--success);
    font-size: 0.72rem;
}
.ai-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ai-close,
.ai-minimize,
.ai-reset {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--muted);
    font-size: 1.4rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    border: 0;
}
.ai-close:hover,
.ai-minimize:hover,
.ai-reset:hover {
    background: var(--pink-light);
    color: var(--primary);
}

.ai-minimize .ai-icon-max { display: none; }
.ai-minimize .ai-icon-min { display: block; }

.ai-panel.is-minimized {
    height: auto !important;
    min-height: 0;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}
.ai-panel.is-minimized .ai-body,
.ai-panel.is-minimized .ai-input-wrap { display: none !important; }
.ai-panel.is-minimized .ai-head {
    border-bottom: 0;
    border-radius: var(--radius-xl);
}
.ai-panel.is-minimized .ai-minimize .ai-icon-min { display: none; }
.ai-panel.is-minimized .ai-minimize .ai-icon-max { display: block; }

.ai-panel.is-dragging {
    transition: none !important;
    animation: none !important;
    opacity: 0.96;
    box-shadow: 0 40px 100px rgba(15, 23, 42, 0.35);
    cursor: grabbing !important;
}
.ai-panel.is-dragging .ai-head { cursor: grabbing !important; }

.ai-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.ai-welcome h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}
.ai-welcome p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 18px;
}
.ai-welcome strong { color: var(--primary); }
.ai-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ai-sugg {
    text-align: left;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text);
    transition: background 0.15s ease, border-color 0.15s ease;
}
.ai-sugg:hover {
    border-color: var(--primary);
    background: var(--pink-soft);
}

/* AI messages */
.ai-msg {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.ai-msg.user { flex-direction: row-reverse; }
.ai-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ai-msg.assistant .ai-msg-avatar {
    background: linear-gradient(135deg, var(--primary), #c2185b);
    color: var(--white);
}
.ai-msg.user .ai-msg-avatar {
    background: var(--pink-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.78rem;
}
.ai-msg-body {
    max-width: 75%;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    line-height: 1.5;
}
.ai-msg.assistant .ai-msg-body {
    background: var(--pink-soft);
    border-bottom-left-radius: 4px;
}
.ai-msg.user .ai-msg-body {
    background: var(--primary);
    color: var(--white);
    border-bottom-right-radius: 4px;
}
.ai-msg-body p { margin-bottom: 6px; }
.ai-msg-body p:last-child { margin-bottom: 0; }
.ai-msg-body ul { margin-left: 18px; margin-top: 6px; }
.ai-msg-body strong { color: inherit; }

/* Typing indicator */
.ai-typing {
    display: inline-flex;
    gap: 4px;
    padding: 12px 14px;
}
.ai-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.5;
    animation: aiPulse 1.4s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiPulse {
    0%, 60%, 100% { transform: scale(0.7); opacity: 0.5; }
    30%           { transform: scale(1);   opacity: 1; }
}

.ai-input-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 16px;
    border-top: 1px solid var(--border-soft);
    background: var(--white);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.ai-input-wrap textarea {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 0.88rem;
    font-family: var(--font-sans);
    resize: none;
    min-height: 40px;
    max-height: 120px;
    outline: none;
    background: var(--bg);
}
.ai-input-wrap textarea:focus {
    border-color: var(--primary);
    background: var(--white);
}
.ai-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    flex-shrink: 0;
}
.ai-send:hover { background: var(--primary-dark); }
.ai-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* AI FAB (mobile) */
.ai-fab {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 84px; /* sopra la bottom-nav sposi */
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #c2185b);
    color: var(--white);
    border: none;
    box-shadow: 0 12px 30px rgba(230, 0, 92, 0.4);
    z-index: 70;
    transition: transform 0.2s ease;
    align-items: center;
    justify-content: center;
}
.ai-fab:hover { transform: scale(1.05); }
.ai-fab .ai-pulse-dot { top: 4px; right: 4px; }

/* Mobile AI panel */
@media (max-width: 767px) {
    .ai-panel {
        right: 12px !important;
        left: 12px !important;
        bottom: 12px !important;
        top: auto !important;
        width: auto !important;
        height: calc(100vh - 80px) !important;
        animation: aiSlideUp 0.25s ease;
    }
    .ai-head { cursor: default !important; }
    .ai-minimize { display: none !important; }
    .ai-panel.is-minimized .ai-body,
    .ai-panel.is-minimized .ai-input-wrap { display: flex !important; }
    .ai-fab { display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) {
    .ai-pulse-dot,
    .ai-typing span,
    .ai-panel { animation: none !important; }
}

/* Action cards (tool_use feedback) */
.ai-action-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}
.ai-action-card {
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--white);
}
.ai-action-card.success {
    color: var(--success);
    border-color: var(--success-soft);
    background: var(--success-soft);
}
.ai-action-card.error {
    color: var(--danger);
    border-color: var(--danger-soft);
    background: var(--danger-soft);
}

/* Cursor lampeggiante durante streaming SSE */
.ai-stream-cursor {
    display: inline-block;
    color: var(--primary);
    margin-left: 1px;
    animation: aiCursorBlink 0.9s ease-in-out infinite;
}
@keyframes aiCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .ai-stream-cursor { animation: none !important; }
}

/* =========================================================================
   ============== TASK 3 — AI OPERATING SYSTEM (Round 3) ===================
   ========================================================================= */

/* Vetro smerigliato sul pannello AI (override Round 1) */
.ai-panel.ai-panel-glass {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.18),
        0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
.ai-panel.ai-panel-glass .ai-head {
    background: linear-gradient(135deg, rgba(255, 224, 240, 0.6), rgba(255, 255, 255, 0.4));
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.ai-panel.ai-panel-glass .ai-input-wrap {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

/* Avatar AI in header con pulse "respiro" (gradient pulsante) */
.ai-icon-large.ai-icon-pulse {
    position: relative;
}
.ai-icon-large.ai-icon-pulse::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    opacity: 0;
    animation: aiAvatarBreathe 2.6s ease-out infinite;
}
@keyframes aiAvatarBreathe {
    0%   { transform: scale(0.85); opacity: 0.6; }
    70%  { transform: scale(1.18); opacity: 0; }
    100% { transform: scale(1.18); opacity: 0; }
}

/* Input row (allegati + mic + textarea + send) */
.ai-input-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}
.ai-input-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}
.ai-input-btn:hover {
    background: var(--pink-light);
    color: var(--primary);
}
.ai-input-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Microfono — stato registrazione */
.ai-mic-btn.is-recording {
    background: var(--primary);
    color: var(--white);
    width: auto;
    padding: 0 10px;
    gap: 6px;
    animation: aiMicPulse 1.4s ease-in-out infinite;
}
.ai-mic-btn.is-recording .ai-mic-icon { display: none; }
.ai-mic-btn.is-recording .ai-waveform { display: block; }
@keyframes aiMicPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 0, 92, 0.45); }
    50%      { box-shadow: 0 0 0 8px rgba(230, 0, 92, 0); }
}
.ai-waveform {
    background: transparent;
    border-radius: 4px;
}

.ai-input-hint {
    font-size: 0.68rem;
    color: var(--muted);
    margin: 0 4px;
    opacity: 0.7;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 480px) {
    .ai-input-hint { display: none; }
}

/* Allegati pending (chip rimovibili) */
.ai-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 8px;
    background: transparent;
}
.ai-attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px 5px 10px;
    background: var(--pink-soft);
    border: 1px solid var(--pink-light);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    color: var(--text);
    max-width: 200px;
}
.ai-attachment-chip .name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}
.ai-attachment-chip .size {
    color: var(--muted);
    font-size: 0.68rem;
}
.ai-attachment-chip .remove {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.08);
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ai-attachment-chip .remove:hover { background: var(--primary); color: var(--white); }
.ai-attachment-chip.uploading { opacity: 0.7; }
.ai-attachment-chip.error { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }

/* Drag-drop overlay (compare quando si trascina sopra il pannello) */
.ai-drop-overlay {
    position: absolute;
    inset: 60px 8px 70px;
    background: rgba(230, 0, 92, 0.08);
    border: 2px dashed var(--primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    pointer-events: none;
    animation: aiDropFadeIn 0.18s ease;
}
/* Fix: l'attributo hidden HTML deve davvero nascondere (sovrascrive display: flex sopra) */
.ai-drop-overlay[hidden] { display: none !important; }
.ai-drop-box {
    text-align: center;
    color: var(--primary);
    font-weight: 600;
}
.ai-drop-box p { margin-top: 8px; font-size: 0.88rem; }
@keyframes aiDropFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to   { opacity: 1; transform: scale(1); }
}

/* Action cards inline con pulsante "Annulla" entro 10s */
.ai-action-card {
    position: relative;
    overflow: hidden;
}
.ai-action-card.success .undo-btn {
    margin-left: auto;
    background: var(--white);
    color: var(--success);
    border: 1px solid var(--success);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}
.ai-action-card.success .undo-btn:hover { background: var(--success); color: var(--white); }
.ai-action-card.success {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ai-action-card.reverted {
    color: var(--muted);
    text-decoration: line-through;
    text-decoration-color: rgba(15,23,42,0.3);
    background: var(--bg);
    border-color: var(--border-soft);
}
.ai-action-card .undo-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    background: var(--success);
    width: 100%;
    transform-origin: left;
    animation: aiUndoCountdown 10s linear forwards;
}
@keyframes aiUndoCountdown {
    to { transform: scaleX(0); }
}

/* Toast errori in-panel */
.ai-toast {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 90px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--danger);
    color: var(--white);
    font-size: 0.82rem;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
    z-index: 5;
    animation: aiSlideUp 0.2s ease;
}

/* Focus visibile per accessibilità (WCAG AA) */
.ai-panel button:focus-visible,
.ai-panel textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .ai-icon-large.ai-icon-pulse::after,
    .ai-mic-btn.is-recording,
    .ai-action-card .undo-progress { animation: none !important; }
}

/* =========================================================================
   TASK 3 — Markdown rendering completo nelle bolle AI
   ========================================================================= */
.ai-msg-body h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 8px 0 4px;
    color: inherit;
}
.ai-msg-body h4 {
    font-size: 0.92rem;
    font-weight: 700;
    margin: 6px 0 3px;
    color: inherit;
}
.ai-msg-body ul,
.ai-msg-body ol {
    margin: 6px 0 6px 20px;
    padding: 0;
}
.ai-msg-body ul li { list-style: disc; }
.ai-msg-body ol li { list-style: decimal; }
.ai-msg-body ul li,
.ai-msg-body ol li {
    margin-bottom: 3px;
    line-height: 1.45;
}
.ai-msg-body em { font-style: italic; }
.ai-msg-body code {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.82em;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.08);
    color: inherit;
}
.ai-msg.user .ai-msg-body code { background: rgba(255, 255, 255, 0.2); }
.ai-msg-body pre.ai-code {
    position: relative;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-sm);
    padding: 28px 12px 10px;
    margin: 8px 0;
    overflow-x: auto;
    font-size: 0.78rem;
    line-height: 1.4;
}
.ai-msg-body pre.ai-code code {
    background: transparent;
    padding: 0;
    font-size: inherit;
    color: var(--text);
    white-space: pre;
}
.ai-msg-body pre.ai-code .code-lang {
    position: absolute;
    top: 4px;
    right: 8px;
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
}
.ai-msg.user .ai-msg-body pre.ai-code {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}
.ai-msg.user .ai-msg-body pre.ai-code code { color: var(--white); }
.ai-msg-body a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
.ai-msg.user .ai-msg-body a { color: var(--white); }
.ai-msg-body a:hover { text-decoration-thickness: 2px; }

/* Typing label testuale (Task 3) */
.ai-typing-label {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-right: 6px;
    vertical-align: middle;
}

/* Action card deep link al modulo (Task 3) */
.ai-action-card .action-deep-link {
    margin-left: auto;
    margin-right: 8px;
    font-size: 0.74rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
    flex-shrink: 0;
}
.ai-action-card .action-deep-link:hover {
    background: var(--pink-soft);
    text-decoration: underline;
}
.ai-action-card .action-card-label { flex: 1; min-width: 0; }
.ai-action-card.success { flex-wrap: wrap; }

/* Swipe-down handle visivo + dragging state mobile (Task 3) */
@media (max-width: 767px) {
    .ai-head {
        position: relative;
        padding-top: 22px; /* spazio per la grab handle */
        touch-action: none;
        cursor: default;
    }
    .ai-head::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        border-radius: 2px;
        background: rgba(15, 23, 42, 0.25);
        transition: background 0.15s ease, width 0.15s ease;
    }
    .ai-head:active::before {
        background: var(--primary);
        width: 56px;
    }
    .ai-panel.is-swiping {
        transition: none !important;
        box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.25);
    }
}

/* Vendor cards inline marketplace (Round 6) */
.vendor-cards {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
}
.vendor-cards-grid { flex-wrap: wrap; overflow-x: visible; }
.vendor-cards-list { flex-direction: column; }
.vendor-card {
    flex: 0 0 220px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px;
    box-shadow: var(--shadow-sm);
    scroll-snap-align: start;
}
.vendor-card .vc-img {
    width: 100%;
    height: 100px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    background-color: var(--pink-soft);
}
.vendor-card .vc-img-fallback {
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700; color: var(--primary);
    background: linear-gradient(135deg, var(--pink-soft), var(--pink-light));
}
.vendor-card h4 { font-size: 0.92rem; margin: 0 0 2px; }
.vendor-card .vc-meta { font-size: 0.74rem; color: var(--muted); margin-bottom: 4px; }
.vendor-card .vc-price { font-size: 0.84rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.vendor-card .vc-rating { color: #f59e0b; margin-left: 4px; }
.vendor-card .vc-actions { display: flex; flex-direction: column; gap: 4px; }
.vendor-card .vc-action {
    font-size: 0.74rem;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    text-align: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.vendor-card .vc-action:hover { background: var(--pink-soft); border-color: var(--primary); color: var(--primary); }

/* Speak button (Round 4 TTS) */
.ai-speak-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--muted);
    align-self: flex-end;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}
.ai-speak-btn:hover { background: var(--pink-light); color: var(--primary); }
.ai-speak-btn.is-playing {
    background: var(--primary);
    color: var(--white);
    animation: aiMicPulse 1.4s ease-in-out infinite;
}

/* Mobile: drop overlay full-panel */
@media (max-width: 767px) {
    .ai-drop-overlay { inset: 60px 12px 80px; }
}
