/*
 * Villa Lupia — Modernizzazione 2026
 * Livello grafico reversibile applicato sopra l'applicazione esistente.
 * Le classi dei colori operativi (rosso, verde, giallo, arancio e blu)
 * non vengono ridefinite, così i significati del calendario restano invariati.
 */

:root {
  --background: 164 55% 97%;
  --foreground: 162 45% 12%;
  --card: 0 0% 100%;
  --card-foreground: 162 45% 12%;
  --popover: 0 0% 100%;
  --popover-foreground: 162 45% 12%;
  --primary: 156 72% 33%;
  --primary-foreground: 0 0% 100%;
  --secondary: 190 75% 93%;
  --secondary-foreground: 198 61% 21%;
  --muted: 162 34% 93%;
  --muted-foreground: 162 14% 35%;
  --accent: 35 94% 55%;
  --accent-foreground: 23 67% 16%;
  --destructive: 355 78% 52%;
  --destructive-foreground: 0 0% 100%;
  --border: 164 28% 80%;
  --input: 164 28% 76%;
  --ring: 156 72% 38%;
  --radius: 1rem;

  --sidebar-background: 154 45% 97%;
  --sidebar-foreground: 162 50% 17%;
  --sidebar-primary: 36 96% 58%;
  --sidebar-primary-foreground: 163 56% 11%;
  --sidebar-accent: 159 48% 91%;
  --sidebar-accent-foreground: 162 50% 15%;
  --sidebar-border: 158 28% 82%;
  --sidebar-ring: 36 96% 58%;

  --villa-forest: 156 72% 33%;
  --villa-forest-deep: 163 64% 12%;
  --villa-gold: 35 94% 55%;
  --villa-ivory: 164 55% 97%;
  --villa-shadow: 164 55% 10%;
  --villa-cyan: 190 82% 48%;
  --villa-blue: 216 88% 58%;
  --villa-violet: 265 78% 62%;
  --villa-coral: 11 88% 60%;
}

.dark {
  --background: 164 48% 7%;
  --foreground: 158 42% 96%;
  --card: 163 40% 10%;
  --card-foreground: 158 42% 96%;
  --popover: 163 40% 10%;
  --popover-foreground: 158 42% 96%;
  --primary: 156 72% 46%;
  --primary-foreground: 164 54% 7%;
  --secondary: 190 43% 18%;
  --secondary-foreground: 188 68% 92%;
  --muted: 164 27% 15%;
  --muted-foreground: 160 15% 72%;
  --accent: 35 94% 58%;
  --accent-foreground: 23 67% 12%;
  --border: 166 28% 23%;
  --input: 166 28% 27%;
  --ring: 156 72% 48%;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

html.dark {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 7% 0%, hsl(var(--villa-gold) / 0.13), transparent 27rem),
    radial-gradient(circle at 100% 100%, hsl(var(--villa-forest) / 0.1), transparent 34rem),
    hsl(var(--background));
  background-attachment: fixed;
  font-family: "DM Sans", "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  font-feature-settings: "ss01" 1, "cv02" 1;
  text-rendering: optimizeLegibility;
}

::selection {
  color: hsl(var(--primary-foreground));
  background: hsl(var(--primary) / 0.88);
}

/* Struttura principale */
.group\/sidebar-wrapper {
  background: transparent !important;
}

main.flex-1.overflow-auto {
  background:
    linear-gradient(135deg, hsl(var(--background) / 0.8), hsl(var(--background)) 52%, hsl(var(--accent) / 0.045)),
    transparent !important;
}

