/*
Theme Name: PetsGo
Theme URI: https://petsgo.it
Author: PetsGo Tech Lead
Author URI: https://petsgo.it
Description: Tema Premium Custom (SPA) per la piattaforma PetsGo. Powered by Leaflet.js + FastAPI.
Version: 2.4.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: petsgo
*/

/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
  color-scheme: light dark;
  --color-primary: #FF6B6B;
  --color-primary-dark: #E55A5A;
  --color-secondary: #4ECDC4;
  --color-accent: #FFE66D;
  --color-emergency: #FF3B30;
  --color-emergency-glow: rgba(255, 59, 48, 0.35);
  --color-success: #2ECC71;
  --color-warning: #F39C12;
  --color-info: #3498DB;
  --color-verified: #27AE60;

  --bg-body: #F0F4F8;
  --bg-surface: #FFFFFF;
  --bg-surface-glass: rgba(255, 255, 255, 0.88);
  --bg-overlay: rgba(0, 0, 0, 0.4);

  --text-main: #1A202C;
  --text-muted: #718096;
  --text-light: #A0AEC0;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.20);
  --border-radius: 16px;
  --border-radius-sm: 8px;
  --border-radius-pill: 9999px;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  --bottom-bar-height: 70px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #0F1117;
    --bg-surface: #1A1D27;
    --bg-surface-glass: rgba(26, 29, 39, 0.92);
    --text-main: #F0F4F8;
    --text-muted: #8892A4;
    --text-light: #555F6E;
  }
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100dvh;
}

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

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

input,
textarea,
select {
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ==========================================================================
   APP SHELL
   ========================================================================== */
#app-container {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  position: relative;
}

#view-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--bottom-bar-height);
}

/* Scrollable pages have padding, map page does not */
#view-container.map-active {
  overflow: hidden;
  padding-bottom: 0;
}

/* ==========================================================================
   BOTTOM NAV BAR
   ========================================================================== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-bar-height);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 200;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(128, 128, 128, 0.12);
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-light);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 16px;
  border-radius: var(--border-radius-sm);
  transition: color var(--transition-fast);
  text-transform: uppercase;
  cursor: pointer;
}

.nav-item.active {
  color: var(--color-primary);
}

.nav-item svg {
  transition: transform var(--transition-fast);
}

.nav-item.active svg {
  transform: scale(1.1);
}

.fab-sos {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-emergency);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  border: 3px solid var(--bg-surface);
  box-shadow: 0 0 0 0 var(--color-emergency-glow);
  animation: pulse-emergency 2.2s infinite;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.fab-sos:hover {
  transform: scale(1.08);
}

@keyframes pulse-emergency {
  0% {
    box-shadow: 0 0 0 0 var(--color-emergency-glow);
  }

  70% {
    box-shadow: 0 0 0 18px rgba(255, 59, 48, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
  }
}

/* ==========================================================================
   UTILITY
   ========================================================================== */
.glass-panel {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: var(--border-radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-secondary);
  color: #fff;
}

.btn-secondary:hover {
  filter: brightness(0.92);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-ghost {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-main);
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.1);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

.btn-icon {
  padding: 10px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.btn-danger {
  background: var(--color-emergency);
  color: #fff;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ==========================================================================
   PAGE TRANSITIONS
   ========================================================================== */
.page-view {
  animation: pageFadeIn var(--transition-smooth) both;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 0, 0, 0.08);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60vh;
  flex-direction: column;
  gap: 16px;
  color: var(--text-muted);
}

.skeleton {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.12) 50%, rgba(0, 0, 0, 0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--border-radius-sm);
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
#toast-container {
  position: fixed;
  bottom: calc(var(--bottom-bar-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 400px;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease both;
  pointer-events: auto;
}

.toast.success {
  background: var(--color-success);
}

.toast.error {
  background: var(--color-emergency);
}

.toast.info {
  background: var(--color-info);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   BOTTOM SHEET (modale dal basso)
   ========================================================================== */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 300;
  opacity: 0;
  transition: opacity var(--transition-smooth);
  pointer-events: none;
}

.bottom-sheet-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-radius: 24px 24px 0 0;
  z-index: 400;
  max-height: 90dvh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--transition-smooth);
  padding: 8px 0 calc(70px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-xl);
}

