/* ==========================================================================
   inBrivvo Design System — Tokens
   Reconciliation of the Figma prototype (Barlow + Geek Blue) with the
   product codebase (`inBrivvo-app-4/src/styles/tokens.css`,
   `design-system.css`, `tasks-theme.css`) and the official brand guide
   (`INBRIVVO — GUIA_DE_IDENTIDADE_VISUAL_v1.0.md`).
   ========================================================================== */

/* Webfonts via Google Fonts (Barlow primary, Space Grotesk display, Inter fallback) */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ───────────── PRIMITIVES — Geek Blue (brand primary) ───────────── */
  --geek-blue-50:  #F0F5FF;
  --geek-blue-100: #D6E4FF;
  --geek-blue-200: #ADC6FF;
  --geek-blue-300: #85A5FF;
  --geek-blue-400: #597EF7;
  --geek-blue-500: #2F54EB; /* hover / active */
  --geek-blue-600: #1D39C4; /* PRIMARY — most-used fill in Figma */
  --geek-blue-700: #10239E;
  --geek-blue-800: #061178;
  --geek-blue-900: #030852;

  /* Geek Blue with opacity (used for chips, glows, soft fills) */
  --geek-blue-a08: rgba(29, 57, 196, 0.08);
  --geek-blue-a16: rgba(29, 57, 196, 0.16);
  --geek-blue-a20: rgba(29, 57, 196, 0.20);
  --geek-blue-a40: rgba(29, 57, 196, 0.40);

  /* ───────────── PRIMITIVES — Decorative palettes (Figma) ───────────── */
  /* Daybreak Blue */
  --daybreak-50:  #E6F7FF;
  --daybreak-200: #91D5FF;
  --daybreak-400: #40A9FF;
  --daybreak-500: #1890FF;
  --daybreak-700: #0050B3;

  /* Sunrise Yellow */
  --sunrise-200: #FFF566;
  --sunrise-400: #FFEC3D;
  --sunrise-500: #FADB14;
  --sunrise-700: #AD8B00;

  /* Volcano (orange-red) */
  --volcano-200: #FFBB96;
  --volcano-400: #FF7A45;
  --volcano-500: #FA541C;
  --volcano-700: #AD2102;

  /* Cyan */
  --cyan-200: #87E8DE;
  --cyan-400: #36CFC9;
  --cyan-500: #13C2C2;
  --cyan-700: #006D75;

  /* Lime / Green */
  --lime-200: #D3F261;
  --lime-400: #A0D911;
  --lime-500: #7CB305;

  /* Logo gradient stops (mint → cyan → geek-blue) */
  --logo-mint: #34E0A1;
  --logo-cyan: #00C2FF;
  --logo-blue: #1D39C4;
  --logo-gradient: linear-gradient(180deg, var(--logo-mint) 0%, var(--logo-cyan) 55%, var(--logo-blue) 100%);

  /* ───────────── PRIMITIVES — Neutrals ───────────── */
  /* Dark scale (default) */
  --neutral-0:   #000000;
  --neutral-950: #0D121A; /* app bg, dark */
  --neutral-900: #121A26; /* surface, dark */
  --neutral-850: #141414; /* figma stage */
  --neutral-800: #1A2332; /* elevated, dark */
  --neutral-750: #202020;
  --neutral-700: #2E3B52;
  --neutral-600: #404656;
  --neutral-500: #6B7280;
  --neutral-400: #7A859A; /* text 3° dark */
  --neutral-300: #AEBBCE; /* text 2° dark */
  --neutral-200: #CBD5F5;
  --neutral-100: #E6ECF8; /* text 1° dark */
  --neutral-50:  #F8F9FB; /* app bg, light */
  --neutral-25:  #FFFFFF;

  /* Border alphas */
  --line-on-dark: rgba(255, 255, 255, 0.08);
  --line-on-dark-strong: rgba(255, 255, 255, 0.16);
  --line-on-light: rgba(0, 0, 0, 0.08);
  --line-on-light-strong: rgba(0, 0, 0, 0.14);

  /* ───────────── PRIMITIVES — Semantic accents ───────────── */
  --green-500:  #22C55E; /* success */
  --green-300:  #34E0A1;
  --yellow-500: #FACC15; /* warning */
  --yellow-300: #FFC85A;
  --red-500:    #EF4444; /* danger */
  --red-300:    #FF6A6A;
  --indigo-500: #6366F1; /* info backup */
  --indigo-300: #789BFF;

  /* ───────────── RADII ───────────── */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;   /* buttons, inputs */
  --radius-lg: 12px;  /* cards */
  --radius-xl: 16px;
  --radius-2xl: 20px; /* large featured card */
  --radius-pill: 999px;

  /* ───────────── SPACING — 8pt grid ───────────── */
  --space-0: 0px;
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-64: 64px;

  /* ───────────── TYPOGRAPHY — families ───────────── */
  --font-sans: 'Barlow', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Barlow', system-ui, sans-serif;
  --font-fallback: 'Inter', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Type scale (px values to match Figma /Guide/Typography) */
  --fs-display: 48px;
  --fs-h1:      24px;
  --fs-h2:      22px;
  --fs-h3:      20px;
  --fs-h4:      18px;
  --fs-body-1:  16px;
  --fs-body-2:  14px; /* default UI body */
  --fs-caption-1: 13px;
  --fs-caption-2: 12px;
  --fs-caption-3: 10px;

  /* Line heights */
  --lh-tight: 1.0;
  --lh-snug: 1.2;
  --lh-normal: 1.4;
  --lh-relaxed: 1.5;

  /* Weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* Letter spacing */
  --ls-tight: -0.01em;
  --ls-normal: 0;
  --ls-wide: 0.01em;
  --ls-eyebrow: 0.04em; /* uppercase eyebrows */

  /* ───────────── SHADOWS — Linear-style ───────────── */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.15);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.20);
  --shadow-3: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-card-light: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-card-light-hover: 0 2px 4px rgba(15, 23, 42, 0.08), 0 16px 32px rgba(15, 23, 42, 0.10);
  --shadow-focus: 0 0 0 4px var(--geek-blue-a20);

  /* ───────────── MOTION ───────────── */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.0, 0, 0.2, 1);
  --duration-1: 120ms;
  --duration-2: 200ms;
  --duration-3: 320ms;
}

