/* ==========================================================================
   PURELABS HEALTHCORE OS — SMART HEALTHCARE CITY 3D (PIXAR HOLLYWOOD EDITION)
   11 Centri Medici Hub del Network, Loghi Societari Originali, Colori Brand,
   Facciata Edificio 3D Pixar, Zero Azzurro Estraneo (Sfondo Bianco Puro App),
   Tasti Rapidi Incastonati nel Dock Superiore, Flussi Viventi Micro-3D a 60 FPS
   ========================================================================== */

/* 1. Contenitore Master Palcoscenico Spot (Sfondo UGUALE all'App) */
.purelabs-orbit-stage-wrapper {
  position: relative;
  width: 100%;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  padding: 0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  margin-bottom: 24px;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0f172a;
}

.purelabs-orbit-stage-wrapper::before,
.purelabs-orbit-stage-wrapper::after {
  display: none !important;
}

/* 2. Viewport dell'Animazione 3D Compatta */
.purelabs-orbit-viewport {
  position: relative;
  width: 100%;
  height: 510px;
  perspective: 1200px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 55%, #ffffff 0%, #fafbfc 65%, #f1f5f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.purelabs-orbit-viewport:active {
  cursor: grabbing;
}

/* Canvas dei Flussi Animati Viventi (Micro-Token 3D Pixar a 60 FPS) */
.orbit-living-city-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 12;
}

/* 3. Dock Tasti Rapidi e Filtri INCASTONATI DENTRO L'ANIMAZIONE */
.orbit-floating-inner-dock {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  z-index: 120;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
}

/* Nastro Tasti Rapidi Compatto */
.orbit-embedded-quick-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}
.orbit-embedded-quick-actions::-webkit-scrollbar {
  display: none;
}

.orbit-quick-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 9px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.orbit-quick-chip:hover {
  background: #ffffff;
  border-color: #e11d48;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.12);
}

.orbit-quick-chip .chip-icon-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.orbit-quick-chip .chip-text-wrap {
  display: flex;
  flex-direction: column;
}

.orbit-quick-chip .chip-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  white-space: nowrap;
}

.orbit-quick-chip .chip-desc {
  font-size: 0.60rem;
  color: #64748b;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* Riga Inferiore Dock: Filtri & Regia */
.orbit-inner-dock-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.orbit-filters-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.orbit-pill-filter {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.70rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.orbit-pill-filter:hover {
  background: #ffffff;
  border-color: #94a3b8;
  color: #0f172a;
}

.orbit-pill-filter.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.orbit-director-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.orbit-ctrl-btn {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.orbit-ctrl-btn:hover {
  background: #ffffff;
  color: #e11d48;
  border-color: #e11d48;
}

/* 4. Binario Orbitale Sottile (Zero Azzurro Estraneo, Grigio Satinato & Perla) */
.orbit-ring-plane {
  position: absolute;
  top: 54%;
  left: 50%;
  width: 1000px;
  height: 250px;
  transform: translate(-50%, -50%) rotateX(65deg);
  border: 1.5px solid rgba(203, 213, 225, 0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 20px rgba(241, 245, 249, 0.5);
}

.orbit-ring-plane.ring-inner {
  width: 580px;
  height: 100px;
  border: 1px dashed rgba(226, 232, 240, 0.8);
  z-index: 3;
}

/* Core Centrale Holding PureLabs Milano HQ */
.orbit-central-core {
  position: absolute;
  top: 54% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #fff1f2 60%, #ffe4e6 100%);
  border: 3.5px solid #e11d48;
  box-shadow: 
    0 10px 25px rgba(15, 23, 42, 0.08),
    0 0 0 5px rgba(225, 29, 72, 0.08),
    0 0 0 12px rgba(241, 245, 249, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  z-index: 50 !important;
  transition: transform 0.25s ease;
  user-select: none;
  cursor: pointer;
}

.orbit-central-core:hover {
  transform: translate(-50%, -50%) scale(1.05);
  border-color: #e11d48;
}

.orbit-core-logo {
  max-width: 82px;
  max-height: 30px;
  object-fit: contain;
  margin-bottom: 5px;
}

.orbit-core-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
}

.orbit-core-hq {
  font-size: 0.68rem;
  font-weight: 800;
  color: #e11d48;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 3px;
}

.orbit-core-kpi {
  margin-top: 3px;
  font-size: 0.56rem;
  font-weight: 700;
  color: #475569;
  background: #ffffff;
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  white-space: nowrap;
}

/* 5. LE CASETTE SANITARIE TONDE COME HQ (11 SOCIETÀ HUB DEL NETWORK) */
.orbit-track-container {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  pointer-events: none;
}

.clinic-orbit-card {
  position: absolute;
  top: 54%;
  left: 50%;
  width: 112px;
  height: 112px;
  cursor: pointer;
  pointer-events: auto !important;
  transform-origin: center center;
  user-select: none;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.clinic-orbit-card:hover {
  z-index: 9999 !important;
}

/* MEDAGLIONE CIRCOLARE TONDO COME HQ */
.clinic-building-chassis {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50% !important;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #fafbfc 65%, #f1f5f9 100%);
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(0,0,0,0.04);
  border: 2.5px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 10px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible;
}

.clinic-orbit-card:hover .clinic-building-chassis {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 50% !important;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #fafbfc 65%, #f1f5f9 100%);
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(0,0,0,0.04);
  border: 2.5px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 10px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible;
}

/* ICONA CLINICA INGRANDITA CON LOGO INCASTONATO */
.clinic-round-icon-img {
  width: 68px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06));
  transition: transform 0.2s ease;
  margin-top: 1px;
}

.clinic-orbit-card:hover .clinic-round-icon-img {
  width: 68px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.06));
  transition: transform 0.2s ease;
  margin-top: 1px;
}

/* NOME SOCIETA IN BASSO NEL CERCHIO */
.clinic-round-name {
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
  margin-top: 2px;
}

.clinic-round-city {
  font-size: 0.58rem;
  font-weight: 700;
  color: #64748b;
  line-height: 1.1;
}

/* BADGE NUMERO SEDI IN ALTO A DESTRA SOVRIMPRESSO */
.clinic-round-badge-count {
  position: absolute;
  top: -2px;
  right: -2px;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  white-space: nowrap;
  z-index: 5;
}

/* TARGHETTA TECNOLOGICA ALLA BASE DEL CERCHIO */
.clinic-round-net-tag {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.56rem;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 5px;
  text-align: center;
  letter-spacing: 0.2px;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
  z-index: 5;
}

.clinic-round-net-tag.b-edge-ris {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.clinic-round-net-tag.b-edge-hub {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.clinic-round-net-tag.b-cloud {
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
}


/* 6. POPUP MODALE SCHEDA AZIENDA & PRESIDI SANITARI (LIGHT LUXURY) */
.clinic-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.clinic-modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(226, 232, 240, 0.8);
  overflow: hidden;
}

.clinic-modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.clinic-modal-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
}

.clinic-modal-region-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}

.clinic-modal-type-line {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 2px;
}

.clinic-modal-close-btn {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.15s ease;
}

.clinic-modal-close-btn:hover {
  color: #0f172a;
}


/* Allineamento e Centratura Tasti Rapidi */
.orbit-embedded-quick-actions {
  justify-content: center !important;
  margin: 0 auto !important;
}

.orbit-inner-dock-subbar {
  justify-content: center !important;
  margin: 0 auto !important;
}

.orbit-filters-bar {
  justify-content: center !important;
}
