/* ============================================================
   Nazide Pressus — Fundação de design (IBM Carbon Design System v11)
   ------------------------------------------------------------
   Tema claro  : g10  (:root)
   Tema escuro : g100 ([data-theme="dark"] / .cds--g100)
   Cor primária: Blue 60 (#0f62fe) — adoção fiel do Carbon
   Cantos      : 0 (retos) — traço característico do Carbon

   Valores extraídos das fontes canônicas do Carbon:
     @carbon/colors            (paleta)
     @carbon/themes  g10/g100  (tokens semânticos)
     @carbon/themes  component-tokens/button
   NÃO editar valores à mão — derivam do código aberto do Carbon.
   Os nomes seguem o padrão --cds-* para facilitar a migração futura
   para @carbon/styles.
   ============================================================ */

/* ---- Paleta de referência (swatches Carbon) ---------------- */
:root {
  --cds-white: #ffffff;
  --cds-black: #000000;

  --cds-gray-10: #f4f4f4;
  --cds-gray-20: #e0e0e0;
  --cds-gray-30: #c6c6c6;
  --cds-gray-40: #a8a8a8;
  --cds-gray-50: #8d8d8d;
  --cds-gray-60: #6f6f6f;
  --cds-gray-70: #525252;
  --cds-gray-80: #393939;
  --cds-gray-90: #262626;
  --cds-gray-100: #161616;

  --cds-blue-20: #d0e2ff;
  --cds-blue-30: #a6c8ff;
  --cds-blue-40: #78a9ff;
  --cds-blue-50: #4589ff;
  --cds-blue-60: #0f62fe;
  --cds-blue-70: #0043ce;
  --cds-blue-80: #002d9c;
  --cds-blue-90: #001d6c;

  --cds-red-40: #ff8389;
  --cds-red-50: #fa4d56;
  --cds-red-60: #da1e28;
  --cds-red-70: #a2191f;

  --cds-green-40: #42be65;
  --cds-green-50: #24a148;
  --cds-green-60: #198038;

  --cds-yellow-30: #f1c21b;
  --cds-orange-40: #ff832b;
  --cds-purple-40: #be95ff;
  --cds-purple-60: #8a3ffc;
}

/* ============================================================
   Tipografia — IBM Plex (escala produtiva do Carbon)
   ============================================================ */
:root {
  --cds-font-sans: 'IBM Plex Sans', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --cds-font-mono: 'IBM Plex Mono', 'Menlo', 'Courier New', monospace;
  --cds-font-serif: 'IBM Plex Serif', Georgia, serif;

  /* pesos */
  --cds-font-weight-light: 300;
  --cds-font-weight-regular: 400;
  --cds-font-weight-semibold: 600;

  /* escala produtiva (size / line-height) */
  --cds-caption-01-size: 0.75rem;       /* 12px */ --cds-caption-01-line: 1rem;       /* 16px */
  --cds-label-01-size: 0.75rem;         /* 12px */ --cds-label-01-line: 1rem;         /* 16px */
  --cds-helper-text-01-size: 0.75rem;   /* 12px */ --cds-helper-text-01-line: 1rem;   /* 16px */
  --cds-body-01-size: 0.875rem;         /* 14px */ --cds-body-01-line: 1.125rem;      /* 18px */
  --cds-body-02-size: 1rem;             /* 16px */ --cds-body-02-line: 1.5rem;        /* 24px */
  --cds-heading-01-size: 0.875rem;      /* 14px */ --cds-heading-01-line: 1.125rem;   /* 18px */
  --cds-heading-02-size: 1rem;          /* 16px */ --cds-heading-02-line: 1.5rem;     /* 24px */
  --cds-heading-03-size: 1.25rem;       /* 20px */ --cds-heading-03-line: 1.75rem;    /* 28px */
  --cds-heading-04-size: 1.75rem;       /* 28px */ --cds-heading-04-line: 2.25rem;    /* 36px */
  --cds-heading-05-size: 2rem;          /* 32px */ --cds-heading-05-line: 2.5rem;     /* 40px */
  --cds-heading-06-size: 2.625rem;      /* 42px */ --cds-heading-06-line: 3.125rem;   /* 50px */
  --cds-heading-07-size: 3.375rem;      /* 54px */ --cds-heading-07-line: 4rem;       /* 64px */
}

