/* 
   STANOTTE - App Styles
   Login, Signup & Webapp - Luxury Gold
*/

:root {
    --color-bg: #FFFFFF;
    --color-surface: #F9F9F9;
    --color-surface-hover: #F0F0F0;
    --color-accent: #D4AF37;
    --color-accent-dim: rgba(212, 175, 55, 0.1);
    --color-text: #1A1A1A;
    --color-text-dim: #666666;
    --color-white: #FFFFFF;
    --color-black: #000000;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

.logo-serif {
    font-family: var(--font-serif);
    font-weight: 700;
    letter-spacing: 2px;
}

.logo-serif span {
    color: var(--color-accent);
    font-weight: 400;
}

/* Site Logo (immagine) - grandezza omogenea ovunque */
.logo-wrap {
    display: inline-block;
    line-height: 0;
}

.site-logo,
.site-logo-header,
.site-logo-auth {
    display: block;
    height: 42px;
    width: auto;
    object-fit: contain;
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
}

.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    padding: 3rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--color-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.15);
    position: relative;
    z-index: 1;
}

@media (min-width: 769px) {
    .auth-card {
        padding: 4rem 4rem;
        max-width: 520px;
    }
}

.auth-logo {
    display: inline-block;
    color: var(--color-black);
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
}

.auth-logo:hover {
    color: var(--color-accent);
}

.auth-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--color-black);
}

.auth-subtitle {
    color: var(--color-text-dim);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.form-group input {
    padding: 0.85rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-dim);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-dim);
    cursor: pointer;
}

.checkbox-label input {
    accent-color: var(--color-accent);
}

.checkbox-label.full-width {
    margin: -0.25rem 0;
}

.checkbox-label a {
    color: var(--color-accent);
    text-decoration: underline;
}

.forgot-link {
    font-size: 0.85rem;
    color: var(--color-accent);
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-auth {
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-black);
}

.btn-primary:hover {
    background: #c4a030;
    transform: translateY(-1px);
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--color-text-dim);
}

.auth-footer a {
    color: var(--color-accent);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.06) 0%, rgba(212, 175, 55, 0.02) 50%, rgba(212, 175, 55, 0.04) 100%);
    z-index: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .auth-wrapper {
        padding: 1.5rem 1rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
        box-shadow: none;
        border: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ========== WEBAPP HOME ========== */
.app-body {
    background: var(--color-bg);
    min-height: 100vh;
}

/* Top Bar */
.app-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--color-white);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--color-accent);
}

.app-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.app-logo {
    color: var(--color-white);
    font-size: 1.4rem;
}

.app-logo:hover .site-logo {
    opacity: 0.9;
}

.app-logo .site-logo {
    transition: opacity 0.2s;
}

.app-nav {
    display: flex;
    gap: 2rem;
}

.app-nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.app-nav-link:hover,
.app-nav-link.active {
    color: var(--color-accent);
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-messages,
.app-notify {
    position: relative;
    color: var(--color-white);
    padding: 0.4rem;
}

.app-messages:hover,
.app-notify:hover {
    color: var(--color-accent);
}

.app-messages.active {
    color: var(--color-accent);
}

.msg-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--color-accent);
    color: var(--color-black);
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notify-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--color-accent);
    color: var(--color-black);
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-profile,
.app-profile-trigger {
    display: block;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.app-profile-trigger:hover .profile-avatar {
    border-color: rgba(212, 175, 55, 0.8);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-accent);
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Profile Dropdown */
.profile-dropdown-wrap {
    position: relative;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 340px;
    max-width: calc(100vw - 2rem);
    background: var(--color-white);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.06);
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1100;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.profile-dropdown.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-arrow {
    position: absolute;
    top: -8px;
    right: 24px;
    width: 16px;
    height: 16px;
    background: var(--color-white);
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.06);
}

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.profile-dropdown-icon {
    color: var(--color-accent);
    flex-shrink: 0;
}

.profile-dropdown-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.profile-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
    min-width: 0;
}

