/* =====================================================================
   Vynetic — styles.css (PRECOMPILATO A MANO per anteprima senza Node)
   ---------------------------------------------------------------------
   Questo file riproduce le utility Tailwind usate in index.html così che
   la pagina sia visibile aprendola direttamente nel browser.
   In produzione, dopo `npm install`, rigenera con:  npm run build
   (Tailwind sovrascriverà questo file con l'output canonico minificato.)
   ===================================================================== */

/* ---------- Reset / base (sottoinsieme di Preflight) ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #475569;
}
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; line-height: 1.5; }
.scroll-smooth, html.scroll-smooth { scroll-behavior: smooth; }
body {
  background-color: #121212;
  color: rgba(255, 255, 255, 0.95);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
h1, h2, h3, p { margin: 0; }
ul { list-style: none; padding: 0; margin: 0; }
a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
pre, code { font-family: inherit; }
svg { display: inline-block; vertical-align: middle; }
::selection { background-color: rgba(0, 229, 255, 0.25); }

/* ---------- Tipografia (variabili contrasto) ---------- */
:root {
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.70);
  --text-muted: rgba(255, 255, 255, 0.40);
}

/* =====================================================================
   COMPONENTI (@layer components nel sorgente)
   ===================================================================== */
.container-vynetic {
  width: 100%;
  max-width: 75rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.375rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 2.75rem; /* 44px touch target */
  transition: background-color 150ms, color 150ms, border-color 150ms;
}
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border-radius: 0.375rem; padding-left: 1.5rem; padding-right: 1.5rem; font-size: 0.875rem; font-weight: 600; min-height: 2.75rem; transition: background-color 150ms, color 150ms, border-color 150ms; background-color: #00E5FF; color: #121212; }
.btn-primary:hover { background-color: #33eaff; }

.btn-outline { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border-radius: 0.375rem; padding-left: 1.5rem; padding-right: 1.5rem; font-size: 0.875rem; font-weight: 600; min-height: 2.75rem; transition: background-color 150ms, color 150ms, border-color 150ms; border-width: 1px; border-color: #00E5FF; background-color: transparent; color: #00E5FF; }
.btn-outline:hover { background-color: #00E5FF; color: #121212; }

.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border-radius: 0.375rem; padding-left: 1.5rem; padding-right: 1.5rem; font-size: 0.875rem; font-weight: 600; min-height: 2.75rem; transition: background-color 150ms, color 150ms, border-color 150ms; border-width: 1px; border-color: #475569; background-color: transparent; color: var(--text-primary); }
.btn-ghost:hover { background-color: #334155; }

.card {
  border-radius: 0.5rem;
  border-width: 1px;
  border-color: #475569;
  background-color: #1E293B;
  padding: 2rem;
}

.label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 150ms;
}
.nav-link:hover { color: var(--text-primary); }

/* =====================================================================
   UTILITY
   ===================================================================== */

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Flex / grid */
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Gap */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.gap-x-6 { column-gap: 1.5rem; }
.gap-y-2 { row-gap: 0.5rem; }

/* Space between (vertical) */
.space-y-4 > * + * { margin-top: 1rem; }

/* Position */
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }

/* Sizing */
.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-11 { height: 2.75rem; }
.h-16 { height: 4rem; }
.w-2 { width: 0.5rem; }
.w-3 { width: 0.75rem; }
.w-11 { width: 2.75rem; }
.w-full { width: 100%; }

.max-w-content { max-width: 75rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }

/* Margin */
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-16 { margin-top: 4rem; }

/* Padding */
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }

/* Typography */
.font-sans { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-\[13px\] { font-size: 13px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.uppercase { text-transform: uppercase; }
.text-center { text-align: center; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Colors — background */
.bg-base { background-color: #121212; }
.bg-base\/95 { background-color: rgba(18, 18, 18, 0.95); }
.bg-surface-1 { background-color: #1E293B; }
.bg-surface-2 { background-color: #334155; }
.bg-accent { background-color: #00E5FF; }
.bg-success { background-color: #10B981; }
.bg-warning { background-color: #F59E0B; }
.bg-error { background-color: #EF4444; }
.bg-transparent { background-color: transparent; }

/* Colors — text */
.text-white { color: #ffffff; }
.text-accent { color: #00E5FF; }
.text-success { color: #10B981; }
.text-warning { color: #F59E0B; }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

/* Borders */
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-border-muted { border-color: #475569; }
.border-accent { border-color: #00E5FF; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* Effects / misc */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.backdrop-blur { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 150ms; }
.duration-150 { transition-duration: 150ms; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:w-auto { width: auto; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:block { display: block; }
  .md\:hidden { display: none; }
  .md\:flex-row { flex-direction: row; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:py-32 { padding-top: 8rem; padding-bottom: 8rem; }
  .md\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .md\:text-left { text-align: left; }
  .md\:items-end { align-items: flex-end; }
}

@media (min-width: 1024px) {
  .lg\:block { display: block; }
  .lg\:flex { display: flex; }
  .lg\:hidden { display: none; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* =====================================================================
   AUTH / LOGIN — aggiunte per la pagina di accesso "terminale sicuro"
   ===================================================================== */

/* Utility extra */
.min-h-screen { min-height: 100vh; }
.max-w-sm { max-width: 24rem; }
.text-error { color: #EF4444; }
.border-error { border-color: #EF4444; }
.border-success { border-color: #10B981; }
.border-warning { border-color: #F59E0B; }

/* Input field stile terminale: testo monospazio, focus ring ciano netto */
.input-terminal {
  width: 100%;
  border-radius: 0.375rem;
  border: 1px solid #475569;            /* --border-muted */
  background-color: #334155;            /* --surface-2 */
  padding: 0.625rem 0.875rem;
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.95);
  color-scheme: dark; /* picker nativi (date/time) in tema scuro */
  transition: border-color 150ms, box-shadow 150ms;
}
.input-terminal::placeholder { color: rgba(255, 255, 255, 0.40); }
.input-terminal:focus {
  outline: none;
  border-color: #00E5FF;                /* --accent-primary */
  box-shadow: 0 0 0 1px #00E5FF;        /* focus ring netto, non sfumato */
}
/* Stato di errore applicato dalla validazione client Vanilla JS */
.input-terminal.input-validation-error { border-color: #EF4444; }
.field-validation-error { color: #EF4444; }

/* Link sobrio (es. "Password dimenticata?") */
.link-subtle {
  color: rgba(255, 255, 255, 0.70);
  transition: color 150ms;
}
.link-subtle:hover {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
}

/* =====================================================================
   APP SHELL (area riservata) + tabella ad alta densità
   ===================================================================== */

/* Utility extra */
.h-screen { height: 100vh; }
.h-full { height: 100%; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.w-64 { width: 16rem; }
.overflow-y-auto { overflow-y: auto; }
.border-r { border-right-width: 1px; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.justify-end { justify-content: flex-end; }
.inline { display: inline; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.whitespace-nowrap { white-space: nowrap; }
.tabular-nums { font-variant-numeric: tabular-nums; }

/* Layout shell */
.app-shell { display: flex; height: 100vh; overflow: hidden; }
.app-sidebar {
  width: 16rem; flex-shrink: 0;
  background-color: #121212;
  border-right: 1px solid #475569;
  display: flex; flex-direction: column;
}
.app-body { flex: 1 1 0%; display: flex; flex-direction: column; min-width: 0; }
.app-topbar { background-color: #1E293B; border-bottom: 1px solid #475569; flex-shrink: 0; }
.app-content { flex: 1 1 0%; overflow-y: auto; background-color: #121212; }

/* Voci di navigazione sidebar */
.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.375rem;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem; font-weight: 500;
  color: rgba(255, 255, 255, 0.70);
  transition: background-color 150ms, color 150ms;
}
.sidebar-link:hover { background-color: #334155; color: rgba(255, 255, 255, 0.95); }
.sidebar-link.active { background-color: rgba(0, 229, 255, 0.10); color: #00E5FF; }
.sidebar-link svg { flex-shrink: 0; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 0.375rem;
  border-radius: 0.25rem; padding: 0.125rem 0.5rem;
  font-size: 0.6875rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  white-space: nowrap;
}
.badge-accent { border: 1px solid #00E5FF; color: #00E5FF; }
.badge-neutral { border: 1px solid #475569; color: rgba(255, 255, 255, 0.70); }
.badge-warning { border: 1px solid #F59E0B; color: #F59E0B; }

/* Tabella ad alta densità */
.table-network { width: 100%; border-collapse: collapse; background-color: #1E293B; }
.table-network thead th {
  text-align: left;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.70);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #475569;
  white-space: nowrap;
}
.table-network tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #475569;
  font-size: 0.875rem;
  vertical-align: middle;
}
.table-network tbody tr:last-child td { border-bottom: 0; }
.table-network tbody tr { transition: background-color 120ms; }
.table-network tbody tr:hover { background-color: rgba(0, 229, 255, 0.10); }
.cell-mono { font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace; font-size: 13px; }
.cell-num {
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  font-size: 13px; font-variant-numeric: tabular-nums; text-align: right;
}
.th-right { text-align: right !important; }

/* Bottoni azione mini */
.btn-xs {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2rem; padding: 0 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem; font-weight: 600;
  border: 1px solid #475569; background-color: transparent;
  color: rgba(255, 255, 255, 0.95);
  transition: border-color 150ms, color 150ms, background-color 150ms;
  white-space: nowrap;
}
.btn-xs:hover { border-color: #00E5FF; color: #00E5FF; }
.btn-xs-accent { border-color: #00E5FF; color: #00E5FF; }
.btn-xs-accent:hover { background-color: #00E5FF; color: #121212; }
.btn-xs-danger { border-color: #EF4444; color: #EF4444; }
.btn-xs-danger:hover { background-color: #EF4444; color: #121212; }
.btn-xs-success { border-color: #10B981; color: #10B981; }
.btn-xs-success:hover { background-color: #10B981; color: #121212; }

/* Dot di stato neutro (es. agenzia disattivata) */
.bg-border-muted { background-color: #475569; }

/* =====================================================================
   LOG TRANSAZIONALI — badge stato, filtri, slide-over drawer
   ===================================================================== */
.badge-success { border: 1px solid #10B981; color: #10B981; }
.badge-error { border: 1px solid #EF4444; color: #EF4444; }

.w-40 { width: 10rem; }
.w-48 { width: 12rem; }

.drawer-backdrop {
  position: fixed; inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0; visibility: hidden;
  transition: opacity 200ms ease;
  z-index: 40;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; top: 0; right: 0;
  height: 100vh; width: 28rem; max-width: 100vw;
  display: flex; flex-direction: column;
  background-color: #1E293B;
  border-left: 1px solid #475569;
  transform: translateX(100%);
  transition: transform 220ms ease;
  z-index: 50;
}
.drawer.open { transform: translateX(0); }

/* =====================================================================
   INTEGRAZIONI — griglia delle piattaforme/webhook gestiti
   ===================================================================== */
.mt-12 { margin-top: 3rem; }

/* Card compatta a riga (logo + nome + source key) */
.card-compact {
  display: flex; align-items: center; gap: 0.875rem;
  border-radius: 0.5rem; border: 1px solid #475569;
  background-color: #1E293B; padding: 1rem 1.25rem;
  transition: border-color 150ms, background-color 150ms;
}
.card-compact:hover { border-color: #00E5FF; }

/* Lettermark monospazio coerente con i riquadri icona dei pillar */
.integration-logo {
  display: inline-flex; align-items: center; justify-content: center;
  height: 2.5rem; width: 2.5rem; flex-shrink: 0;
  border: 1px solid #475569; border-radius: 0.375rem;
  background-color: #121212;
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  font-weight: 700; font-size: 0.8125rem; color: #00E5FF;
}
.integration-logo img { display: block; height: 1.5rem; width: 1.5rem; object-fit: contain; }

/* Sul telefono i due riquadri affiancati sono più stretti di "WooCommerce", e un nome
   di una parola sola non si spezza: il testo usciva dal bordo della card. Sotto i 512px
   una colonna sola (il riquadro diventa largo il doppio e i nomi ci stanno interi). */
@media (max-width: 32rem) {
  #integrations .grid-cols-2 { grid-template-columns: minmax(0, 1fr); }
}

/* Rete di sicurezza: la colonna del testo può restringersi (senza questo un flex item
   non scende mai sotto la sua parola più lunga) e come ultima risorsa la parola va a capo. */
.card-compact { min-width: 0; }
.card-compact > :not(.integration-logo) { min-width: 0; overflow-wrap: anywhere; }

/* Intestazione dei riquadri di codice: sul telefono l'URL e il "202 Accepted" non stanno
   sulla stessa riga, e il secondo finiva tagliato fuori dal bordo. Ora vanno a capo. */
.code-head { flex-wrap: wrap; }
.code-head > .font-mono { min-width: 0; overflow-wrap: anywhere; }

/* =====================================================================
   BARRA IN ALTO — quando passare dal menu esteso al panino
   Logo + sette voci + bottone occupano ~1060px: più stretti di così le voci si
   accavallavano, "App & Dashboard" andava a capo e il bottone copriva "Prezzi".
   Soglia a 1216px, la stessa di Vynetic.LandingPage (che ha una voce in più).
   Sta qui, in un posto solo: le viste usano solo le classi.
   ===================================================================== */
.menu-esteso { display: none; }
.menu-compatto { display: flex; }

@media (min-width: 76rem) {
  .menu-esteso { display: flex; }
  .menu-compatto { display: none; }
  /* Il pannello del panino resta chiuso anche se il JS gli ha tolto "hidden". */
  .menu-compatto-pannello { display: none; }
}