main.flex-1.overflow-auto > :not(header) {
  animation: villa-page-enter 380ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

/* Sidebar: identità Villa Lupia */
[data-sidebar="sidebar"] {
  position: relative;
  overflow: hidden;
  color: hsl(var(--sidebar-foreground)) !important;
  border-color: hsl(var(--sidebar-border) / 0.72) !important;
  background:
    radial-gradient(circle at 14% 1%, hsl(var(--villa-gold) / 0.2), transparent 15rem),
    radial-gradient(circle at 100% 75%, hsl(var(--villa-cyan) / 0.1), transparent 17rem),
    linear-gradient(165deg, hsl(0 0% 100%), hsl(var(--sidebar-background)) 56%, hsl(158 45% 94%)) !important;
  box-shadow: 10px 0 36px hsl(var(--villa-shadow) / 0.1);
}

[data-sidebar="sidebar"]::after {
  position: absolute;
  right: -7rem;
  bottom: -6rem;
  width: 17rem;
  height: 17rem;
  border: 1px solid hsl(var(--primary) / 0.11);
  border-radius: 50%;
  box-shadow: 0 0 0 2.6rem hsl(var(--primary) / 0.025), 0 0 0 5.2rem hsl(var(--primary) / 0.018);
  content: "";
  pointer-events: none;
}

[data-sidebar="header"],
[data-sidebar="content"] {
  position: relative;
  z-index: 1;
}

[data-sidebar="header"] {
  border-bottom-color: hsl(var(--sidebar-border) / 0.65) !important;
  background: linear-gradient(180deg, hsl(0 0% 100% / 0.88), transparent);
}

[data-sidebar="group-label"] {
  color: hsl(var(--primary) / 0.92) !important;
  font-size: 0.68rem !important;
  font-weight: 750 !important;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

[data-sidebar="menu-button"] {
  min-height: 2.55rem;
  margin-block: 0.1rem;
  color: hsl(var(--sidebar-foreground) / 0.82) !important;
  border: 1px solid transparent;
  border-radius: 0.8rem !important;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

[data-sidebar="menu-button"]:hover {
  color: hsl(var(--sidebar-foreground)) !important;
  border-color: hsl(var(--sidebar-border) / 0.85);
  background: hsl(var(--sidebar-accent) / 0.92) !important;
  transform: translateX(2px);
}

[data-sidebar="menu-button"][data-active="true"] {
  color: hsl(var(--sidebar-primary-foreground)) !important;
  border-color: hsl(var(--villa-gold) / 0.7);
  background: linear-gradient(135deg, hsl(42 66% 88%), hsl(var(--sidebar-primary))) !important;
  box-shadow: 0 9px 24px hsl(var(--villa-gold) / 0.22), inset 0 1px hsl(0 0% 100% / 0.7);
}

[data-sidebar="menu-button"] svg {
  transition: transform 180ms ease;
}

[data-sidebar="menu-button"]:hover svg,
[data-sidebar="menu-button"][data-active="true"] svg {
  transform: scale(1.08);
}

/* Barra superiore */
header.sticky.top-0 {
  border-color: hsl(var(--border) / 0.7) !important;
  background:
    linear-gradient(110deg, hsl(var(--card) / 0.95), hsl(var(--card) / 0.84) 62%, hsl(var(--accent) / 0.11)) !important;
  box-shadow: 0 10px 35px hsl(var(--villa-shadow) / 0.07);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

header.sticky.top-0::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, hsl(var(--villa-gold) / 0.65), transparent);
  content: "";
  pointer-events: none;
}

/* Schede, finestre e pannelli */
.shadcn-card,
[role="dialog"],
[role="menu"],
[role="listbox"] {
  border-color: hsl(var(--border) / 0.78) !important;
  background-color: hsl(var(--card) / 0.94) !important;
  box-shadow: 0 17px 44px hsl(var(--villa-shadow) / 0.075), inset 0 1px hsl(0 0% 100% / 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.shadcn-card {
  position: relative;
  overflow: clip;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.shadcn-card::before {
  position: absolute;
  top: 0;
  right: 1.15rem;
  left: 1.15rem;
  z-index: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, hsl(var(--villa-gold) / 0.48), transparent);
  content: "";
  pointer-events: none;
}

.shadcn-card:hover {
  border-color: hsl(var(--accent) / 0.42) !important;
  box-shadow: 0 22px 54px hsl(var(--villa-shadow) / 0.105), inset 0 1px hsl(0 0% 100% / 0.68);
}

[role="dialog"] {
  border-radius: 1.35rem !important;
  box-shadow: 0 28px 85px hsl(var(--villa-shadow) / 0.24), inset 0 1px hsl(0 0% 100% / 0.7);
}

[data-radix-popper-content-wrapper] [role="menu"],
[data-radix-popper-content-wrapper] [role="listbox"] {
  border-radius: 0.9rem;
}

/* Pulsanti e controlli */
button,
[role="button"],
a,
input,
textarea,
select {
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, opacity 160ms ease;
}

button:not([data-sidebar="menu-button"]),
[role="button"]:not([data-sidebar="menu-button"]) {
  border-radius: 0.78rem;
}

button:not(:disabled):active,
[role="button"]:not([aria-disabled="true"]):active {
  transform: scale(0.975);
}

button.bg-primary,
[role="button"].bg-primary {
  border: 1px solid hsl(var(--primary) / 0.72);
  background-image: linear-gradient(135deg, hsl(153 45% 29%), hsl(var(--primary))) !important;
  box-shadow: 0 8px 20px hsl(var(--villa-forest) / 0.2), inset 0 1px hsl(0 0% 100% / 0.18);
}

button.bg-primary:not(:disabled):hover,
[role="button"].bg-primary:not([aria-disabled="true"]):hover {
  box-shadow: 0 11px 26px hsl(var(--villa-forest) / 0.27), inset 0 1px hsl(0 0% 100% / 0.22);
  transform: translateY(-1px);
}

input,
textarea,
select,
button[role="combobox"] {
  border-color: hsl(var(--input) / 0.92) !important;
  background-color: hsl(var(--card) / 0.86) !important;
}

input:hover,
textarea:hover,
select:hover,
button[role="combobox"]:hover {
  border-color: hsl(var(--primary) / 0.44) !important;
}

input:focus,
textarea:focus,
select:focus,
button[role="combobox"]:focus,
:focus-visible {
  outline-color: hsl(var(--ring));
  box-shadow: 0 0 0 4px hsl(var(--ring) / 0.14);
}

/* Tab di calendario e report */
[role="tablist"] {
  gap: 0.3rem;
  height: auto !important;
  padding: 0.28rem;
  border: 1px solid hsl(var(--border) / 0.68);
  border-radius: 0.95rem !important;
  background: hsl(var(--muted) / 0.68) !important;
}

[role="tab"] {
  min-height: 2.35rem;
  border-radius: 0.7rem !important;
  font-weight: 650;
}

[role="tab"][aria-selected="true"],
[role="tab"][data-state="active"] {
  color: hsl(var(--primary-foreground)) !important;
  background: linear-gradient(135deg, hsl(153 45% 29%), hsl(var(--primary))) !important;
  box-shadow: 0 7px 18px hsl(var(--villa-forest) / 0.18), inset 0 1px hsl(0 0% 100% / 0.18);
}

/* Tabelle e calendario prenotazioni */
table {
  border-collapse: separate;
  border-spacing: 0;
}

thead tr {
  background: hsl(var(--muted) / 0.58);
}

th {
  color: hsl(var(--foreground) / 0.75);
  font-size: 0.72rem;
  font-weight: 750 !important;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

tbody tr {
  transition: background-color 140ms ease;
}

tbody tr:hover {
  background-color: hsl(var(--accent) / 0.075) !important;
}

.border-b.hover\:bg-muted\/20:hover {
  background-color: hsl(var(--primary) / 0.045) !important;
}

/* I colori rimangono quelli operativi; vengono aggiunti solo profondità e leggibilità. */
.bg-orange-500,
.bg-red-500,
.bg-green-500,
.bg-yellow-500,
.bg-sky-400 {
  box-shadow: inset 0 1px hsl(0 0% 100% / 0.32), inset 0 -1px hsl(0 0% 0% / 0.1);
}

.bg-orange-500:hover,
.bg-red-500:hover,
.bg-green-500:hover,
.bg-yellow-500:hover,
.bg-sky-400:hover {
  filter: saturate(1.04) brightness(1.03);
  box-shadow: inset 0 1px hsl(0 0% 100% / 0.42), 0 2px 7px hsl(var(--villa-shadow) / 0.16);
  transform: translateY(-1px);
}

/* Badge, separatori, indicatori e barre di scorrimento */
[data-slot="badge"],
.rounded-full.border {
  box-shadow: inset 0 1px hsl(0 0% 100% / 0.28);
}

hr,
.border-b,
.border-t {
  border-color: hsl(var(--border) / 0.72);
}

* {
  scrollbar-color: hsl(var(--primary) / 0.42) transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 99px;
  background: hsl(var(--primary) / 0.4);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--primary) / 0.58);
  background-clip: padding-box;
}

@keyframes villa-page-enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  header.sticky.top-0 {
    -webkit-backdrop-filter: blur(12px) saturate(125%);
    backdrop-filter: blur(12px) saturate(125%);
  }

  .shadcn-card {
    border-radius: 1rem !important;
  }

  [role="dialog"] {
    max-width: calc(100vw - 1rem) !important;
    border-radius: 1.05rem !important;
  }

  [role="tablist"] {
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* --------------------------------------------------------------------------
   Villa Lupia Interactive — struttura, navigazione e micro-interazioni
   -------------------------------------------------------------------------- */

.vl-modern-shell {
  --vl-panel: hsl(var(--card) / 0.94);
  --vl-soft-shadow: 0 18px 50px hsl(var(--villa-shadow) / 0.09);
}

.vl-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
}

.vl-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.vl-overline {
  display: block;
  color: hsl(var(--primary) / 0.72);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.vl-context-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  margin: 1.2rem 1.2rem 0;
  padding: 1.15rem 1.25rem;
  overflow: hidden;
  border: 1px solid hsl(var(--border) / 0.7);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 94% 0%, hsl(var(--villa-gold) / 0.17), transparent 17rem),
    linear-gradient(135deg, hsl(var(--card) / 0.96), hsl(var(--card) / 0.79));
  box-shadow: var(--vl-soft-shadow), inset 0 1px hsl(0 0% 100% / 0.72);
  isolation: isolate;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: vl-rise-in 420ms cubic-bezier(0.18, 0.8, 0.28, 1) both;
}

.vl-context-bar::before {
  position: absolute;
  top: -3.2rem;
  right: -2rem;
  z-index: -1;
  width: 13rem;
  height: 13rem;
  border: 1px solid hsl(var(--villa-gold) / 0.19);
  border-radius: 50%;
  box-shadow: 0 0 0 2.4rem hsl(var(--villa-gold) / 0.045), 0 0 0 4.8rem hsl(var(--villa-forest) / 0.025);
  content: "";
}

.vl-context-intro {
  min-width: 0;
}

.vl-context-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.38rem;
}

.vl-live-status,
.vl-context-section {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vl-live-status {
  color: hsl(148 44% 29%);
}

.vl-live-status i {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: hsl(148 58% 43%);
  box-shadow: 0 0 0 0 hsl(148 58% 43% / 0.42);
  animation: vl-status-pulse 2.2s ease-out infinite;
}

.vl-context-section {
  padding-left: 0.55rem;
  color: hsl(var(--muted-foreground));
  border-left: 1px solid hsl(var(--border));
}

.vl-context-intro h2 {
  margin: 0;
  color: hsl(var(--foreground));
  font-family: Outfit, "DM Sans", sans-serif;
  font-size: clamp(1.18rem, 1.7vw, 1.6rem);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.14;
}

.vl-context-intro p {
  max-width: 52rem;
  margin: 0.28rem 0 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.86rem;
}

.vl-context-side {
  display: flex;
  min-width: max-content;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.72rem;
}

.vl-live-clock {
  color: hsl(var(--muted-foreground));
  font-size: 0.72rem;
  font-weight: 690;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

.vl-context-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.vl-action-pill,
.vl-soft-button,
.vl-command-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0.52rem 0.78rem;
  overflow: hidden;
  color: hsl(var(--foreground) / 0.83);
  border: 1px solid hsl(var(--border) / 0.78);
  border-radius: 0.78rem;
  background: hsl(var(--card) / 0.7);
  box-shadow: inset 0 1px hsl(0 0% 100% / 0.58);
  font-size: 0.76rem;
  font-weight: 690;
  text-decoration: none;
}

.vl-action-pill:hover,
.vl-soft-button:hover,
.vl-command-trigger:hover {
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.32);
  background: hsl(var(--primary) / 0.075);
  box-shadow: 0 8px 20px hsl(var(--villa-shadow) / 0.08), inset 0 1px hsl(0 0% 100% / 0.65);
  transform: translateY(-1px);
}

.vl-action-pill.is-primary {
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary) / 0.55);
  background: linear-gradient(135deg, hsl(153 45% 30%), hsl(var(--primary)));
  box-shadow: 0 8px 20px hsl(var(--villa-forest) / 0.2), inset 0 1px hsl(0 0% 100% / 0.2);
}

