/* ── Reset & Base ──────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html,
body {
    height: 100%;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f4efe6;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
body {
    display: flex;
    flex-direction: column;
}

/* ── Variables ────────────────────────────────────────────────── */
:root {
    --primary: #1d6359;
    --primary-dark: #154a42;
    --primary-light: #e8f0ed;
    --bg: #f4efe6;
    --surface: #ffffff;
    --text: #1d6359;
    --text-secondary: #7a8f8a;
    --border: #d5d9ce;
    --shadow: 0 2px 12px rgba(29, 99, 89, 0.08);
    --radius: 12px;
    --radius-sm: 8px;
}

/* ── Landing Page ────────────────────────────────────────────── */
.landing {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(244, 239, 230, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.landing-content {
    text-align: center;
    padding: 40px 32px;
    max-width: 340px;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(29, 99, 89, 0.08);
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.landing-logo {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.landing-logo-img {
    width: 100px;
    height: auto;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}
.landing-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.landing-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}
.landing-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.landing-actions .btn {
    padding: 14px;
    font-size: 15px;
    border-radius: 14px;
    border: 2px solid var(--primary);
    background: rgba(255, 255, 255, 0.5);
    color: var(--primary);
}
.landing-actions .btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.landing-actions .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(29, 99, 89, 0.3);
}
.landing-actions .btn:not(.btn-primary):hover {
    background: var(--primary);
    color: #fff;
}
.landing-footer {
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-secondary);
}
.landing-waves {
    display: none;
}

/* ── Header ───────────────────────────────────────────────────── */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    height: 52px;
    background: linear-gradient(135deg, #1d6359 0%, #154a42 100%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    -webkit-user-select: none;
    user-select: none;
    box-shadow: 0 2px 12px rgba(29, 99, 89, 0.3);
}
.app-title {
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.app-logo {
    height: 34px;
    width: auto;
    display: block;
}
.header-search {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0 10px;
    transition: background 0.2s;
    max-width: 400px;
    min-width: 0;
    flex-shrink: 1;
}
.header-search:focus-within {
    background: rgba(255, 255, 255, 0.35);
}
.header-search-icon {
    font-size: 14px;
    margin-right: 6px;
    opacity: 0.7;
    flex-shrink: 0;
}
.header-search-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 13px;
    font-family: inherit;
    color: #fff;
    padding: 8px 0;
    min-width: 30px;
}
.header-search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}
.header-btn-text {
    width: auto;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    padding: 6px 0;
    height: auto;
    background: none;
    border: none;
    white-space: nowrap;
    transition: opacity 0.2s;
    position: relative;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}
.header-btn-text:hover {
    opacity: 0.85;
    transform: none;
}
.header-btn-login::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
}
.header-btn-register {
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 6px 18px;
}
.header-btn-register:hover {
    background: rgba(255, 255, 255, 0.15);
    opacity: 1;
}
.header-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #fff;
}
.header-btn:hover,
.header-btn:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* ── Dropdown ──────────────────────────────────────────────────── */
.dropdown {
    position: fixed;
    top: 56px;
    right: 12px;
    z-index: 2001;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow:
        var(--shadow),
        0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 14px 18px;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: slideDown 0.15s ease;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.dropdown #dropdownNickname {
    font-weight: 600;
    color: var(--primary);
    font-size: 14px;
}

/* ── Map ───────────────────────────────────────────────────────── */
#map {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 56px;
    height: auto;
    width: 100%;
}
.leaflet-attribution-flag {
    display: none !important;
}
.leaflet-control-zoom a {
    background: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
    box-shadow: var(--shadow) !important;
}