.profile-dropdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    padding: 0.6rem 0.4rem;
    background: var(--color-surface);
    border-radius: 12px;
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    text-align: center;
    transition: background 0.2s, color 0.2s;
    min-width: 0;
    overflow: hidden;
}

.profile-dropdown-item span {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

.profile-dropdown-item:hover,
.profile-dropdown-item.active {
    background: var(--color-accent-dim);
    color: #b8962e;
}

.profile-dropdown-item svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.profile-dropdown-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    color: var(--color-text-dim);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
}

.profile-dropdown-logout:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-text);
}

/* Sub Bar */
.app-subbar {
    background: var(--color-surface);
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.app-subbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.app-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--color-text-dim);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-text-dim);
}

.stat-dot.green {
    background: #2ecc71;
    box-shadow: 0 0 6px rgba(46, 204, 113, 0.6);
}

.app-search {
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--color-white);
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    padding: 0.6rem 1.25rem;
}

.app-search svg {
    color: var(--color-text-dim);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9rem;
    font-family: var(--font-sans);
}

.search-input::placeholder {
    color: var(--color-text-dim);
}

/* Search filter */
.search-filter-wrap {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-filter-wrap .app-search {
    max-width: none;
}

.search-filter-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: var(--color-text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
}

.search-filter-btn:hover {
    color: var(--color-accent);
    background: var(--color-accent-dim);
}

.search-filter-btn.active {
    color: var(--color-accent);
}

.search-filter-btn .filter-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--color-accent);
    color: var(--color-black);
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 280px;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.06);
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1000;
}

.search-filter-dropdown.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-filter-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--color-text);
}

.search-filter-dropdown-inner .filter-row {
    margin-bottom: 0.85rem;
}

.search-filter-dropdown-inner .filter-row label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.35rem;
}

.search-filter-dropdown-inner .filter-row input[type="text"],
.search-filter-dropdown-inner .filter-row select {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: var(--font-sans);
}

.search-filter-dropdown-inner .filter-row input:focus,
.search-filter-dropdown-inner .filter-row select:focus {
    outline: none;
    border-color: var(--color-accent);
}

.search-filter-dropdown-inner .filter-row-check label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0;
}

.search-filter-dropdown-inner .filter-row-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.filter-reset {
    padding: 0.6rem 1rem;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-dim);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.filter-reset:hover {
    border-color: var(--color-text-dim);
    color: var(--color-text);
}

.filter-apply {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .search-filter-dropdown {
        left: 0;
        right: 0;
        min-width: 0;
        width: calc(100vw - 2rem);
        max-width: 320px;
    }
}

/* Layout */
.app-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Layout con sidebar pubblicitarie */
.app-layout-with-sidebars {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 1.5rem;
    align-items: start;
}

