@import 'tailwindcss';

@theme {
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --color-brand-50: #f0fdfa;
  --color-brand-100: #ccfbf1;
  --color-brand-500: #14b8a6;
  --color-brand-600: #0d9488;
  --color-brand-700: #0f766e;
  --color-brand-800: #115e59;
}

@layer base {
  html {
    -webkit-tap-highlight-color: transparent;
  }
  body {
    @apply bg-stone-50 text-stone-800 antialiased;
  }
}

/* Classi riusabili (in Tailwind 4 vanno dichiarate come utility per poterle comporre). */
@utility campo {
  @apply block w-full rounded-lg border border-stone-300 bg-white px-3 py-2 text-base text-stone-900 shadow-xs outline-none transition placeholder:text-stone-400 focus:border-brand-600 focus:ring-2 focus:ring-brand-600/20 sm:text-sm;
}
@utility campo-errore {
  @apply border-red-400 focus:border-red-500 focus:ring-red-500/20;
}
@utility etichetta {
  @apply mb-1 block text-sm font-medium text-stone-700;
}
@utility btn {
  @apply inline-flex items-center justify-center gap-2 rounded-lg px-4 py-2 text-sm font-semibold transition disabled:cursor-not-allowed disabled:opacity-50;
}
@utility btn-primario {
  @apply btn bg-brand-700 text-white shadow-sm hover:bg-brand-800;
}
@utility btn-secondario {
  @apply btn border border-stone-300 bg-white text-stone-700 shadow-xs hover:bg-stone-100;
}
@utility btn-pericolo {
  @apply btn border border-red-200 bg-white text-red-700 hover:bg-red-50;
}
@utility scheda {
  @apply rounded-xl border border-stone-200 bg-white shadow-xs;
}