/* ── Bottom Navigation ─────────────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    height: 64px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    padding: 4px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 6px 0 8px;
    transition: all 0.15s;
    position: relative;
    color: var(--text-secondary);
    border-radius: 0;
}
.nav-item:hover {
    color: var(--text);
}
.nav-item.active {
    color: var(--primary);
}
.nav-item.active::after {
    content: "";
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 3px 3px;
}
.nav-icon {
    font-size: 22px;
    line-height: 1;
}
.nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.nav-add .nav-icon {
    font-size: 26px;
}
.nav-add.active::after {
    background: var(--primary-dark);
}

#map {
    bottom: 64px;
}

/* ── Overlay (Search) ──────────────────────────────────────────── */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.overlay-header {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 16px;
    color: var(--text);
    flex-shrink: 0;
    background: var(--surface);
}
.overlay-header .header-btn {
    background: none;
    color: var(--text);
    font-size: 20px;
    width: 40px;
    height: 40px;
}
.overlay-header .header-btn:hover {
    background: var(--border);
}
.overlay-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    -webkit-overflow-scrolling: touch;
}
.overlay-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    margin-bottom: 14px;
    background: var(--surface);
    transition: border-color 0.2s;
}
.overlay-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

/* ── Search Components ─────────────────────────────────────────── */
.search-dates {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}
.search-dates div {
    flex: 1;
}
.search-dates label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.search-dates input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: var(--surface);
    transition: border-color 0.2s;
}
.search-dates input[type="date"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.search-details {
    margin-bottom: 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 13px;
    background: var(--surface);
    transition: border-color 0.2s;
}
.search-details[open] {
    border-color: var(--primary);
}
.search-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    padding: 4px 0;
    font-size: 14px;
}

.search-photo-upload {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 8px;
}
.search-photo-upload input[type="file"] {
    flex: 1;
    font-size: 13px;
}
.search-photo-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    display: none;
    background: var(--bg);
}
.search-radius {
    margin-bottom: 4px;
}
.search-radius label {
    font-size: 12px;
    color: var(--text-secondary);
}
.search-radius input[type="range"] {
    width: 100%;
    margin-top: 6px;
    accent-color: var(--primary);
}
.search-geo-status {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s;
}
.search-geo-status:hover {
    color: var(--primary);
}

/* ── Search Results ────────────────────────────────────────────── */
.search-results {
    margin-top: 16px;
}
.search-stats {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.search-result-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
    border-radius: var(--radius-sm);
    padding: 10px 8px;
    margin: 0 -8px;
}
.search-result-item:hover,
.search-result-item:active {
    background: var(--primary-light);
}
.search-result-item:last-child {
    border-bottom: none;
}
.search-result-img {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.search-result-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.search-result-body {
    flex: 1;
    min-width: 0;
}
.search-result-date {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 3px;
    font-weight: 500;
}
.search-result-note {
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-result-meta {
    font-size: 11px;
    color: #aaa;
    margin-top: 3px;
}
.sim-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 10px;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
    padding: 12px 20px;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.6);
    color: var(--primary);
    transition: all 0.2s;
    text-align: center;
    font-weight: 600;
}
.btn:hover,
.btn:active {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 99, 89, 0.2);
}
.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover,
.btn-primary:active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 99, 89, 0.3);
}
.btn-block {
    width: 100%;
    margin-bottom: 10px;
}

/* ── Modal ────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}
.modal {
    background: var(--surface);
    border-radius: 20px;
    padding: 28px 24px 20px;
    max-width: 380px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.2s ease;
}
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover {
    background: var(--border);
    color: var(--text);
}

/* Login compatto in alto a destra nel modal trial */
.trial-login {
    position: absolute;
    top: 12px;
    right: 56px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition:
        color 0.2s,
        background 0.2s;
}

.trial-login:hover {
    color: var(--text);
    background: var(--bg);
}

/* Zampette decorative sotto il pulsante del trial */
.trial-paws {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    letter-spacing: 8px;
    opacity: 0.4;
    user-select: none;
}
.modal h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text);
    font-weight: 700;
}

/* ── Form ─────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    background: var(--bg);
    transition: all 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}
.form-group textarea {
    resize: vertical;
    min-height: 70px;
}
.form-group .photo-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    display: none;
    background: var(--bg);
    box-shadow: inset 0 0 0 2px var(--border);
}
.form-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    display: none;
    font-weight: 600;
}

/* ── Cat Popup (Leaflet) ──────────────────────────────────────── */
.cat-popup {
    max-width: 260px;
}
.cat-popup img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.cat-popup h3 {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--text);
    font-weight: 700;
}
.cat-popup .cat-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.cat-popup .cat-note {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
}
.cat-popup .cat-user {
    font-size: 11px;
    color: #aaa;
    margin-top: 8px;
    font-style: italic;
}
.cat-found-btn {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.cat-found-btn:hover {
    background: var(--primary);
    color: #fff;
}
.cat-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}
.cat-action-btn {
    display: block;
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    text-align: center;
}
.cat-delete-btn {
    border: 1px solid #e74c3c;
    background: none;
    color: #e74c3c;
}
.cat-delete-btn:hover {
    background: #e74c3c;
    color: #fff;
}
.leaflet-popup-content-wrapper {
    border-radius: var(--radius) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}
