@import "tailwindcss" source(none);
@source "../src";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

/*
 * GomezLee Marketing (GLM) design system — Cotizador Walmart Connect.
 * Brand palette: Azul GLM #4F758B, Verde GLM #6CC24A, neutrales grises.
 * Tipografia oficial GLM: Arial.
 */

@theme inline {
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-2xl: calc(var(--radius) + 8px);
  --radius-3xl: calc(var(--radius) + 12px);
  --radius-4xl: calc(var(--radius) + 16px);
  --font-sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-brand: var(--brand);
  --color-brand-foreground: var(--brand-foreground);
  --color-brand-soft: var(--brand-soft);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-ring-offset-background: var(--background);
  --color-surface: var(--surface);
  --color-surface-strong: var(--surface-strong);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
  --shadow-soft: 0 1px 2px oklch(0.318 0.031 235.8 / 0.06), 0 8px 24px -12px oklch(0.318 0.031 235.8 / 0.18);
  --shadow-lift: 0 2px 4px oklch(0.318 0.031 235.8 / 0.05), 0 24px 48px -20px oklch(0.318 0.031 235.8 / 0.28);
}

:root {
  --radius: 0.875rem;

  --background: oklch(0.983 0.003 219.5);
  --foreground: oklch(0.264 0.023 235.8);

  --card: oklch(1 0 0);
  --card-foreground: oklch(0.264 0.023 235.8);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.264 0.023 235.8);

  /* Azul GLM #4F758B */
  --primary: oklch(0.543 0.055 234.6);
  --primary-foreground: oklch(1 0 0);

  /* Verde GLM #6CC24A */
  --brand: oklch(0.734 0.177 137.9);
  --brand-foreground: oklch(0.264 0.023 235.8);
  --brand-soft: oklch(0.963 0.02 131.5);

  --secondary: oklch(0.955 0.006 232.4);
  --secondary-foreground: oklch(0.318 0.031 235.8);
  --muted: oklch(0.963 0.005 232.4);
  --muted-foreground: oklch(0.63 0.05 232.9);
  --accent: oklch(0.955 0.008 232.4);
  --accent-foreground: oklch(0.543 0.055 234.6);

  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(1 0 0);

  --border: oklch(0.933 0.009 232.4);
  --input: oklch(0.913 0.011 232.4);
  --ring: oklch(0.543 0.055 234.6);

  --surface: oklch(1 0 0);
  --surface-strong: oklch(0.97 0.005 232.4);

  --chart-1: oklch(0.543 0.055 234.6);
  --chart-2: oklch(0.734 0.177 137.9);
  --chart-3: oklch(0.816 0.159 128.4);
  --chart-4: oklch(0.701 0.2 43.7);
  --chart-5: oklch(0.497 0.066 196.6);

  --sidebar: oklch(1 0 0);
  --sidebar-foreground: oklch(0.318 0.031 235.8);
  --sidebar-primary: oklch(0.543 0.055 234.6);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.963 0.02 131.5);
  --sidebar-accent-foreground: oklch(0.543 0.055 234.6);
  --sidebar-border: oklch(0.933 0.009 232.4);
  --sidebar-ring: oklch(0.543 0.055 234.6);

  --gradient-brand: linear-gradient(120deg, oklch(0.543 0.055 234.6), oklch(0.63 0.05 232.9) 55%, oklch(0.734 0.177 137.9));
  --gradient-canvas: radial-gradient(
      1100px 520px at 12% -10%,
      oklch(0.734 0.177 137.9 / 0.16),
      transparent 60%
    ),
    radial-gradient(900px 520px at 92% 4%, oklch(0.543 0.055 234.6 / 0.18), transparent 62%);
}

.dark {
  --background: oklch(0.21 0.02 232.8);
  --foreground: oklch(0.966 0.005 232.4);
  --card: oklch(0.264 0.023 235.8);
  --card-foreground: oklch(0.966 0.005 232.4);
  --popover: oklch(0.264 0.023 235.8);
  --popover-foreground: oklch(0.966 0.005 232.4);
  --primary: oklch(0.68 0.06 232.9);
  --primary-foreground: oklch(0.21 0.02 232.8);
  --brand: oklch(0.762 0.177 137.9);
  --brand-foreground: oklch(0.21 0.02 232.8);
  --brand-soft: oklch(0.318 0.031 235.8);
  --secondary: oklch(0.318 0.031 235.8);
  --secondary-foreground: oklch(0.966 0.005 232.4);
  --muted: oklch(0.318 0.031 235.8);
  --muted-foreground: oklch(0.74 0.02 232.9);
  --accent: oklch(0.318 0.031 235.8);
  --accent-foreground: oklch(0.966 0.005 232.4);
  --destructive: oklch(0.704 0.191 22.216);
  --destructive-foreground: oklch(0.966 0.005 232.4);
  --border: oklch(1 0 0 / 12%);
  --input: oklch(1 0 0 / 16%);
  --ring: oklch(0.68 0.06 232.9);
  --surface: oklch(0.264 0.023 235.8);
  --surface-strong: oklch(0.318 0.031 235.8);
  --sidebar: oklch(0.264 0.023 235.8);
  --sidebar-foreground: oklch(0.966 0.005 232.4);
  --sidebar-primary: oklch(0.68 0.06 232.9);
  --sidebar-primary-foreground: oklch(0.21 0.02 232.8);
  --sidebar-accent: oklch(0.318 0.031 235.8);
  --sidebar-accent-foreground: oklch(0.966 0.005 232.4);
  --sidebar-border: oklch(1 0 0 / 12%);
  --sidebar-ring: oklch(0.68 0.06 232.9);
}