/* ==========================================================================
   SEMANTIC TOKENS — Dark theme (default)
   ========================================================================== */
:root,
:root[data-theme="dark"],
.theme-dark {
  --bg-app:       var(--neutral-950);
  --bg-surface:   var(--neutral-900);
  --bg-elevated:  var(--neutral-800);
  --bg-overlay:   rgba(0, 0, 0, 0.55);

  --fg-primary:   var(--neutral-100);
  --fg-secondary: var(--neutral-300);
  --fg-muted:     var(--neutral-400);
  --fg-on-primary: #FFFFFF;
  --fg-on-accent:  #FFFFFF;

  --border-subtle: var(--line-on-dark);
  --border-strong: var(--line-on-dark-strong);

  --primary:        var(--geek-blue-600);
  --primary-hover:  var(--geek-blue-500);
  --primary-active: var(--geek-blue-700);
  --primary-soft:   var(--geek-blue-a16);
  --primary-wash:   var(--geek-blue-a08);

  --accent-success: var(--green-500);
  --accent-warning: var(--yellow-500);
  --accent-danger:  var(--red-500);
  --accent-info:    var(--indigo-300);

  --shadow-card:        var(--shadow-2);
  --shadow-card-hover:  var(--shadow-3);
  --shadow-modal:       var(--shadow-3);
}

/* ==========================================================================
   SEMANTIC TOKENS — Light theme
   ========================================================================== */