/* ============================================================
   Layout — escala de espaçamento (base 2px) e tamanhos Carbon
   ============================================================ */
:root {
  --cds-spacing-01: 0.125rem;  /* 2px  */
  --cds-spacing-02: 0.25rem;   /* 4px  */
  --cds-spacing-03: 0.5rem;    /* 8px  */
  --cds-spacing-04: 0.75rem;   /* 12px */
  --cds-spacing-05: 1rem;      /* 16px */
  --cds-spacing-06: 1.5rem;    /* 24px */
  --cds-spacing-07: 2rem;      /* 32px */
  --cds-spacing-08: 2.5rem;    /* 40px */
  --cds-spacing-09: 3rem;      /* 48px */
  --cds-spacing-10: 4rem;      /* 64px */
  --cds-spacing-11: 5rem;      /* 80px */
  --cds-spacing-12: 6rem;      /* 96px */
  --cds-spacing-13: 10rem;     /* 160px */

  /* alturas de controle (sizes) */
  --cds-size-xs: 1.5rem;       /* 24px */
  --cds-size-sm: 2rem;         /* 32px */
  --cds-size-md: 2.5rem;       /* 40px — padrão de campo/botão */
  --cds-size-lg: 3rem;         /* 48px */
  --cds-size-xl: 4rem;         /* 64px */
  --cds-size-2xl: 5rem;        /* 80px */

  /* Carbon usa cantos retos */
  --cds-border-radius: 0;
}

/* ============================================================
   TEMA CLARO — g10
   ============================================================ */
:root {
  color-scheme: light;

  /* Background */
  --cds-background: #f4f4f4;
  --cds-background-hover: rgba(141, 141, 141, 0.12);
  --cds-background-active: rgba(141, 141, 141, 0.5);
  --cds-background-selected: rgba(141, 141, 141, 0.2);
  --cds-background-selected-hover: rgba(141, 141, 141, 0.32);
  --cds-background-inverse: #393939;
  --cds-background-brand: #0f62fe;

  /* Layer */
  --cds-layer-01: #ffffff;
  --cds-layer-02: #f4f4f4;
  --cds-layer-03: #ffffff;
  --cds-layer-hover-01: #e8e8e8;
  --cds-layer-active-01: #c6c6c6;
  --cds-layer-selected-01: #e0e0e0;
  --cds-layer-selected-hover-01: #d1d1d1;
  --cds-layer-selected-inverse: #161616;
  --cds-layer-accent-01: #e0e0e0;
  --cds-layer-accent-hover-01: #d1d1d1;
  --cds-layer-accent-active-01: #a8a8a8;

  /* Field */
  --cds-field-01: #ffffff;
  --cds-field-02: #f4f4f4;
  --cds-field-hover-01: #e8e8e8;

  /* Border */
  --cds-border-subtle-00: #c6c6c6;
  --cds-border-subtle-01: #e0e0e0;
  --cds-border-subtle-02: #c6c6c6;
  --cds-border-strong-01: #8d8d8d;
  --cds-border-tile-01: #a8a8a8;
  --cds-border-inverse: #161616;
  --cds-border-interactive: #0f62fe;
  --cds-border-disabled: #c6c6c6;

  /* Text */
  --cds-text-primary: #161616;
  --cds-text-secondary: #525252;
  --cds-text-placeholder: rgba(22, 22, 22, 0.4);
  --cds-text-helper: #6f6f6f;
  --cds-text-error: #da1e28;
  --cds-text-inverse: #ffffff;
  --cds-text-on-color: #ffffff;
  --cds-text-on-color-disabled: #8d8d8d;
  --cds-text-disabled: rgba(22, 22, 22, 0.25);

  /* Link */
  --cds-link-primary: #0f62fe;
  --cds-link-primary-hover: #0043ce;
  --cds-link-secondary: #0043ce;
  --cds-link-inverse: #78a9ff;
  --cds-link-visited: #8a3ffc;

  /* Icon */
  --cds-icon-primary: #161616;
  --cds-icon-secondary: #525252;
  --cds-icon-inverse: #ffffff;
  --cds-icon-on-color: #ffffff;
  --cds-icon-interactive: #0f62fe;
  --cds-icon-disabled: rgba(22, 22, 22, 0.25);

  /* Support / status */
  --cds-support-error: #da1e28;
  --cds-support-success: #24a148;
  --cds-support-warning: #f1c21b;
  --cds-support-info: #0043ce;
  --cds-support-error-inverse: #fa4d56;
  --cds-support-success-inverse: #42be65;
  --cds-support-warning-inverse: #f1c21b;
  --cds-support-info-inverse: #4589ff;
  --cds-support-caution-major: #ff832b;

  /* Focus */
  --cds-focus: #0f62fe;
  --cds-focus-inset: #ffffff;
  --cds-focus-inverse: #ffffff;

  /* Misc */
  --cds-interactive: #0f62fe;
  --cds-highlight: #d0e2ff;
  --cds-overlay: rgba(0, 0, 0, 0.6);
  --cds-toggle-off: #8d8d8d;
  --cds-skeleton-background: #e8e8e8;
  --cds-skeleton-element: #c6c6c6;
  --cds-shadow: rgba(0, 0, 0, 0.3);

  /* Botões (component-tokens/button — g10) */
  --cds-button-primary: #0f62fe;
  --cds-button-primary-hover: #0050e6;
  --cds-button-primary-active: #002d9c;
  --cds-button-secondary: #393939;
  --cds-button-secondary-hover: #474747;
  --cds-button-secondary-active: #6f6f6f;
  --cds-button-tertiary: #0f62fe;
  --cds-button-tertiary-hover: #0050e6;
  --cds-button-tertiary-active: #002d9c;
  --cds-button-danger-primary: #da1e28;
  --cds-button-danger-secondary: #da1e28;
  --cds-button-danger-hover: #b81921;
  --cds-button-danger-active: #750e13;
  --cds-button-disabled: #c6c6c6;
  --cds-button-separator: #e0e0e0;
}