.vl-action-pill.is-primary:hover {
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--villa-gold) / 0.46);
  box-shadow: 0 11px 25px hsl(var(--villa-forest) / 0.27), inset 0 1px hsl(0 0% 100% / 0.24);
}

/* Dashboard: nuova area azioni rapide */
.vl-dashboard-launcher {
  margin: 0.85rem 1.2rem 0;
  padding: 1rem;
  border: 1px solid hsl(var(--border) / 0.68);
  border-radius: 1.25rem;
  background: linear-gradient(145deg, hsl(var(--card) / 0.74), hsl(var(--secondary) / 0.45));
  box-shadow: 0 13px 36px hsl(var(--villa-shadow) / 0.065), inset 0 1px hsl(0 0% 100% / 0.6);
  animation: vl-rise-in 480ms 80ms cubic-bezier(0.18, 0.8, 0.28, 1) both;
}

.vl-launcher-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.vl-launcher-heading h3 {
  margin: 0.18rem 0 0;
  font-family: Outfit, "DM Sans", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.vl-command-trigger kbd {
  padding: 0.12rem 0.38rem;
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: 0.38rem;
  background: hsl(var(--muted) / 0.72);
  font-family: inherit;
  font-size: 0.62rem;
}

.vl-launcher-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.vl-launcher-card {
  --vl-card-accent: var(--villa-forest);
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.72rem;
  min-height: 5.4rem;
  padding: 0.82rem;
  overflow: hidden;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border) / 0.72);
  border-radius: 1rem;
  background: linear-gradient(145deg, hsl(var(--card) / 0.96), hsl(var(--card) / 0.78));
  box-shadow: 0 10px 24px hsl(var(--villa-shadow) / 0.055), inset 0 1px hsl(0 0% 100% / 0.72);
  text-decoration: none;
  isolation: isolate;
}

.vl-launcher-card::before {
  position: absolute;
  right: -2.2rem;
  bottom: -3rem;
  z-index: -1;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  background: hsl(var(--vl-card-accent) / 0.1);
  content: "";
  transition: transform 240ms ease, opacity 240ms ease;
}

.vl-launcher-card.is-gold { --vl-card-accent: var(--villa-gold); }
.vl-launcher-card.is-blue { --vl-card-accent: 203 70% 45%; }
.vl-launcher-card.is-violet { --vl-card-accent: 267 54% 52%; }

.vl-launcher-card:hover {
  color: hsl(var(--foreground));
  border-color: hsl(var(--vl-card-accent) / 0.38);
  box-shadow: 0 17px 35px hsl(var(--villa-shadow) / 0.11), inset 0 1px hsl(0 0% 100% / 0.75);
  transform: translateY(-3px);
}

.vl-launcher-card:hover::before {
  opacity: 0.9;
  transform: scale(1.2);
}

.vl-launcher-icon {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  color: hsl(var(--vl-card-accent));
  border: 1px solid hsl(var(--vl-card-accent) / 0.2);
  border-radius: 0.78rem;
  background: hsl(var(--vl-card-accent) / 0.1);
  place-items: center;
}

.vl-launcher-icon .vl-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.vl-launcher-copy,
.vl-module-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.12rem;
}

