@tailwind base;
@tailwind components;
@tailwind utilities;

/* Sistema de design Orientador - Azul 
Todas as cores devem ser HSL.
*/

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 0 0% 0%;

    --card: 0 0% 100%;
    --card-foreground: 0 0% 0%;

    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 0%;

    /* Amarelo Orientador como cor primária */
    --primary: 48 100% 50%;
    --primary-foreground: 0 0% 0%;

    --secondary: 48 100% 95%;
    --secondary-foreground: 48 100% 30%;

    --muted: 0 0% 96%;
    --muted-foreground: 0 0% 45%;

    --accent: 48 100% 95%;
    --accent-foreground: 48 100% 30%;

    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 98%;

    --border: 0 0% 90%;
    --input: 0 0% 100%;
    --ring: 48 100% 50%;

    /* Cores específicas do sistema */
    --tccautomatico-blue: 48 100% 50%;
    --tccautomatico-white: 0 0% 100%;
    --error-red: 0 84% 60%;
    --success-green: 142 76% 36%;
    
    /* Estados de erro */
    --error-border: 0 84% 60%;
    --error-text: 0 84% 60%;

    --radius: 1.5rem;
    
    /* Glass effect tokens */
    --glass-bg: 255 255 255 / 0.05;
    --glass-border: 255 255 255 / 0.1;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);

    --sidebar-background: 0 0% 98%;

    --sidebar-foreground: 240 5.3% 26.1%;

    --sidebar-primary: 48 100% 50%;

    --sidebar-primary-foreground: 0 0% 0%;

    --sidebar-accent: 48 100% 95%;

    --sidebar-accent-foreground: 48 100% 30%;

    --sidebar-border: 220 13% 91%;

    --sidebar-ring: 48 100% 50%;
  }

  .dark {
    --background: 0 0% 5%;
    --foreground: 0 0% 98%;

    --card: 0 0% 8%;
    --card-foreground: 0 0% 98%;

    --popover: 0 0% 8%;
    --popover-foreground: 0 0% 98%;

    --primary: 48 100% 50%;
    --primary-foreground: 0 0% 0%;

    --secondary: 0 0% 12%;
    --secondary-foreground: 0 0% 98%;

    --muted: 0 0% 12%;
    --muted-foreground: 0 0% 65%;

    --accent: 0 0% 12%;
    --accent-foreground: 0 0% 98%;

    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 98%;

    --border: 0 0% 15%;
    --input: 0 0% 8%;
    --ring: 48 100% 50%;
    
    --sidebar-background: 0 0% 5%;
    --sidebar-foreground: 0 0% 98%;
    --sidebar-primary: 48 100% 50%;
    --sidebar-primary-foreground: 0 0% 0%;
    --sidebar-accent: 0 0% 12%;
    --sidebar-accent-foreground: 0 0% 98%;
    --sidebar-border: 0 0% 15%;
    --sidebar-ring: 48 100% 50%;
    
    /* Cores específicas modo escuro */
    --tccautomatico-blue: 48 100% 50%;
    --tccautomatico-white: 0 0% 100%;
    --error-red: 0 84% 60%;
    --success-green: 120 60% 50%;
    
    --error-border: 0 84% 60%;
    --error-text: 0 84% 60%;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-feature-settings: 'kern' 1, 'liga' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Melhorias para mobile */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
  }

  /* Prevenir zoom em inputs no iOS */
  input, select, textarea {
    font-size: 16px;
  }

  @media (max-width: 640px) {
    input, select, textarea {
      font-size: 16px !important;
    }
  }

  /* Melhorar toque em botões no mobile */
  button, 
  [role="button"], 
  .button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Overflow scroll suave */
  * {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Glass effect utility classes */
  .glass {
    background: rgba(var(--glass-bg));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--glass-border));
    box-shadow: var(--glass-shadow);
  }
  
  .glass-strong {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
  }
}