:root[data-theme="light"],
.theme-light {
  --bg-app:       var(--neutral-50);
  --bg-surface:   #FFFFFF;
  --bg-elevated:  #F1F3F7;
  --bg-overlay:   rgba(15, 23, 42, 0.40);

  --fg-primary:   #1C1F26;
  --fg-secondary: #3D4553;
  --fg-muted:     #6F7A8D;
  --fg-on-primary: #FFFFFF;
  --fg-on-accent:  #FFFFFF;

  --border-subtle: var(--line-on-light);
  --border-strong: var(--line-on-light-strong);

  --primary:        var(--geek-blue-600);
  --primary-hover:  var(--geek-blue-500);
  --primary-active: var(--geek-blue-700);
  --primary-soft:   var(--geek-blue-50);
  --primary-wash:   #F5F8FF;

  --accent-success: #16A34A;
  --accent-warning: #CA8A04;
  --accent-danger:  #DC2626;
  --accent-info:    var(--geek-blue-500);

  --shadow-card:       var(--shadow-card-light);
  --shadow-card-hover: var(--shadow-card-light-hover);
  --shadow-modal:      0 24px 60px rgba(15, 23, 42, 0.18);
}

/* ==========================================================================
   SEMANTIC TYPE — utility classes (apply directly to elements)
   ========================================================================== */
.t-display {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-wide);
}
.t-h1 { font-family: var(--font-sans); font-weight: var(--fw-bold);     font-size: var(--fs-h1); line-height: var(--lh-snug); }
.t-h2 { font-family: var(--font-sans); font-weight: var(--fw-semibold); font-size: var(--fs-h2); line-height: var(--lh-snug); }
.t-h3 { font-family: var(--font-sans); font-weight: var(--fw-semibold); font-size: var(--fs-h3); line-height: var(--lh-snug); }
.t-h4 { font-family: var(--font-sans); font-weight: var(--fw-semibold); font-size: var(--fs-h4); line-height: var(--lh-snug); }
.t-body-1 { font-family: var(--font-sans); font-weight: var(--fw-regular); font-size: var(--fs-body-1); line-height: var(--lh-relaxed); }
.t-body-2 { font-family: var(--font-sans); font-weight: var(--fw-regular); font-size: var(--fs-body-2); line-height: var(--lh-relaxed); }
.t-label  { font-family: var(--font-sans); font-weight: var(--fw-medium);  font-size: var(--fs-body-2); line-height: var(--lh-normal); }
.t-caption-1 { font-family: var(--font-sans); font-weight: var(--fw-regular); font-size: var(--fs-caption-1); line-height: var(--lh-normal); }
.t-caption-2 { font-family: var(--font-sans); font-weight: var(--fw-medium);  font-size: var(--fs-caption-2); line-height: var(--lh-normal); }
.t-caption-3 { font-family: var(--font-sans); font-weight: var(--fw-medium);  font-size: var(--fs-caption-3); line-height: var(--lh-normal); }
.t-eyebrow {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-caption-2);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
}
.t-stat {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 32px;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

/* ==========================================================================
   BASE — apply to <body> when this file is the only stylesheet
   ========================================================================== */
.ds-root {
  font-family: var(--font-sans);
  font-size: var(--fs-body-2);
  color: var(--fg-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ==========================================================================
   LOGIN LAYOUT — two-column grid used by Login.jsx
   ========================================================================== */
.login-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}
.login-hero {
  /* Coluna recebe o gradiente da hero — cobre a coluna inteira */
  background:
    radial-gradient(1100px 500px at 20% 10%, rgba(54,207,201,0.18), transparent 60%),
    radial-gradient(900px 700px at 80% 80%, rgba(29,57,196,0.32), transparent 60%),
    var(--bg-surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Hero div filho: fundo transparente (o bg já está na coluna), preenche a altura total */
.login-hero > div {
  background: transparent !important;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-form {
  display: grid;
  place-items: center;
  padding: 56px;
}
@media (max-width: 768px) {
  .login-grid { grid-template-columns: 1fr; }
  .login-hero  { display: none; }
  .login-form  { padding: 40px 24px; place-items: start; align-content: center; min-height: 100svh; }
}