.vl-launcher-copy strong,
.vl-module-copy strong {
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vl-launcher-copy small,
.vl-module-copy small {
  overflow: hidden;
  color: hsl(var(--muted-foreground));
  font-size: 0.67rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vl-launcher-card > .vl-icon:last-child {
  width: 0.95rem;
  height: 0.95rem;
  color: hsl(var(--muted-foreground) / 0.65);
  transition: color 180ms ease, transform 180ms ease;
}

.vl-launcher-card:hover > .vl-icon:last-child {
  color: hsl(var(--vl-card-accent));
  transform: translateX(3px);
}

/* Prenotazioni: controlli di densità, legenda e report */
.vl-booking-tools {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0.75rem 0;
  padding: 0.58rem 0.68rem;
  border: 1px solid hsl(var(--border) / 0.65);
  border-radius: 0.95rem;
  background: linear-gradient(135deg, hsl(var(--card) / 0.82), hsl(var(--muted) / 0.53));
  box-shadow: 0 8px 22px hsl(var(--villa-shadow) / 0.05), inset 0 1px hsl(0 0% 100% / 0.6);
}

.vl-booking-mode,
.vl-booking-controls {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.vl-booking-mode {
  color: hsl(var(--primary));
  font-size: 0.74rem;
  font-weight: 760;
}

.vl-booking-mode .vl-icon {
  width: 1rem;
  height: 1rem;
}

.vl-soft-button {
  min-height: 2rem;
  padding: 0.36rem 0.65rem;
  font-size: 0.7rem;
}

.vl-soft-button.is-active {
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
  box-shadow: 0 6px 16px hsl(var(--primary) / 0.2);
}

.vl-smart-legend {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  max-height: 0;
  gap: 0.4rem;
  padding-top: 0;
  overflow: hidden;
  opacity: 0;
  border-top: 1px solid transparent;
  transition: max-height 220ms ease, opacity 180ms ease, padding-top 220ms ease, border-color 220ms ease;
}

.vl-smart-legend.is-open {
  max-height: 5rem;
  padding-top: 0.58rem;
  opacity: 1;
  border-color: hsl(var(--border) / 0.6);
}

.vl-legend-item {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.67rem;
}

.vl-legend-item b {
  display: grid;
  min-width: 1.8rem;
  height: 1.55rem;
  padding-inline: 0.28rem;
  color: #fff;
  border-radius: 0.42rem;
  place-items: center;
  font-size: 0.62rem;
  box-shadow: inset 0 1px hsl(0 0% 100% / 0.3), 0 3px 8px hsl(var(--villa-shadow) / 0.12);
}

.vl-legend-item b.is-orange { background: #f97316; }
.vl-legend-item b.is-red { background: #ef4444; }
.vl-legend-item b.is-green { background: #22c55e; }
.vl-legend-item b.is-yellow { background: #eab308; }
.vl-legend-item b.is-blue { background: #38bdf8; }

.vl-density-compact .vl-enhanced-tabpanel .w-48 {
  width: 9rem !important;
}

.vl-density-compact .vl-enhanced-tabpanel .p-2 {
  padding: 0.34rem !important;
}

.vl-density-compact .vl-enhanced-tabpanel .text-sm {
  font-size: 0.72rem !important;
}

.vl-density-roomy .vl-enhanced-tabpanel .w-48 {
  width: 13.5rem !important;
}

.vl-density-roomy .vl-enhanced-tabpanel .p-2 {
  padding: 0.72rem !important;
}

.vl-enhanced-tabpanel {
  position: relative;
  border-radius: 1rem;
  box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.58);
}

.vl-enhanced-tabpanel > div {
  scrollbar-color: hsl(var(--primary) / 0.5) hsl(var(--muted) / 0.35);
}

/* Calendario: scorrimento orizzontale evidente e utilizzabile anche al tocco. */
.vl-calendar-navigation {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.62rem;
  padding: 0.58rem 0.65rem;
  color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary) / 0.2);
  border-radius: 0.9rem;
  background: linear-gradient(135deg, hsl(var(--secondary) / 0.78), hsl(var(--card)));
  box-shadow: 0 8px 20px hsl(var(--villa-shadow) / 0.055);
}

.vl-calendar-navigation-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 0.48rem;
  font-size: 0.72rem;
  font-weight: 720;
}

.vl-calendar-navigation-copy .vl-icon {
  width: 1.08rem;
  height: 1.08rem;
  flex: 0 0 auto;
}

.vl-calendar-navigation-copy small {
  color: hsl(var(--muted-foreground));
  font-size: 0.65rem;
  font-weight: 560;
}

.vl-calendar-progress {
  width: min(8rem, 22vw);
  height: 0.3rem;
  overflow: hidden;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.12);
}

.vl-calendar-progress::after {
  display: block;
  width: var(--vl-calendar-progress, 0%);
  min-width: 0.5rem;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--villa-cyan)));
  content: "";
  transition: width 120ms ease;
}

.vl-calendar-navigation-buttons {
  display: flex;
  flex: 0 0 auto;
  gap: 0.34rem;
}

.vl-calendar-arrow {
  display: grid;
  width: 2.25rem;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  color: hsl(var(--primary-foreground));
  border: 1px solid hsl(var(--primary) / 0.7);
  border-radius: 0.68rem;
  background: linear-gradient(145deg, hsl(156 72% 41%), hsl(var(--primary))) !important;
  box-shadow: 0 6px 14px hsl(var(--primary) / 0.2);
  place-items: center;
}

.vl-calendar-arrow .vl-icon {
  width: 1rem;
  height: 1rem;
}

.vl-calendar-arrow.is-left .vl-icon {
  transform: rotate(180deg);
}

.vl-calendar-arrow:disabled {
  opacity: 0.34;
  box-shadow: none;
  cursor: default;
}

.vl-calendar-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  scroll-behavior: smooth;
  scrollbar-color: hsl(var(--primary) / 0.72) hsl(var(--muted) / 0.62);
  scrollbar-width: auto;
  -webkit-overflow-scrolling: touch;
}

.vl-calendar-scroll::-webkit-scrollbar {
  height: 0.72rem;
}

.vl-calendar-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: hsl(var(--muted) / 0.72);
}

.vl-calendar-scroll::-webkit-scrollbar-thumb {
  border: 2px solid hsl(var(--muted) / 0.72);
  border-radius: 999px;
  background: hsl(var(--primary) / 0.7);
}

.vl-report-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 0.62rem;
  margin-bottom: 0.78rem;
  animation: vl-rise-in 320ms ease both;
}

.vl-insight-card {
  display: flex;
  align-items: center;
  gap: 0.58rem;
  min-height: 3.7rem;
  padding: 0.7rem 0.82rem;
  border: 1px solid hsl(var(--border) / 0.7);
  border-radius: 0.9rem;
  background: linear-gradient(145deg, hsl(var(--card)), hsl(var(--secondary) / 0.4));
  box-shadow: 0 8px 20px hsl(var(--villa-shadow) / 0.05), inset 0 1px hsl(0 0% 100% / 0.68);
}

.vl-insight-card > .vl-icon {
  width: 1.35rem;
  height: 1.35rem;
  color: hsl(var(--primary));
}

.vl-insight-card > span {
  display: flex;
  flex-direction: column;
}

.vl-insight-card strong {
  font-family: Outfit, "DM Sans", sans-serif;
  font-size: 1.08rem;
  line-height: 1;
}

.vl-insight-card small {
  margin-top: 0.18rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.63rem;
}

.vl-report-insights > .vl-soft-button {
  align-self: stretch;
  min-width: 7.5rem;
}