/* ============================================================
   TEMA ESCURO — g100
   ============================================================ */
[data-theme="dark"],
.cds--g100 {
  color-scheme: dark;

  /* Background */
  --cds-background: #161616;
  --cds-background-hover: rgba(141, 141, 141, 0.16);
  --cds-background-active: rgba(141, 141, 141, 0.4);
  --cds-background-selected: rgba(141, 141, 141, 0.24);
  --cds-background-selected-hover: rgba(141, 141, 141, 0.32);
  --cds-background-inverse: #f4f4f4;
  --cds-background-brand: #0f62fe;

  /* Layer */
  --cds-layer-01: #262626;
  --cds-layer-02: #393939;
  --cds-layer-03: #525252;
  --cds-layer-hover-01: #333333;
  --cds-layer-active-01: #525252;
  --cds-layer-selected-01: #393939;
  --cds-layer-selected-hover-01: #474747;
  --cds-layer-selected-inverse: #f4f4f4;
  --cds-layer-accent-01: #393939;
  --cds-layer-accent-hover-01: #474747;
  --cds-layer-accent-active-01: #6f6f6f;

  /* Field */
  --cds-field-01: #262626;
  --cds-field-02: #393939;
  --cds-field-hover-01: #333333;

  /* Border */
  --cds-border-subtle-00: #393939;
  --cds-border-subtle-01: #525252;
  --cds-border-subtle-02: #6f6f6f;
  --cds-border-strong-01: #6f6f6f;
  --cds-border-tile-01: #525252;
  --cds-border-inverse: #f4f4f4;
  --cds-border-interactive: #4589ff;
  --cds-border-disabled: rgba(141, 141, 141, 0.5);

  /* Text */
  --cds-text-primary: #f4f4f4;
  --cds-text-secondary: #c6c6c6;
  --cds-text-placeholder: rgba(244, 244, 244, 0.4);
  --cds-text-helper: #a8a8a8;
  --cds-text-error: #ff8389;
  --cds-text-inverse: #161616;
  --cds-text-on-color: #ffffff;
  --cds-text-on-color-disabled: rgba(255, 255, 255, 0.25);
  --cds-text-disabled: rgba(244, 244, 244, 0.25);

  /* Link */
  --cds-link-primary: #78a9ff;
  --cds-link-primary-hover: #a6c8ff;
  --cds-link-secondary: #a6c8ff;
  --cds-link-inverse: #0f62fe;
  --cds-link-visited: #be95ff;

  /* Icon */
  --cds-icon-primary: #f4f4f4;
  --cds-icon-secondary: #c6c6c6;
  --cds-icon-inverse: #161616;
  --cds-icon-on-color: #ffffff;
  --cds-icon-interactive: #ffffff;
  --cds-icon-disabled: rgba(244, 244, 244, 0.25);

  /* Support / status */
  --cds-support-error: #fa4d56;
  --cds-support-success: #42be65;
  --cds-support-warning: #f1c21b;
  --cds-support-info: #4589ff;
  --cds-support-error-inverse: #da1e28;
  --cds-support-success-inverse: #24a148;
  --cds-support-warning-inverse: #f1c21b;
  --cds-support-info-inverse: #0043ce;
  --cds-support-caution-major: #ff832b;

  /* Focus */
  --cds-focus: #ffffff;
  --cds-focus-inset: #161616;
  --cds-focus-inverse: #0f62fe;

  /* Misc */
  --cds-interactive: #4589ff;
  --cds-highlight: #001d6c;
  --cds-overlay: rgba(0, 0, 0, 0.6);
  --cds-toggle-off: #6f6f6f;
  --cds-skeleton-background: #292929;
  --cds-skeleton-element: #393939;
  --cds-shadow: rgba(0, 0, 0, 0.8);

  /* Botões (component-tokens/button — g100) */
  --cds-button-primary: #0f62fe;
  --cds-button-primary-hover: #0050e6;
  --cds-button-primary-active: #002d9c;
  --cds-button-secondary: #6f6f6f;
  --cds-button-secondary-hover: #5e5e5e;
  --cds-button-secondary-active: #393939;
  --cds-button-tertiary: #ffffff;
  --cds-button-tertiary-hover: #f4f4f4;
  --cds-button-tertiary-active: #c6c6c6;
  --cds-button-danger-primary: #da1e28;
  --cds-button-danger-secondary: #fa4d56;
  --cds-button-danger-hover: #b81921;
  --cds-button-danger-active: #750e13;
  --cds-button-disabled: rgba(141, 141, 141, 0.3);
  --cds-button-separator: #161616;
}