.app-sidebar {
    position: sticky;
    top: calc(120px + 1.5rem);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sidebar-ad {
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.15);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sidebar-ad:hover {
    border-color: rgba(212, 175, 55, 0.35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.sidebar-ad-link {
    display: block;
    line-height: 0;
}

.sidebar-ad-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Banner lunghi - mantengono proporzioni naturali */
.sidebar-ad-tall {
    flex-shrink: 0;
}

/* Main Content */
.app-main {
    min-width: 0;
}

/* Stories */
.stories-section {
    margin-bottom: 2rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.stories-scroll {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stories-scroll::-webkit-scrollbar {
    display: none;
}

.story-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.story-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent) 0%, #c4a030 100%);
    padding: 3px;
    box-sizing: border-box;
}

.story-item:not(.create) .story-ring {
    background: linear-gradient(135deg, var(--color-accent), #c4a030);
}

.story-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: var(--color-white);
}

.story-item.create .story-ring {
    background: var(--color-accent-dim);
    border: 2px dashed var(--color-accent);
}

.story-add {
    font-size: 1.75rem;
    color: var(--color-accent);
    font-weight: 300;
    line-height: 1;
}

.story-label {
    font-size: 0.75rem;
    color: var(--color-text-dim);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.last-badge {
    font-size: 0.7rem;
    color: var(--color-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Last - Anteprima su home (dopo Radar) */
.last-preview-section {
    margin-bottom: 2rem;
}

.last-preview-desc {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    margin-bottom: 1.25rem;
}

.last-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.last-post-card {
    display: block;
    padding: 1.25rem;
    background: var(--color-surface);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.last-post-card:hover {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.last-post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.last-post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-accent);
}

.last-post-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.last-post-meta strong {
    font-size: 0.95rem;
}

.last-post-time {
    font-size: 0.75rem;
    color: var(--color-accent);
    font-weight: 600;
}

.last-post-text {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.last-preview-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
}

.last-preview-link:hover {
    text-decoration: underline;
}

/* Last - Pagina dedicata bacheca */
.app-main-last {
    padding-bottom: 2rem;
}

.last-section-header {
    flex-wrap: wrap;
    gap: 1rem;
}

.last-desc {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    margin-top: 0.25rem;
}

.last-btn-create {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    background: var(--color-accent);
    color: var(--color-black);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 10px;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: opacity 0.2s, transform 0.2s;
}

.last-btn-create:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.last-btn-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.last-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.last-post-card-full {
    padding: 1.5rem;
    background: var(--color-surface);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.last-post-card-full:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.last-post-card-full .last-post-header {
    margin-bottom: 1rem;
}

.last-post-card-full .last-post-avatar {
    width: 52px;
    height: 52px;
}

.last-post-location {
    font-size: 0.8rem;
    color: var(--color-text-dim);
}

.last-post-card-full .last-post-text {
    -webkit-line-clamp: unset;
    margin-bottom: 1.25rem;
}

.last-post-btn-contact {
    width: 100%;
    padding: 10px 20px;
    background: var(--color-accent);
    color: var(--color-black);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
}

.last-post-btn-contact:hover {
    opacity: 0.9;
    background: #c4a030;
}

/* Radar - Mappa mondo stile Snapchat */
.radar-section {
    margin-bottom: 2rem;
}

.radar-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-dim);
    font-weight: 400;
}

.radar-map-wrapper {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.radar-map-wrapper.radar-map-snapchat {
    min-height: 420px;
}

.radar-map-container {
    width: 100%;
    height: 420px;
    z-index: 1;
}

/* Leaflet stile chiaro */
.radar-map-snapchat .leaflet-container {
    background: #ffffff;
    font-family: inherit;
}

.radar-map-snapchat .leaflet-tile-pane {
    filter: none;
}

.radar-map-snapchat .leaflet-control-zoom {
    border: none !important;
}

.radar-map-snapchat .leaflet-control-zoom a {
    background: #ffffff !important;
    color: var(--color-accent) !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 20px !important;
}

.radar-map-snapchat .leaflet-control-zoom a:hover {
    background: rgba(212, 175, 55, 0.12) !important;
}

.radar-map-snapchat .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.9) !important;
    font-size: 10px;
    color: rgba(0, 0, 0, 0.5);
}

/* Wrapper marker Leaflet */
.radar-marker-wrapper {
    background: transparent !important;
    border: none !important;
}

/* User marker avatar - cerchio con immagine profilo dentro */
.radar-user-marker {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--color-accent);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--color-surface);
}

.radar-user-marker:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(212, 175, 55, 0.3);
}

.radar-user-marker img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.radar-user-marker.online::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid var(--color-surface);
}

/* Bottoni mappa */
.radar-btn-center {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #ffffff;
    color: var(--color-accent);
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.radar-btn-center:hover {
    background: rgba(212, 175, 55, 0.12);
    transform: scale(1.02);
}

/* Modal profilo */
.radar-profile-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.radar-profile-modal.visible {
    opacity: 1;
    visibility: visible;
}

.radar-profile-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.radar-profile-card {
    position: relative;
    width: 90%;
    max-width: 340px;
    background: var(--color-surface);
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.radar-profile-modal.visible .radar-profile-card {
    transform: scale(1);
}

.radar-profile-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.radar-profile-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.radar-profile-content {
    padding: 1.5rem;
}

.radar-profile-content .profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-accent);
    margin-bottom: 1rem;
}

