/* ============================================================
   Mensa Italia — tema Gatus
   Ridefinisce i token shadcn (--primary, --background, --card,
   --border, --radius…) sulla palette del sito + layout verticale
   "status page". Palette: blu #1d2f6f, parchment (chiaro),
   cobalt-night (scuro). Vedi ../mensa-website design system.
   ============================================================ */

/* ---- Token: tema chiaro (parchment) ---- */
:root {
  --background: 40 33% 98%;
  --foreground: 225 30% 12%;
  --card: 0 0% 100%;
  --card-foreground: 225 30% 12%;
  --popover: 0 0% 100%;
  --popover-foreground: 225 30% 12%;
  --primary: 227 59% 27%;          /* Mensa blue #1d2f6f */
  --primary-foreground: 0 0% 100%;
  --secondary: 222 40% 95%;
  --secondary-foreground: 227 59% 27%;
  --muted: 220 24% 95%;
  --muted-foreground: 222 12% 42%;
  --accent: 222 45% 94%;
  --accent-foreground: 227 59% 27%;
  --destructive: 2 66% 52%;
  --destructive-foreground: 0 0% 100%;
  --border: 222 24% 89%;
  --input: 222 24% 89%;
  --ring: 227 55% 40%;
  --radius: 0.9rem;
}

/* ---- Token: tema scuro (cobalt-night) ---- */
:root.dark {
  --background: 226 44% 9%;
  --foreground: 210 30% 96%;
  --card: 226 38% 12%;
  --card-foreground: 210 30% 96%;
  --popover: 226 38% 12%;
  --popover-foreground: 210 30% 96%;
  --primary: 214 72% 66%;          /* blu chiaro leggibile su scuro */
  --primary-foreground: 226 44% 10%;
  --secondary: 222 30% 18%;
  --secondary-foreground: 210 30% 96%;
  --muted: 222 28% 16%;
  --muted-foreground: 216 18% 66%;
  --accent: 222 30% 18%;
  --accent-foreground: 210 30% 96%;
  --destructive: 2 60% 46%;
  --destructive-foreground: 0 0% 100%;
  --border: 220 26% 22%;
  --input: 220 26% 22%;
  --ring: 214 60% 60%;
}

/* ---- Tipografia (Inter, come il sito) ---- */
#global,
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Layout: colonna singola verticale, centrata (status page) ---- */
#global .container {
  max-width: 880px !important;
}
/* SOLO le griglie di endpoint/suite della home (lg:grid-cols-3) diventano
   a colonna singola. Le pagine di dettaglio usano griglie lg:grid-cols-4
   (schede statistiche) che così restano affiancate, senza effetto verticale. */
.dashboard-container .grid.lg\:grid-cols-3 {
  grid-template-columns: 1fr !important;
  gap: 0.6rem !important;
}

/* ---- Header brand ---- */
header {
  background: hsl(var(--card)) !important;
  border-bottom: 1px solid hsl(var(--border));
}
header h1 {
  color: hsl(var(--primary));
  letter-spacing: -0.02em;
}
/* Logo "clean" (marchio senza sfondo): blu in chiaro, bianco in scuro */
header img {
  object-fit: contain;
}
:root.dark header img {
  filter: brightness(0) invert(1);
}

/* ---- Titolo dashboard ---- */
.dashboard-container h1.text-4xl {
  letter-spacing: -0.03em;
  font-weight: 800;
}

/* ---- Gruppi + card endpoint ---- */
.endpoint-group {
  border-radius: calc(var(--radius) + 2px) !important;
  box-shadow: 0 1px 2px hsl(227 40% 20% / 6%);
}
.endpoint {
  border: 1px solid hsl(var(--border)) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 1px 2px hsl(227 40% 20% / 5%);
}
.endpoint:hover {
  border-color: hsl(var(--primary) / 0.45) !important;
}

/* ---- Barre uptime: verde/rosso nella palette Mensa ---- */
.bg-green-500 {
  background-color: hsl(145 48% 42%) !important;
}
.bg-green-500:hover,
.bg-green-700 {
  background-color: hsl(145 52% 32%) !important;
}
.bg-red-500 {
  background-color: hsl(2 66% 55%) !important;
}
.bg-red-500:hover,
.bg-red-700 {
  background-color: hsl(2 68% 44%) !important;
}
.text-green-600 {
  color: hsl(145 48% 38%) !important;
}
.bg-red-600 {
  background-color: hsl(2 66% 50%) !important;
}
.bg-success {
  background-color: hsl(145 48% 42%) !important;
}

/* ---- Rimozione branding Gatus: footer "Powered by Gatus" + logo GitHub ---- */
footer {
  display: none !important;
}
#social {
  display: none !important;
}