/* ============================================================
   Base + utilitários mínimos de tipografia
   ============================================================ */
body {
  background: var(--cds-background);
  color: var(--cds-text-primary);
  font-family: var(--cds-font-sans);
  font-size: var(--cds-body-01-size);
  line-height: var(--cds-body-01-line);
  font-weight: var(--cds-font-weight-regular);
  -webkit-font-smoothing: antialiased;
}

.cds--type-caption-01   { font-size: var(--cds-caption-01-size);   line-height: var(--cds-caption-01-line);   letter-spacing: 0.32px; }
.cds--type-label-01     { font-size: var(--cds-label-01-size);     line-height: var(--cds-label-01-line);     letter-spacing: 0.32px; }
.cds--type-helper-01    { font-size: var(--cds-helper-text-01-size); line-height: var(--cds-helper-text-01-line); letter-spacing: 0.32px; }
.cds--type-body-01      { font-size: var(--cds-body-01-size);      line-height: var(--cds-body-01-line);      letter-spacing: 0.16px; }
.cds--type-body-02      { font-size: var(--cds-body-02-size);      line-height: var(--cds-body-02-line); }
.cds--type-heading-01   { font-size: var(--cds-heading-01-size);   line-height: var(--cds-heading-01-line);   font-weight: var(--cds-font-weight-semibold); letter-spacing: 0.16px; }
.cds--type-heading-02   { font-size: var(--cds-heading-02-size);   line-height: var(--cds-heading-02-line);   font-weight: var(--cds-font-weight-semibold); }
.cds--type-heading-03   { font-size: var(--cds-heading-03-size);   line-height: var(--cds-heading-03-line); }
.cds--type-heading-04   { font-size: var(--cds-heading-04-size);   line-height: var(--cds-heading-04-line); }
.cds--type-heading-05   { font-size: var(--cds-heading-05-size);   line-height: var(--cds-heading-05-line); }
.cds--type-heading-06   { font-size: var(--cds-heading-06-size);   line-height: var(--cds-heading-06-line);   font-weight: var(--cds-font-weight-light); }
.cds--type-heading-07   { font-size: var(--cds-heading-07-size);   line-height: var(--cds-heading-07-line);   font-weight: var(--cds-font-weight-light); }