.bottom-sheet.open {
  transform: translateY(0);
}

.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.bottom-sheet-content {
  padding: 0 20px;
}

/* ==========================================================================
   EXPLORE PAGE — MAP
   ========================================================================== */
#map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.map-wrapper {
  position: relative;
  height: 100%;
  width: 100%;
}

.overlay-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(14px);
  border-radius: var(--border-radius-pill);
  padding: 6px 6px 6px 16px;
  box-shadow: var(--shadow-md);
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
}

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

.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  padding: 7px 14px;
  background: var(--bg-surface-glass);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  color: var(--text-muted);
  border: 1.5px solid transparent;
}

.filter-chip.active {
  background: var(--color-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.35);
}

/* Custom Leaflet Marker */
.custom-marker {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.custom-marker-inner {
  transform: rotate(45deg);
}

.marker-gray {
  background: #94A3B8;
}

.marker-green {
  background: var(--color-success);
}

.marker-yellow {
  background: var(--color-warning);
}

.marker-red {
  background: var(--color-emergency);
}

.marker-verified {
  background: var(--color-verified);
  outline: 2px solid var(--color-accent);
}

.petsgo-marker-badge {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  -webkit-transform: translate3d(-50%, 0, 0);
  background: var(--color-primary);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--border-radius-pill);
  border: 1.5px solid #fff;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}

/* Leaflet custom icon — overflow visible necessario per i badge su iOS/Safari */
.custom-leaflet-icon {
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
}


/* POI Detail Bottom Sheet */
.poi-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.poi-detail-title {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
}

.poi-detail-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.poi-detail-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.poi-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.stars {
  color: var(--color-accent);
  font-size: 1rem;
}

.rating-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(39, 174, 96, 0.12);
  color: var(--color-verified);
  border: 1px solid rgba(39, 174, 96, 0.3);
  border-radius: var(--border-radius-pill);
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pet-score-bar {
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}

.pet-score-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.pet-score-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.poi-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.poi-tag {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
  border-radius: var(--border-radius-pill);
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.poi-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.poi-actions .btn {
  flex: 1;
}

/* ==========================================================================
   PETS PAGE
   ========================================================================== */
.page-header {
  padding: 20px 16px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 800;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.pets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 8px 16px 80px;
}

.pet-card {
  background: var(--bg-surface);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  border: 1.5px solid transparent;
}

.pet-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.pet-card:active {
  transform: scale(0.97);
}

.pet-card-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.pet-card-body {
  padding: 12px;
}

.pet-card-name {
  font-weight: 700;
  font-size: 1rem;
}

.pet-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.age-badge {
  display: inline-block;
  background: rgba(78, 205, 196, 0.12);
  color: var(--color-secondary);
  border-radius: var(--border-radius-pill);
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-top: 6px;
}

.fab-add {
  position: fixed;
  right: 20px;
  bottom: calc(var(--bottom-bar-height) + 16px);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.6rem;
  border: none;
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  transition: all var(--transition-fast);
}

.fab-add:hover {
  transform: scale(1.08) rotate(90deg);
  box-shadow: 0 8px 24px rgba(255, 107, 107, 0.5);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 32px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state-icon {
  font-size: 3.5rem;
}

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.empty-state p {
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ==========================================================================
   FORMS
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  padding: 12px 14px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  background: var(--bg-surface);
  color: var(--text-main);
  transition: border-color var(--transition-fast);
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  min-height: 48px;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
}

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

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.score-selector {
  display: flex;
  gap: 8px;
}

.score-btn {
  flex: 1;
  padding: 10px 0;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.score-btn.selected {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ==========================================================================
   HEALTH PAGE (LIBRETTO SANITARIO)
   ========================================================================== */
.tab-nav {
  display: flex;
  overflow-x: auto;
  gap: 0;
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
  padding: 0 16px;
  scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.health-list {
  padding: 12px 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.health-card {
  background: var(--bg-surface);
  border-radius: var(--border-radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 4px solid transparent;
}

.health-card.status-ok {
  border-left-color: var(--color-success);
}

.health-card.status-warn {
  border-left-color: var(--color-warning);
}

.health-card.status-danger {
  border-left-color: var(--color-emergency);
}

.health-card-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.health-card-body {
  flex: 1;
  min-width: 0;
}

.health-card-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.health-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.health-card-action {
  flex-shrink: 0;
}

.expiry-pill {
  border-radius: var(--border-radius-pill);
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
}

.expiry-ok {
  background: rgba(46, 204, 113, 0.12);
  color: var(--color-success);
}

.expiry-warn {
  background: rgba(243, 156, 18, 0.12);
  color: var(--color-warning);
}

.expiry-danger {
  background: rgba(255, 59, 48, 0.12);
  color: var(--color-emergency);
}

/* Pet selector strip */
.pet-selector {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 16px 16px 8px;
  scrollbar-width: none;
}

.pet-selector::-webkit-scrollbar {
  display: none;
}

.pet-selector-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.pet-selector-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
}

.pet-selector-item.active .pet-selector-photo {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.pet-selector-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.pet-selector-item.active .pet-selector-name {
  color: var(--color-primary);
}

/* ==========================================================================
   SOS PAGE
   ========================================================================== */
.sos-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #7B0000 0%, #CC0000 50%, #FF3B30 100%);
  padding: 40px 16px 100px;
  color: #fff;
  display: flex;
  flex-direction: column;
}

.sos-header {
  text-align: center;
  margin-bottom: 32px;
}

.sos-icon {
  font-size: 4rem;
  margin-bottom: 8px;
  animation: sosHeartbeat 1.4s ease infinite;
}

@keyframes sosHeartbeat {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

.sos-title {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.sos-subtitle {
  opacity: 0.8;
  font-size: 0.9rem;
}

.sos-vets {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sos-vet-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sos-vet-name {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 4px;
}

.sos-vet-address {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-bottom: 12px;
}

.sos-vet-actions {
  display: flex;
  gap: 8px;
}

.sos-vet-actions .btn {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.8rem;
  padding: 8px 14px;
}

.sos-vet-actions .btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sos-locating {
  text-align: center;
  padding: 40px;
  opacity: 0.9;
}

.sos-spinner {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  margin: 0 auto 16px;
}

/* ==========================================================================
   PROFILE / AUTH PAGE
   ========================================================================== */
.auth-container {
  padding: 40px 24px 80px;
  max-width: 440px;
  margin: 0 auto;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .logo-text {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-primary);
}

.auth-logo .logo-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  background: rgba(0, 0, 0, 0.06);
  border-radius: var(--border-radius-pill);
  padding: 4px;
  margin-bottom: 28px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: var(--border-radius-pill);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.auth-tab-btn.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

.profile-container {
  padding: 24px 16px 80px;
}

.profile-hero {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: var(--border-radius);
  padding: 28px 20px;
  color: #fff;
  text-align: center;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 14px;
  border: 3px solid rgba(255, 255, 255, 0.4);
}

.profile-name {
  font-size: 1.4rem;
  font-weight: 800;
}

.profile-email {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 2px;
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 230, 109, 0.2);
  border: 1px solid rgba(255, 230, 109, 0.4);
  color: var(--color-accent);
  border-radius: var(--border-radius-pill);
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 12px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-surface);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-primary);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-surface);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  border: none;
  width: 100%;
  text-align: left;
  color: var(--text-main);
}

.menu-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.menu-item-icon {
  font-size: 1.2rem;
  width: 28px;
  text-align: center;
}

.menu-item-label {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
}

.menu-item-arrow {
  color: var(--text-light);
}

.menu-item.danger {
  color: var(--color-emergency);
}

/* ==========================================================================
   FAVORITES PAGE
   ========================================================================== */
.favorites-list {
  padding: 8px 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fav-card {
  background: var(--bg-surface);
  border-radius: var(--border-radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 14px;
  align-items: center;
}

.fav-card-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.fav-card-body {
  flex: 1;
  min-width: 0;
}

.fav-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.fav-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ==========================================================================
   LEAFLET OVERRIDES
   ========================================================================== */
.leaflet-popup-content-wrapper {
  border-radius: var(--border-radius) !important;
  box-shadow: var(--shadow-lg) !important;
  border: none !important;
  font-family: var(--font-family) !important;
  font-size: 0.85rem !important;
}

.leaflet-popup-tip-container {
  display: none !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow-md) !important;
  border-radius: var(--border-radius-sm) !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  border: none !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(0, 0, 0, 0.06) !important;
}

.leaflet-control-attribution {
  display: none !important;
}

/* ==========================================================================
   REVIEW SECTION
   ========================================================================== */
.reviews-section {
  margin-top: 20px;
}

.reviews-section-title {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 12px;
}

.review-card {
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  margin-bottom: 10px;
}

.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.review-card-author {
  font-weight: 700;
  font-size: 0.85rem;
}

.review-card-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.review-form {
  margin-top: 16px;
}

.rating-input {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.star-btn {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.3;
  transition: all var(--transition-fast);
}

.star-btn.selected {
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (min-width: 768px) {
  .pets-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .overlay-top {
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    width: 100%;
  }

  .bottom-sheet {
    max-width: 560px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    right: auto;
    border-radius: 24px;
  }

  .bottom-sheet.open {
    transform: translateX(-50%) translateY(0);
  }
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 40px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--bg-surface);
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 500px;
  max-height: none;
  overflow-y: visible;
  flex-shrink: 0;
  margin-top: auto;
  margin-bottom: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px) scale(0.95);
  transition: all var(--transition-smooth);
}

.modal-overlay.show .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.btn-close:hover {
  color: var(--color-emergency);
}

.modal-body {
  padding: 24px;
}

/* MARKERS */
.custom-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-md);
  border: 2px solid white;
  font-size: 18px;
  transition: var(--transition-fast);
}

.custom-marker:hover {
  transform: scale(1.1);
}

.marker-green {
  background-color: var(--color-success);
  color: white;
}

.marker-yellow {
  background-color: var(--color-warning);
  color: white;
}

.marker-red {
  background-color: var(--color-emergency);
  color: white;
}

.marker-gray {
  background-color: var(--text-light);
  color: white;
}

.marker-verified {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-accent);
}

.marker-favorite {
  background-color: var(--color-success);
  color: white;
  border-color: #27ae60;
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

/* Crowdsourcing Floating Map Add Button */
.fab-map-add {
  position: absolute;
  bottom: calc(var(--bottom-bar-height) + 70px);
  /* default: btn-map-add */
  left: 20px;
  width: 42px;
  height: 42px;
  background: var(--bg-surface);
  border: none;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  font-size: 18px;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.fab-map-add:hover {
  transform: scale(1.08);
  background: #f8f9fa;
}

.fab-map-add.active {
  background: var(--color-primary);
  color: white;
  animation: pulse-emergency 1.5s infinite;
}

@keyframes pulse-emergency {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
  }
}

/* Nascondi l'icona fluttuante di Iubenda */
#iubenda-cs-trigger,
.iubenda-cs-trigger,
#iubenda-cs-uspr,
.iubenda-cs-uspr,
.iub-uspr-btn,
#iub-uspr-btn,
.iubenda-tp-btn,
.iubenda-cs-preferences-link {
  display: none !important;
}

/* ==========================================================================
   IUBENDA OVERRIDES
   ========================================================================== */
#iubenda-cs-badge,
.iubenda-cs-badge,
#iubenda-cs-trigger,
.iubenda-cs-trigger,
#iub-uspr-btn,
.iub-uspr-btn {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ==========================================================================
   SMART SPLASH SCREEN
   ========================================================================== */
.splash-fade-out {
  opacity: 0 !important;
  pointer-events: none !important;
}

@keyframes splashPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.2);
  }

  50% {
    transform: scale(1.03);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.4);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.2);
  }
}

/* ==========================================================================
   POI MODAL — QUICK ACTION BUTTONS (Naviga / Booking)
   ========================================================================== */
.poi-quick-links {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 12px 0 4px 0;
  flex-wrap: wrap;
}

/* Base comune a entrambi i bottoni */
.poi-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: 20px;
  overflow: hidden;
  /* taglia l'immagine al pill shape */
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  line-height: 1;
  flex-shrink: 0;
}