/* Booking dialog più leggibile e dinamico */
.vl-booking-dialog {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--primary) / 0.75) hsl(var(--muted) / 0.75);
  border-color: hsl(var(--accent) / 0.34) !important;
  animation: vl-dialog-in 260ms cubic-bezier(0.18, 0.8, 0.25, 1) both;
}

.vl-booking-dialog::-webkit-scrollbar {
  width: 0.72rem;
}

.vl-booking-dialog::-webkit-scrollbar-track {
  margin-block: 1rem;
  border-radius: 99px;
  background: hsl(var(--muted) / 0.7);
}

.vl-booking-dialog::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 99px;
  background: linear-gradient(hsl(var(--primary)), hsl(var(--villa-blue)));
  background-clip: padding-box;
}

.vl-booking-dialog::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--villa-gold)), hsl(var(--primary)));
  content: "";
}

.vl-dialog-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
  color: hsl(var(--primary));
  font-size: 0.65rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vl-dialog-kicker .vl-icon {
  width: 0.9rem;
  height: 0.9rem;
}

/* Command palette */
.vl-command-layer,
.vl-module-drawer {
  position: fixed;
  inset: 0;
  z-index: 9998;
  visibility: hidden;
  pointer-events: none;
}

.vl-command-layer.is-open,
.vl-module-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.vl-command-backdrop,
.vl-drawer-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  opacity: 0;
  border: 0;
  border-radius: 0 !important;
  background: hsl(154 36% 8% / 0.5);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  transition: opacity 180ms ease;
}

.vl-command-layer.is-open .vl-command-backdrop,
.vl-module-drawer.is-open .vl-drawer-backdrop {
  opacity: 1;
}

.vl-command-palette {
  position: absolute;
  top: min(15vh, 8.5rem);
  left: 50%;
  width: min(42rem, calc(100vw - 2rem));
  max-height: min(72vh, 42rem);
  overflow: hidden;
  opacity: 0;
  border: 1px solid hsl(var(--border));
  border-radius: 1.25rem;
  background: hsl(var(--card) / 0.98);
  box-shadow: 0 35px 110px hsl(154 42% 7% / 0.3), inset 0 1px hsl(0 0% 100% / 0.75);
  transform: translate(-50%, -12px) scale(0.975);
  transition: opacity 170ms ease, transform 210ms cubic-bezier(0.18, 0.8, 0.25, 1);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

.vl-command-layer.is-open .vl-command-palette {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.vl-command-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid hsl(var(--border) / 0.7);
}

.vl-command-search > .vl-icon {
  width: 1.3rem;
  height: 1.3rem;
  color: hsl(var(--primary));
}

.vl-command-search input {
  height: 2.6rem;
  padding: 0 !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 1rem;
}

.vl-command-search kbd {
  padding: 0.23rem 0.42rem;
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: 0.42rem;
  background: hsl(var(--muted) / 0.65);
  font-family: inherit;
  font-size: 0.6rem;
}

.vl-command-results {
  max-height: min(52vh, 31rem);
  padding: 0.55rem;
  overflow-y: auto;
}

.vl-results-label {
  display: block;
  padding: 0.42rem 0.58rem 0.35rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.vl-command-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.72rem;
  min-height: 3.45rem;
  padding: 0.58rem 0.68rem;
  color: hsl(var(--foreground));
  border: 1px solid transparent;
  border-radius: 0.82rem;
  text-decoration: none;
}

.vl-command-result:hover,
.vl-command-result.is-selected {
  color: hsl(var(--foreground));
  border-color: hsl(var(--primary) / 0.16);
  background: linear-gradient(100deg, hsl(var(--primary) / 0.1), hsl(var(--accent) / 0.08));
}

.vl-command-result > .vl-icon:first-child {
  display: grid;
  width: 2rem;
  height: 2rem;
  padding: 0.48rem;
  color: hsl(var(--primary));
  border-radius: 0.62rem;
  background: hsl(var(--primary) / 0.1);
}

.vl-command-result > .vl-icon:last-child {
  width: 0.95rem;
  height: 0.95rem;
  color: hsl(var(--muted-foreground));
}

.vl-command-footer {
  padding: 0.62rem 1rem;
  color: hsl(var(--muted-foreground));
  border-top: 1px solid hsl(var(--border) / 0.68);
  background: hsl(var(--muted) / 0.38);
  font-size: 0.65rem;
  text-align: center;
}

.vl-empty-command {
  padding: 2rem 1rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.8rem;
  text-align: center;
}

/* Drawer moduli, usabile su desktop e mobile */
.vl-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: min(34rem, 94vw);
  flex-direction: column;
  padding: 1.15rem;
  border-left: 1px solid hsl(var(--border));
  background:
    radial-gradient(circle at 100% 0%, hsl(var(--villa-gold) / 0.15), transparent 18rem),
    hsl(var(--card) / 0.98);
  box-shadow: -28px 0 90px hsl(154 42% 7% / 0.22);
  transform: translateX(102%);
  transition: transform 260ms cubic-bezier(0.2, 0.78, 0.25, 1);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.vl-module-drawer.is-open .vl-drawer-panel {
  transform: translateX(0);
}

.vl-drawer-handle {
  display: none;
}

.vl-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0.15rem 0.85rem;
}

.vl-drawer-header h2 {
  margin: 0.22rem 0 0;
  font-family: Outfit, "DM Sans", sans-serif;
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}

.vl-icon-button {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0.65rem;
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  background: hsl(var(--card) / 0.8);
  place-items: center;
}

.vl-icon-button:hover {
  color: hsl(var(--foreground));
  border-color: hsl(var(--primary) / 0.3);
  background: hsl(var(--primary) / 0.08);
}

.vl-drawer-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  padding: 0 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.85rem;
  background: hsl(var(--card) / 0.76);
}

.vl-drawer-search .vl-icon {
  color: hsl(var(--primary));
}

.vl-drawer-search input {
  height: 2.75rem;
  padding: 0 !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.vl-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.58rem;
  padding: 0.1rem;
  overflow-y: auto;
}

.vl-module-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.62rem;
  min-height: 4.3rem;
  padding: 0.7rem;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border) / 0.68);
  border-radius: 0.9rem;
  background: linear-gradient(145deg, hsl(var(--card)), hsl(var(--secondary) / 0.34));
  text-decoration: none;
}

.vl-module-card[hidden] {
  display: none !important;
}

.vl-module-card > .vl-icon:first-child {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0.5rem;
  color: hsl(var(--primary));
  border-radius: 0.68rem;
  background: hsl(var(--primary) / 0.09);
}

.vl-module-card > .vl-icon:last-child {
  width: 0.9rem;
  height: 0.9rem;
  color: hsl(var(--muted-foreground) / 0.62);
}

.vl-module-card:hover,
.vl-module-card.is-active {
  color: hsl(var(--foreground));
  border-color: hsl(var(--primary) / 0.3);
  background: linear-gradient(145deg, hsl(var(--primary) / 0.105), hsl(var(--accent) / 0.08));
  box-shadow: 0 10px 25px hsl(var(--villa-shadow) / 0.08);
  transform: translateY(-2px);
}