.leaflet-popup-content {
    margin: 14px !important;
}
.leaflet-popup-tip {
    box-shadow: none !important;
}

/* ── Nearby List ─────────────────────────────────────────────── */
.nearby-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.nearby-card {
    display: flex;
    gap: 14px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.nearby-card:hover,
.nearby-card:active {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(230, 126, 34, 0.12);
}
.nearby-card-img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.nearby-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.nearby-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.nearby-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.nearby-card-meta {
    font-size: 12px;
    color: var(--text-secondary);
}
.nearby-card-user {
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.nearby-dist {
    color: var(--primary);
    font-weight: 600;
    margin-left: auto;
}
.nearby-count {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* ── Profile ───────────────────────────────────────────────────── */
.profile-section {
    text-align: center;
    padding-top: 20px;
}
.profile-avatar {
    font-size: 48px;
    margin-bottom: 12px;
}
.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.profile-email {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.profile-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}
.profile-stat {
    text-align: center;
}
.profile-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}
.profile-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 280px;
    margin: 0 auto;
}

/* ── Profile Gallery ─────────────────────────────────────────── */
.profile-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 20px 0;
}
.profile-cat-card {
    cursor: pointer;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    border: none;
    transition: all 0.2s;
    aspect-ratio: 1;
    width: 100%;
    max-width: 80px;
    margin: 0 auto;
    position: relative;
}
.profile-cat-card:hover {
    border-color: var(--primary);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(29, 99, 89, 0.15);
}
.profile-cat-img {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}
.profile-cat-img-src {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.profile-cat-card:hover .profile-cat-img-src {
    transform: scale(1.12);
}

/* Clip path a forma di gatto */
.profile-cat-clip {
    clip-path: url(#catClipPath);
}
.cat-missing .profile-cat-clip {
    clip-path: url(#pawClipPath);
}

/* Bordo: come contorno della forma */
.cat-sighted {
    border: none;
    filter: drop-shadow(0 0 0 2px var(--primary))
        drop-shadow(0 2px 6px rgba(29, 99, 89, 0.15));
}
.cat-missing {
    border: none;
    filter: drop-shadow(0 0 0 2px #e67e22)
        drop-shadow(0 2px 6px rgba(230, 126, 34, 0.15));
}
.cat-sighted:hover {
    filter: drop-shadow(0 0 0 2px var(--primary))
        drop-shadow(0 4px 12px rgba(29, 99, 89, 0.25));
    transform: scale(1.08);
}
.cat-missing:hover {
    filter: drop-shadow(0 0 0 2px #d35400)
        drop-shadow(0 4px 12px rgba(230, 126, 34, 0.25));
    transform: scale(1.08);
}

/* Badge grande e visibile sopra */
.profile-cat-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
}
.badge-sighted {
    background: var(--primary);
}
.badge-missing {
    background: #e67e22;
}

.profile-cat-info {
    display: none;
}
.profile-cat-card:hover .profile-cat-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: rgba(29, 99, 89, 0.75);
    backdrop-filter: blur(4px);
}
.profile-cat-icon {
    font-size: 11px;
}
.profile-cat-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 14px;
}
.profile-guest {
    padding-top: 20px;
}
.profile-guest h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text);
}
.profile-guest p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ── Add Mode Hint ───────────────────────────────────────────── */
.add-hint {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    background: rgba(29, 99, 89, 0.92);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(29, 99, 89, 0.3);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ── Language Selector ─────────────────────────────────────────── */
.lang-selector {
    position: fixed;
    bottom: 74px;
    right: 12px;
    z-index: 1500;
}
.lang-selector select {
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s;
}
.lang-selector select:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