/* Variante testo (Naviga) */
.poi-quick-btn--nav {
  padding: 0 18px;
  background: #4285F4;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(66, 133, 244, 0.40);
}

/* Variante immagine (Booking) — l'<img> riempie esattamente l'<a> */
.poi-quick-btn--booking {
  padding: 0;
  line-height: 0;
  /* elimina lo spazio sotto gli img inline */
}

.poi-quick-btn--booking img {
  height: 32px;
  width: auto;
  display: block;
}

/* ══════════════════════════════════════════════════════════════════
   SAFETY REPORTS — Segnalazioni Georeferenziate
   ══════════════════════════════════════════════════════════════════ */

/* ── Marker mappa ─────────────────────────────────────────────── */
.report-marker {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 44px;
  cursor: pointer;
  transition: transform 0.15s ease;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}

.report-marker:hover {
  transform: scale(1.15) translateY(-2px);
}

.report-marker-icon {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
}

/* ── Pannello dettaglio segnalazione ──────────────────────────── */
.report-detail-panel .report-detail-hero {
  padding: 16px 16px 12px;
  text-align: center;
}

.report-detail-panel .report-detail-hero h3 {
  font-size: 1.05em;
  font-weight: 700;
  margin: 8px 0 0;
  color: #fff;
}

.report-detail-body {
  padding: 16px;
}