/* Palette piu viva: verde salentino, turchese, arancio e viola. */
body {
  background:
    radial-gradient(circle at 5% 0%, hsl(var(--villa-gold) / 0.23), transparent 28rem),
    radial-gradient(circle at 98% 6%, hsl(var(--villa-cyan) / 0.14), transparent 31rem),
    radial-gradient(circle at 78% 100%, hsl(var(--villa-violet) / 0.09), transparent 32rem),
    hsl(var(--background));
}

[data-sidebar="sidebar"] {
  background:
    radial-gradient(circle at 8% 0%, hsl(var(--villa-gold) / 0.22), transparent 16rem),
    radial-gradient(circle at 100% 72%, hsl(var(--villa-cyan) / 0.1), transparent 18rem),
    linear-gradient(165deg, hsl(0 0% 100%), hsl(var(--sidebar-background)) 48%, hsl(158 45% 94%)) !important;
}

[data-sidebar="menu-button"][data-active="true"] {
  border-color: hsl(var(--villa-gold) / 0.82);
  background: linear-gradient(135deg, hsl(43 98% 69%), hsl(var(--villa-gold)) 58%, hsl(var(--villa-coral) / 0.9)) !important;
}

header.sticky.top-0 {
  background:
    linear-gradient(110deg, hsl(var(--card) / 0.97), hsl(var(--secondary) / 0.82) 58%, hsl(var(--villa-gold) / 0.18)) !important;
}

.vl-context-bar {
  border-color: hsl(var(--primary) / 0.22);
  background:
    radial-gradient(circle at 94% 0%, hsl(var(--villa-gold) / 0.32), transparent 18rem),
    radial-gradient(circle at 0% 100%, hsl(var(--villa-cyan) / 0.14), transparent 21rem),
    linear-gradient(135deg, hsl(var(--card) / 0.98), hsl(var(--secondary) / 0.67));
}

.vl-action-pill.is-primary {
  border-color: hsl(var(--primary) / 0.74);
  background: linear-gradient(135deg, hsl(154 76% 42%), hsl(var(--primary)) 58%, hsl(174 72% 31%));
  box-shadow: 0 10px 25px hsl(var(--primary) / 0.27), inset 0 1px hsl(0 0% 100% / 0.3);
}

.vl-launcher-card {
  background:
    radial-gradient(circle at 100% 100%, hsl(var(--vl-card-accent) / 0.22), transparent 8rem),
    linear-gradient(145deg, hsl(var(--card)), hsl(var(--secondary) / 0.32));
}

.vl-launcher-card.is-blue { --vl-card-accent: var(--villa-blue); }
.vl-launcher-card.is-violet { --vl-card-accent: var(--villa-violet); }

.vl-launcher-icon {
  color: hsl(var(--vl-card-accent));
  border-color: hsl(var(--vl-card-accent) / 0.34);
  background: hsl(var(--vl-card-accent) / 0.16);
  box-shadow: 0 8px 20px hsl(var(--vl-card-accent) / 0.13);
}

/* Dashboard operativo: grafici leggeri, senza librerie esterne. */
.vl-performance-dashboard {
  margin: 0.85rem 1.2rem 0;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid hsl(var(--primary) / 0.2);
  border-radius: 1.3rem;
  background:
    radial-gradient(circle at 0% 0%, hsl(var(--villa-cyan) / 0.12), transparent 22rem),
    radial-gradient(circle at 100% 100%, hsl(var(--villa-violet) / 0.09), transparent 22rem),
    hsl(var(--card) / 0.88);
  box-shadow: 0 18px 50px hsl(var(--villa-shadow) / 0.09), inset 0 1px hsl(0 0% 100% / 0.76);
  animation: vl-rise-in 500ms 130ms cubic-bezier(0.18, 0.8, 0.28, 1) both;
}

.vl-performance-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.vl-performance-heading h3 {
  margin: 0.16rem 0 0;
  font-family: Outfit, "DM Sans", sans-serif;
  font-size: 1.12rem;
  font-weight: 780;
  letter-spacing: -0.035em;
}

.vl-performance-heading p {
  margin: 0.18rem 0 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.76rem;
}

.vl-refresh-performance .vl-icon {
  color: hsl(var(--primary));
}

.vl-performance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(14rem, 0.72fr) minmax(14rem, 0.78fr);
  gap: 0.75rem;
}

.vl-performance-card {
  position: relative;
  min-width: 0;
  padding: 0.88rem;
  overflow: hidden;
  border: 1px solid hsl(var(--border) / 0.78);
  border-radius: 1.05rem;
  background: hsl(var(--card) / 0.9);
  box-shadow: 0 10px 28px hsl(var(--villa-shadow) / 0.07), inset 0 1px hsl(0 0% 100% / 0.72);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.vl-performance-card::before {
  position: absolute;
  top: 0;
  right: 0.8rem;
  left: 0.8rem;
  height: 3px;
  border-radius: 0 0 99px 99px;
  background: linear-gradient(90deg, transparent, hsl(var(--primary)), hsl(var(--villa-cyan)), transparent);
  content: "";
}

.vl-flow-card::before {
  background: linear-gradient(90deg, transparent, hsl(var(--villa-gold)), hsl(var(--villa-coral)), transparent);
}

.vl-sources-card::before {
  background: linear-gradient(90deg, transparent, hsl(var(--villa-blue)), hsl(var(--villa-violet)), transparent);
}

.vl-performance-card:hover {
  border-color: hsl(var(--primary) / 0.32);
  box-shadow: 0 16px 36px hsl(var(--villa-shadow) / 0.12), inset 0 1px hsl(0 0% 100% / 0.8);
  transform: translateY(-2px);
}

.vl-performance-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.55rem;
}

.vl-performance-card-heading h4 {
  margin: 0.1rem 0 0;
  font-family: Outfit, "DM Sans", sans-serif;
  font-size: 0.88rem;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.vl-chart-metric {
  display: flex;
  min-width: 4.2rem;
  flex-direction: column;
  align-items: flex-end;
}

.vl-chart-metric strong {
  color: hsl(var(--primary));
  font-family: Outfit, "DM Sans", sans-serif;
  font-size: 1.6rem;
  line-height: 1;
}

.vl-chart-metric small {
  margin-top: 0.18rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.58rem;
}

.vl-occupancy-card svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 13rem;
  overflow: visible;
}

.vl-chart-grid {
  stroke: hsl(var(--border) / 0.72);
  stroke-dasharray: 4 5;
  stroke-width: 1;
}

.vl-chart-axis,
.vl-chart-date {
  fill: hsl(var(--muted-foreground));
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
}