.radar-profile-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.radar-profile-content .profile-location {
    color: var(--color-text-dim);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.radar-profile-content .profile-badges {
    display: flex;
    gap: 8px;
    padding: 0.5rem 0;
}

.radar-profile-content .profile-badges span {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.radar-profile-content .profile-badges .vip {
    background: rgba(212, 175, 55, 0.2);
    color: var(--color-accent);
}

.radar-profile-content .profile-badges .verified {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.radar-profile-content .profile-badges .online {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.radar-profile-content .profile-badges .online::before {
    content: '● ';
    font-size: 0.7rem;
}

.radar-profile-content .profile-cta {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: 12px 20px;
    background: var(--color-accent);
    color: var(--color-black);
    text-align: center;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}

.radar-profile-content .profile-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Profiles Grid 4:5 */
.profiles-section {
    margin-top: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.section-link {
    font-size: 0.9rem;
    color: var(--color-accent);
    font-weight: 600;
}

.section-link:hover {
    text-decoration: underline;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.profile-card {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.profile-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow);
}

.profile-img-wrap {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.profile-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.profile-badge.vip {
    background: var(--color-accent);
    color: var(--color-black);
}

.profile-badge.verified {
    background: #2ecc71;
    color: white;
    padding: 0.2rem 0.4rem;
}

.profile-status {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--color-white);
    background: var(--color-text-dim);
}

.profile-status.online {
    background: #2ecc71;
    box-shadow: 0 0 6px rgba(46, 204, 113, 0.6);
}

.profile-info {
    padding: 0.75rem 1rem;
}

.profile-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--color-text);
}

.profile-location {
    font-size: 0.75rem;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile Page - La Mia Pagina */
.app-main-profile {
    padding-bottom: 3rem;
}

.profile-page-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.profile-page-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-accent);
}

.profile-page-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-page-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.profile-page-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-dim);
}

.profile-page-header-simple {
    flex-direction: column;
    align-items: flex-start;
}

.profile-page-header-simple .profile-page-title {
    margin-bottom: 0.5rem;
}

.profile-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.profile-nav-link {
    padding: 0.5rem 1rem;
    background: var(--color-surface);
    color: var(--color-text-dim);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.profile-nav-link:hover,
.profile-nav-link.active {
    background: var(--color-accent-dim);
    color: var(--color-accent);
}

.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-section {
    padding: 1.5rem;
    background: var(--color-surface);
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.profile-section-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.profile-section-desc {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    margin-bottom: 1rem;
}

.profile-section-placeholder {
    padding: 2rem;
    background: var(--color-bg);
    border-radius: 10px;
    border: 1px dashed rgba(212, 175, 55, 0.3);
    color: var(--color-text-dim);
    font-size: 0.9rem;
}

/* Profile forms */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 560px;
}

.profile-form .form-group textarea {
    padding: 0.85rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-sans);
    min-height: 120px;
    resize: vertical;
    transition: var(--transition);
}

.profile-form .form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-dim);
}

.profile-form .form-group select {
    padding: 0.85rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-sans);
    width: 100%;
    background: #fff;
    transition: var(--transition);
}

.profile-form .form-group select:focus {
    outline: none;
    border-color: var(--color-accent);
}

.profile-form .btn-save {
    padding: 0.85rem 1.5rem;
    background: var(--color-accent);
    color: var(--color-black);
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    align-self: flex-start;
    transition: var(--transition);
}

.profile-form .btn-save:hover {
    background: #c4a030;
    transform: translateY(-1px);
}

/* Upload area */
.upload-zone {
    border: 2px dashed rgba(212, 175, 55, 0.4);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    background: var(--color-accent-dim);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover {
    border-color: var(--color-accent);
    background: rgba(212, 175, 55, 0.08);
}

.upload-zone p {
    color: var(--color-text-dim);
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
}

/* List items (amici, blacklist, visite) */
.profile-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.06);
}

.profile-list-item img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-list-empty {
    padding: 2rem;
    text-align: center;
    color: var(--color-text-dim);
    background: var(--color-surface);
    border-radius: 10px;
}