.report-description {
  font-size: 0.9em;
  color: var(--color-text);
  line-height: 1.5;
  background: var(--color-bg-2, #f5f5f5);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.report-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8em;
  color: var(--color-text-muted, #888);
  margin-bottom: 14px;
}

/* ── Statistiche (conferme + countdown) ───────────────────────── */
.report-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.report-stat {
  flex: 1;
  background: var(--color-bg-2, #f5f5f5);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}

.report-stat-value {
  display: block;
  font-size: 1.5em;
  font-weight: 700;
  color: var(--color-primary, #FF6B6B);
  line-height: 1;
}

.report-stat-label {
  display: block;
  font-size: 0.72em;
  color: var(--color-text-muted, #888);
  margin-top: 4px;
}

.report-stat--timer .report-stat-value {
  color: #F4511E;
}

.report-countdown {
  animation: pulse-countdown 2s ease-in-out infinite;
}

@keyframes pulse-countdown {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.55;
  }
}

/* ── Azioni di validazione ────────────────────────────────────── */
.report-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-validate-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9em;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.report-validate-btn:active {
  transform: scale(0.97);
}

.report-validate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-success {
  background: #2E7D32;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary, #FF6B6B);
  border: 2px solid var(--color-primary, #FF6B6B);
}

.report-auth-hint {
  font-size: 0.8em;
  color: var(--color-text-muted, #888);
  text-align: center;
  margin-top: 8px;
}

/* ── Pagina Nuova Segnalazione ────────────────────────────────── */
.reports-page {
  padding: 16px;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 100px;
}

.reports-header {
  margin-bottom: 24px;
}

.reports-header h2 {
  font-size: 1.4em;
  font-weight: 700;
  margin: 0 0 4px;
}

.reports-subtitle {
  font-size: 0.85em;
  color: var(--color-text-muted, #888);
  margin: 0;
}

.reports-section {
  margin-bottom: 22px;
}

.reports-label {
  display: block;
  font-size: 0.8em;
  font-weight: 600;
  color: var(--color-text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

/* ── Chip selezione categoria ─────────────────────────────────── */
.report-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 24px;
  border: 2px solid var(--color-border, #e0e0e0);
  background: var(--color-bg, #fff);
  cursor: pointer;
  font-size: 0.88em;
  font-weight: 500;
  color: var(--color-text, #333);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}

.report-chip:active {
  transform: scale(0.96);
}

.report-chip--selected {
  border-color: var(--color-primary, #FF6B6B);
  background: rgba(255, 107, 107, 0.08);
  color: var(--color-primary, #FF6B6B);
  font-weight: 700;
}

.report-chip-icon {
  font-size: 1.3em;
}

/* ── Pulsante posizione ───────────────────────────────────────── */
.report-location-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-size: 0.95em;
  font-weight: 600;
}

.report-location-status {
  margin-top: 8px;
  font-size: 0.82em;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
}

.report-location-status--ok {
  color: #2E7D32;
  background: rgba(46, 125, 50, 0.08);
}

.report-location-status--error {
  color: #C62828;
  background: rgba(198, 40, 40, 0.08);
}

/* ── Textarea descrizione ─────────────────────────────────────── */
.report-textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid var(--color-border, #e0e0e0);
  font-family: inherit;
  font-size: 0.9em;
  resize: vertical;
  color: var(--color-text, #333);
  background: var(--color-bg, #fff);
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.report-textarea:focus {
  border-color: var(--color-primary, #FF6B6B);
  outline: none;
}

.report-charcount {
  display: block;
  text-align: right;
  font-size: 0.75em;
  color: var(--color-text-muted, #888);
  margin-top: 4px;
}

/* ── Pulsante submit ──────────────────────────────────────────── */
.report-submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 1em;
  font-weight: 700;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  background: var(--color-primary, #FF6B6B);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 107, 107, 0.35);
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.report-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.report-submit-btn:not(:disabled):active {
  transform: scale(0.98);
}

/* ── Pulsante segnalazione nel pannello POI ──────────────────── */
.btn-report-from-poi {
  display: block;
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  border: 2px solid #E65100;
  background: #FFF3E0;
  color: #E65100;
  font-size: 0.88em;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}

.btn-report-from-poi:hover {
  background: #FFE0B2;
}

.btn-report-from-poi:active {
  transform: scale(0.97);
}

/* Action Menu Bottom Sheet Options */
.action-menu-item:active {
  opacity: 0.7;
  transform: scale(0.98);
}

/* Toggle Report Chip */
.filter-chip-toggle.active {
  background: #FFF3E0 !important;
  color: #E65100 !important;
  border-color: #E65100 !important;
  box-shadow: 0 4px 12px rgba(230, 81, 0, 0.25) !important;
}


/* Speed Dial Actions */
.map-controls-left #btn-map-locate {
  transform: translateY(112px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-controls-left .speed-dial-actions {
  opacity: 0;
  pointer-events: none;
  margin-left: 12px;
  height: 96px;
}

.map-controls-left .speed-dial-action {
  transform: translateY(40px) scale(0.5);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-controls-left #btn-map-action-menu {
  transform: rotate(0deg);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-controls-left.open #btn-map-locate {
  transform: translateY(0);
}

.map-controls-left.open .speed-dial-actions {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.map-controls-left.open .speed-dial-action {
  transform: translateY(0) scale(1) !important;
}

.map-controls-left.open #btn-map-action-menu {
  transform: rotate(45deg) !important;
}

/* ==========================================================================
   SPLASH SCREEN & LOADING ANIMATIONS
   ========================================================================== */
.splash-fade-out {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.5s ease;
}

@keyframes splashPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

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

/* ==========================================================================
   B2B PROFESSIONAL PORTAL ACCESSIBILITY & CONTRAST FIXES
   ========================================================================== */
.profile-hero {
  color: var(--text-main) !important;
}

.profile-hero h2 {
  color: var(--text-main) !important;
}

/* Evita sovrapposizione dell'indicatore di lingua su bottoni in basso */
#google_translate_element,
.goog-te-gadget,
.goog-te-banner-frame {
  z-index: 900 !important;
}

/* B2B Nav Tabs styling e contrasti */
.b2b-nav-tab {
  transition: all 0.2s ease;
}

.b2b-nav-tab:hover {
  border-color: #059669 !important;
  color: #059669 !important;
}

/* ==========================================================================
   B2B CLINICAL WORKSTATION SPLIT-VIEW (DESKTOP B2B)
   ========================================================================== */
body.is-b2b .bottom-bar {
  display: none !important;
}

body.is-b2b #view-container {
  padding-bottom: 0 !important;
}

.b2b-workstation-container {
  width: 100%;
  margin: 0;
}

.b2b-split-workspace {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 20px;
  align-items: start;
  width: 100%;
}

@media (max-width: 1024px) {
  .b2b-split-workspace {
    grid-template-columns: 1fr;
  }
}

/* Left Panel - Quick Medical Summary */
.b2b-medical-summary-panel {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.b2b-alert-banner {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.b2b-drawer-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  margin-bottom: 14px;
  padding-bottom: 8px;
}

.b2b-drawer-tab-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: all 0.2s ease;
}

.b2b-drawer-tab-btn.active {
  background: #0f172a;
  color: #ffffff;
}

/* Right Panel - 2-Level Reporting */
.b2b-reporting-panel {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.b2b-public-report-box {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.b2b-private-report-box {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}