.vl-chart-area {
  fill: url(#vl-occupancy-gradient);
}

.vl-chart-line {
  fill: none;
  stroke: #00a97f;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  filter: drop-shadow(0 5px 8px rgb(0 169 127 / 0.25));
}

.vl-chart-dot {
  fill: #fff;
  stroke: #00a97f;
  stroke-width: 3;
  transition: r 150ms ease, fill 150ms ease;
}

.vl-chart-dot:hover {
  r: 6.5px;
  fill: #ffb000;
}

.vl-chart-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 0.45rem;
  color: hsl(var(--muted-foreground));
  border-top: 1px solid hsl(var(--border) / 0.6);
  font-size: 0.62rem;
  font-weight: 650;
}

.vl-flow-chart {
  display: grid;
  gap: 0.52rem;
  margin-top: 0.75rem;
}

.vl-flow-row {
  display: grid;
  grid-template-columns: 3.15rem minmax(0, 1fr);
  align-items: center;
  gap: 0.52rem;
}

.vl-flow-date {
  color: hsl(var(--muted-foreground));
  font-size: 0.62rem;
  font-weight: 720;
  text-transform: capitalize;
}

.vl-flow-bars {
  display: grid;
  gap: 0.18rem;
}

.vl-flow-bars i {
  position: relative;
  display: block;
  width: var(--vl-size);
  min-width: 0.18rem;
  height: 0.48rem;
  border-radius: 99px;
  transition: width 300ms ease, filter 180ms ease;
}

.vl-flow-bars i:hover {
  filter: saturate(1.2) brightness(1.05);
}