/* Responsive - Profile dropdown */
@media (max-width: 400px) {
    .profile-dropdown {
        width: min(340px, calc(100vw - 1.5rem));
        right: 0;
        left: auto;
    }

    .profile-dropdown-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .app-layout-with-sidebars {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        display: none;
    }
}

@media (max-width: 992px) {
    .app-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .app-header-inner {
        flex-wrap: wrap;
    }

    .app-subbar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .app-search {
        max-width: none;
    }

    .stories-scroll {
        gap: 1rem;
    }

    .story-ring {
        width: 100px;
        height: 100px;
    }

    .story-label {
        max-width: 80px;
    }

    .profiles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Chat / Messaggi */
.app-body-chat {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.app-body-chat .chat-layout {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.chat-sidebar {
    width: 320px;
    min-width: 280px;
    background: var(--color-bg);
    border-right: 1px solid rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.chat-sidebar-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--color-text);
}

.chat-search {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--font-sans);
    background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 0.75rem center;
}

.chat-search:focus {
    outline: none;
    border-color: var(--color-accent);
}

.chat-conversations {
    flex: 1;
    overflow-y: auto;
}

.chat-conv-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.2s;
}

.chat-conv-item:hover {
    background: var(--color-surface);
}

.chat-conv-item.active {
    background: var(--color-accent-dim);
    border-left: 3px solid var(--color-accent);
}

.chat-conv-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-conv-info {
    flex: 1;
    min-width: 0;
    position: relative;
}

.chat-conv-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.2rem;
}

.chat-conv-top strong {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-conv-time {
    font-size: 0.75rem;
    color: var(--color-text-dim);
    flex-shrink: 0;
}

.chat-conv-preview {
    font-size: 0.85rem;
    color: var(--color-text-dim);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-conv-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--color-accent);
    color: var(--color-black);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--color-surface);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--color-bg);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.chat-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--color-text);
}

.chat-user:hover {
    color: var(--color-accent);
}

.chat-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-user-info {
    display: flex;
    flex-direction: column;
}

.chat-user-info strong {
    font-size: 1rem;
}

.chat-user-status {
    font-size: 0.8rem;
    color: #27ae60;
}

.chat-actions {
    display: flex;
    gap: 0.5rem;
}

.chat-action-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--color-surface);
    border-radius: 8px;
    cursor: pointer;
    color: var(--color-text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.chat-action-btn:hover {
    background: var(--color-accent-dim);
    color: var(--color-accent);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-msg {
    display: flex;
    gap: 0.75rem;
    max-width: 75%;
}

.chat-msg-me {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg-them {
    align-self: flex-start;
}

.chat-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-msg-me .chat-msg-avatar {
    display: none;
}

.chat-msg-bubble {
    padding: 0.85rem 1.1rem;
    border-radius: 16px;
    background: var(--color-bg);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.chat-msg-me .chat-msg-bubble {
    background: var(--color-accent);
    color: var(--color-black);
}

.chat-msg-bubble p {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.chat-msg-time {
    font-size: 0.7rem;
    color: var(--color-text-dim);
}

.chat-msg-me .chat-msg-time {
    color: rgba(0,0,0,0.5);
}

.chat-input-wrap {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--color-bg);
    border-top: 1px solid rgba(0,0,0,0.06);
}

.chat-input {
    flex: 1;
    padding: 0.9rem 1.25rem;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 1rem;
    font-family: var(--font-sans);
    transition: border-color 0.2s;
}

.chat-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.chat-send {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--color-accent);
    color: var(--color-black);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s;
}

.chat-send:hover {
    background: #c4a030;
    transform: scale(1.05);
}

.chat-back {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 0.5rem;
}

.chat-back:hover {
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .chat-layout {
        flex-direction: column;
    }

    .chat-sidebar {
        width: 100%;
        min-width: 0;
        flex: 0 0 auto;
        max-height: 50vh;
    }

    .chat-main {
        flex: 1;
        min-height: 300px;
    }

    .chat-back {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .chat-msg {
        max-width: 90%;
    }
}