@layer base {
  * {
    border-color: var(--color-border);
  }

  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    background-color: var(--color-background);
    color: var(--color-foreground);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
  }
}

@utility canvas-glow {
  background-image: var(--gradient-canvas);
}

@utility brand-gradient-text {
  background-image: var(--gradient-brand);
  background-clip: text;
  color: transparent;
}

@utility brand-rule {
  border-bottom: 2px solid var(--color-brand);
}

@utility scrollbar-slim {
  scrollbar-width: thin;
  scrollbar-color: var(--color-input) transparent;

  &::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  &::-webkit-scrollbar-thumb {
    background-color: var(--color-input);
    border-radius: 999px;
  }
}

@keyframes glm-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@utility animate-rise {
  animation: glm-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Pantalla de acceso */
:root {
  --shadow-login: 0 34px 80px -40px rgba(48, 78, 95, 0.52),
    0 15px 34px -28px rgba(79, 117, 139, 0.3);
}

.login-canvas {
  /*
   * El login siempre se presenta en modo claro. La preferencia claro/oscuro
   * se conserva en ThemeProvider y vuelve a aplicarse al entrar a la app.
   */
  color-scheme: light;
  --background: oklch(0.983 0.003 219.5);
  --foreground: oklch(0.264 0.023 235.8);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.264 0.023 235.8);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.264 0.023 235.8);
  --primary: oklch(0.543 0.055 234.6);
  --primary-foreground: oklch(1 0 0);
  --brand: oklch(0.734 0.177 137.9);
  --brand-foreground: oklch(0.264 0.023 235.8);
  --brand-soft: oklch(0.963 0.02 131.5);
  --secondary: oklch(0.955 0.006 232.4);
  --secondary-foreground: oklch(0.318 0.031 235.8);
  --muted: oklch(0.963 0.005 232.4);
  --muted-foreground: oklch(0.63 0.05 232.9);
  --accent: oklch(0.955 0.008 232.4);
  --accent-foreground: oklch(0.543 0.055 234.6);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.933 0.009 232.4);
  --input: oklch(0.913 0.011 232.4);
  --ring: oklch(0.543 0.055 234.6);
  --surface: oklch(1 0 0);
  --surface-strong: oklch(0.97 0.005 232.4);
  background:
    radial-gradient(circle at 8% 18%, rgba(108, 194, 74, 0.14), transparent 27rem),
    radial-gradient(circle at 92% 28%, rgba(79, 117, 139, 0.2), transparent 29rem),
    #f8fbfa;
}

.login-grid {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(79, 117, 139, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 117, 139, 0.055) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(circle at center, black 15%, transparent 72%);
  mask-image: radial-gradient(circle at center, black 15%, transparent 72%);
}

.login-orb {
  position: absolute;
  width: 26rem;
  height: 26rem;
  border-radius: 999px;
  filter: blur(75px);
  opacity: 0.17;
  pointer-events: none;
}

.login-orb-left {
  left: -13rem;
  bottom: -11rem;
  background: #6cc24a;
}

.login-orb-right {
  right: -13rem;
  top: -9rem;
  background: #4f758b;
}

.login-card {
  position: relative;
}

.login-logo-box img {
  image-rendering: auto;
}

.login-google-button {
  background: linear-gradient(110deg, #8caabd 0%, #668aa0 48%, #4f758b 100%);
}


@layer components {
  .voice-note-range {
    width: 100%;
    height: 1.25rem;
    cursor: pointer;
    appearance: none;
    background: transparent;
  }

  .voice-note-range::-webkit-slider-runnable-track {
    height: 0.4rem;
    border-radius: 999px;
    background: var(--color-input);
  }

  .voice-note-range::-webkit-slider-thumb {
    width: 1rem;
    height: 1rem;
    margin-top: -0.3rem;
    appearance: none;
    border: 2px solid var(--color-card);
    border-radius: 999px;
    background: var(--color-primary);
    box-shadow: 0 1px 3px oklch(0.318 0.031 235.8 / 0.24);
  }

  .voice-note-range::-moz-range-track {
    height: 0.4rem;
    border: 0;
    border-radius: 999px;
    background: var(--color-input);
  }

  .voice-note-range::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--color-card);
    border-radius: 999px;
    background: var(--color-primary);
    box-shadow: 0 1px 3px oklch(0.318 0.031 235.8 / 0.24);
  }
}