.vl-flow-bars i.is-arrivals {
  background: linear-gradient(90deg, #00b894, #00d9b1);
}

.vl-flow-bars i.is-departures {
  background: linear-gradient(90deg, #ff8a00, #ff4d6d);
}

.vl-flow-bars b {
  position: absolute;
  top: 50%;
  right: -1.15rem;
  color: hsl(var(--foreground) / 0.72);
  font-size: 0.55rem;
  font-style: normal;
  transform: translateY(-50%);
}

.vl-flow-legend {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.75rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.61rem;
  font-weight: 650;
}

.vl-flow-legend span::before {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.3rem;
  border-radius: 50%;
  content: "";
}

.vl-flow-legend .is-arrivals::before { background: #00b894; }
.vl-flow-legend .is-departures::before { background: #ff6b35; }

.vl-sources-content {
  display: grid;
  grid-template-columns: minmax(6.4rem, 0.72fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.vl-source-ring {
  display: grid;
  width: min(100%, 8rem);
  aspect-ratio: 1;
  padding: 0.72rem;
  border-radius: 50%;
  place-items: center;
  box-shadow: 0 14px 28px hsl(var(--villa-shadow) / 0.13);
}

.vl-source-ring > span {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 6px solid hsl(var(--card) / 0.92);
  border-radius: 50%;
  background: hsl(var(--card));
  box-shadow: inset 0 3px 12px hsl(var(--villa-shadow) / 0.08);
}

.vl-source-ring strong {
  font-family: Outfit, "DM Sans", sans-serif;
  font-size: 1.35rem;
  line-height: 1;
}

.vl-source-ring small {
  margin-top: 0.22rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.54rem;
}

.vl-source-list {
  display: grid;
  gap: 0.52rem;
}

.vl-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.48rem;
  font-size: 0.64rem;
}

.vl-source-row > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.34rem;
  overflow: hidden;
  color: hsl(var(--muted-foreground));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vl-source-row i {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.vl-source-row b {
  color: hsl(var(--foreground));
  font-size: 0.65rem;
}

.vl-performance-skeleton,
.vl-performance-error {
  min-height: 8rem;
  display: grid;
  place-items: center;
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.78rem;
}

.vl-performance-skeleton {
  border-radius: 1rem;
  background: linear-gradient(100deg, hsl(var(--muted) / 0.6) 30%, hsl(var(--card)) 47%, hsl(var(--muted) / 0.6) 64%);
  background-size: 240% 100%;
  animation: vl-performance-loading 1.4s linear infinite;
}

@keyframes vl-performance-loading {
  to { background-position: -140% 0; }
}

.vl-mobile-nav {
  display: none;
}

.vl-booking-modal-open .vl-mobile-nav {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  animation: none !important;
  transform: translateY(120%) !important;
}

/* Micro-interazioni applicate senza modificare i componenti React */
.vl-ripple::after {
  position: absolute;
  top: var(--vl-ripple-y, 50%);
  left: var(--vl-ripple-x, 50%);
  width: 0.45rem;
  height: 0.45rem;
  opacity: 0;
  border-radius: 50%;
  background: currentColor;
  content: "";
  pointer-events: none;
  animation: vl-ripple 480ms ease-out;
}

.vl-route-enter {
  animation: vl-route-enter 360ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

@keyframes vl-rise-in {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes vl-route-enter {
  from { opacity: 0.5; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes vl-dialog-in {
  from { opacity: 0; transform: translate(-50%, -47%) scale(0.975); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes vl-status-pulse {
  0% { box-shadow: 0 0 0 0 hsl(148 58% 43% / 0.42); }
  70%, 100% { box-shadow: 0 0 0 7px hsl(148 58% 43% / 0); }
}

@keyframes vl-ripple {
  0% { opacity: 0.2; transform: translate(-50%, -50%) scale(0.5); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(18); }
}

@media (max-width: 1180px) {
  .vl-launcher-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vl-performance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vl-occupancy-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .vl-context-bar {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .vl-context-side {
    min-width: 0;
    align-items: flex-start;
  }

  .vl-context-actions {
    justify-content: flex-start;
  }

  .vl-report-insights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vl-report-insights > .vl-soft-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .vl-modern-shell {
    padding-bottom: calc(5.4rem + env(safe-area-inset-bottom, 0px));
  }

  .vl-modern-shell [data-sidebar="trigger"] {
    display: none !important;
  }

  .vl-context-bar {
    gap: 0.68rem;
    margin: 0.72rem 0.68rem 0;
    padding: 0.9rem;
    border-radius: 1.05rem;
  }

  .vl-context-intro h2 {
    font-size: 1.18rem;
  }

  .vl-context-intro p {
    font-size: 0.76rem;
    line-height: 1.4;
  }

  .vl-context-eyebrow {
    gap: 0.42rem;
  }

  .vl-live-status,
  .vl-context-section {
    font-size: 0.58rem;
  }

  .vl-live-clock {
    display: none;
  }

  .vl-context-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .vl-action-pill {
    min-height: 2.5rem;
    padding: 0.45rem;
    font-size: 0.64rem;
  }

  .vl-action-pill .vl-icon {
    width: 1rem;
    height: 1rem;
  }

  .vl-dashboard-launcher {
    margin: 0.65rem 0.68rem 0;
    padding: 0.78rem;
    border-radius: 1.05rem;
  }

  .vl-performance-dashboard {
    margin: 0.65rem 0.68rem 0;
    padding: 0.78rem;
    border-radius: 1.05rem;
  }

  .vl-performance-heading {
    align-items: flex-start;
  }

  .vl-performance-heading p {
    max-width: 15rem;
  }

  .vl-refresh-performance {
    min-width: 2.35rem;
    width: 2.35rem;
    padding: 0.55rem;
    font-size: 0;
  }

  .vl-performance-grid {
    grid-template-columns: 1fr;
  }

  .vl-occupancy-card {
    grid-column: auto;
  }

  .vl-performance-card {
    padding: 0.72rem;
  }

  .vl-occupancy-card svg {
    min-width: 34rem;
  }

  .vl-occupancy-card {
    overflow-x: auto;
  }

  .vl-sources-content {
    grid-template-columns: minmax(6rem, 0.65fr) 1fr;
  }

  .vl-launcher-heading {
    align-items: flex-start;
  }

  .vl-launcher-heading h3 {
    font-size: 0.96rem;
  }

  .vl-command-trigger {
    width: 2.35rem;
    min-width: 2.35rem;
    height: 2.35rem;
    padding: 0.62rem;
  }

  .vl-command-trigger span:not(.vl-icon),
  .vl-command-trigger kbd {
    display: none;
  }

  .vl-launcher-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .vl-launcher-card {
    min-height: 4.45rem;
    padding: 0.68rem;
  }

  .vl-booking-tools {
    margin-inline: 0;
  }

  .vl-booking-mode {
    width: 100%;
  }

  .vl-booking-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .vl-calendar-navigation {
    position: sticky;
    left: 0;
    z-index: 6;
    gap: 0.4rem;
    padding: 0.5rem;
  }

  .vl-calendar-navigation-copy {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.08rem 0.4rem;
    line-height: 1.15;
  }

  .vl-calendar-navigation-copy .vl-icon {
    grid-row: 1 / 3;
  }

  .vl-calendar-navigation-copy small {
    display: block;
  }

  .vl-calendar-progress {
    display: none;
  }

  .vl-calendar-arrow {
    width: 2.45rem;
    min-width: 2.45rem;
    height: 2.45rem;
  }

  .vl-smart-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vl-smart-legend.is-open {
    max-height: 9rem;
  }

  .vl-report-insights {
    grid-template-columns: 1fr 1fr;
  }

  .vl-insight-card:last-of-type {
    grid-column: 1 / -1;
  }

  .vl-mobile-nav {
    position: fixed;
    right: 0.55rem;
    bottom: calc(0.55rem + env(safe-area-inset-bottom, 0px));
    left: 0.55rem;
    z-index: 9000;
    display: grid;
    grid-template-columns: repeat(var(--vl-mobile-items, 5), minmax(0, 1fr));
    gap: 0.16rem;
    min-height: 4.55rem;
    padding: 0.42rem;
    border: 1px solid hsl(var(--sidebar-border) / 0.72);
    border-radius: 1.18rem;
    background:
      radial-gradient(circle at 100% 0%, hsl(var(--villa-gold) / 0.16), transparent 10rem),
      hsl(var(--sidebar-background) / 0.97);
    box-shadow: 0 18px 55px hsl(154 42% 7% / 0.2), inset 0 1px hsl(0 0% 100% / 0.72);
    -webkit-backdrop-filter: blur(20px) saturate(135%);
    backdrop-filter: blur(20px) saturate(135%);
    animation: vl-mobile-nav-in 440ms cubic-bezier(0.18, 0.8, 0.25, 1) both;
  }

  .vl-mobile-nav-item {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 3.65rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    padding: 0.32rem 0.15rem;
    overflow: visible;
    color: hsl(var(--sidebar-foreground) / 0.68);
    border: 1px solid transparent;
    border-radius: 0.83rem !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0.58rem;
    font-weight: 680;
    line-height: 1;
    text-decoration: none;
  }

  .vl-mobile-nav-item .vl-icon {
    width: 1.18rem;
    height: 1.18rem;
  }

  .vl-mobile-nav-item:hover,
  .vl-mobile-nav-item.is-active {
    color: hsl(var(--sidebar-primary-foreground));
    border-color: hsl(var(--villa-gold) / 0.42);
    background: linear-gradient(145deg, hsl(42 66% 89%), hsl(var(--sidebar-primary))) !important;
    transform: translateY(-1px);
  }

  .vl-mobile-nav-item.is-active::after {
    position: absolute;
    bottom: -0.08rem;
    width: 0.32rem;
    height: 0.32rem;
    border-radius: 50%;
    background: hsl(var(--villa-gold));
    box-shadow: 0 0 0 3px hsl(var(--villa-gold) / 0.15);
    content: "";
  }

  .vl-drawer-panel {
    top: auto;
    left: 0;
    width: 100%;
    max-height: min(82vh, 46rem);
    padding: 0.65rem 0.75rem calc(1rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid hsl(var(--border));
    border-left: 0;
    border-radius: 1.35rem 1.35rem 0 0;
    box-shadow: 0 -25px 80px hsl(154 42% 7% / 0.28);
    transform: translateY(103%);
  }

  .vl-module-drawer.is-open .vl-drawer-panel {
    transform: translateY(0);
  }

  .vl-drawer-handle {
    display: block;
    width: 2.8rem;
    height: 0.27rem;
    margin: 0 auto 0.52rem;
    border-radius: 99px;
    background: hsl(var(--muted-foreground) / 0.3);
  }

  .vl-module-grid {
    grid-template-columns: 1fr 1fr;
    padding-bottom: 0.5rem;
  }

  .vl-module-card {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 4rem;
    gap: 0.52rem;
    padding: 0.6rem;
  }

  .vl-module-card > .vl-icon:last-child {
    display: none;
  }

  .vl-command-palette {
    top: 4.5rem;
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 9rem);
    border-radius: 1.1rem;
  }

  .vl-command-results {
    max-height: calc(100vh - 15rem);
  }

  .vl-command-footer {
    display: none;
  }

  .vl-booking-dialog {
    max-height: calc(100dvh - 1rem) !important;
    padding-right: 1.05rem !important;
    padding-left: 1.05rem !important;
  }

  @keyframes vl-mobile-nav-in {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

@media (max-width: 430px) {
  .vl-context-actions {
    grid-template-columns: 1fr 1fr;
  }

  .vl-context-actions > :last-child {
    grid-column: 1 / -1;
  }

  .vl-module-grid {
    grid-template-columns: 1fr;
  }

  .vl-module-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .vl-module-card > .vl-icon:last-child {
    display: grid;
  }
}

@media print {
  :root {
    --background: 0 0% 100%;
    --card: 0 0% 100%;
  }

  body,
  main.flex-1.overflow-auto,
  header.sticky.top-0,
  [data-sidebar="sidebar"],
  .shadcn-card {
    background: #fff !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .shadcn-card::before,
  header.sticky.top-0::after,
  [data-sidebar="sidebar"]::after,
  .vl-context-bar,
  .vl-dashboard-launcher,
  .vl-performance-dashboard,
  .vl-booking-tools,
  .vl-mobile-nav,
  .vl-command-layer,
  .vl-module-drawer {
    display: none !important;
  }

  * {
    animation: none !important;
    transition: none !important;
  }
}
