/*
 * DASH-TAG semantic tokens.
 *
 * SHARED CHAT-TAG CONTRACT: only the 172 properties allowlisted by TOKEN_MAP in
 * theme.js participate in chat-tag-theme/1.1.0 exact parity. Their values are
 * replaced as one validated parent snapshot; these declarations are fallback.
 * Static fallbacks reproduce the production Chat-Tag parent v9.4.14 baseline;
 * fallbacks never outrank runtime. The later DEV v9.4.15 line and successors
 * remain governed by the parent snapshot instead of creating a second palette.
 *
 * DASH-TAG-ONLY TOKENS: every other property in this file describes semantics
 * that the host does not own: chart series/ordinals, good-warning-danger-info
 * data states, product-only responsive layout, non-navigation icon sizes, tour
 * and creative overlays. They remain theme-aware local decisions and are expressly
 * outside parity=exact; treating them as parent tokens would invent Chat-Tag
 * values and make equality impossible to audit.
 */
:root {
  color-scheme: light;

  --ct-brand-deep: #002620;
  --ct-brand: #002620;
  --ct-accent: #29a2a7;
  --ct-accent-bright: #58d5da;
  --ct-accent-text: #0f7672;
  --ct-brand-gradient: linear-gradient(to top right,#002620 0%,#29a2a7 100%);
  --ct-action-gradient: linear-gradient(to top right,#002620 0%,#0f7672 100%);
  --ct-brand-gradient-soft: linear-gradient(135deg, rgba(0, 38, 32, .10), rgba(41, 162, 167, .12));

  --ct-page: #f5f8f7;
  --ct-surface: #ffffff;
  --ct-surface-raised: #ffffff;
  --ct-surface-soft: #edf4f2;
  --ct-surface-strong: #e0ece9;
  --ct-backdrop: rgba(0, 0, 0, .55);
  --ct-text: #10201d;
  --ct-text-secondary: #40534f;
  --ct-text-muted: #667773;
  --ct-text-on-brand: #ffffff;
  --ct-border: rgba(0, 38, 32, .13);
  --ct-border-strong: rgba(0, 38, 32, .24);
  --ct-gridline: #dce7e4;
  --ct-axis: #9cafaa;

  /* Tinta do contador do sino. O fundo (`--ct-danger`) inverte entre temas,
     entao a tinta tem de inverter junto — branco sobre o vermelho claro do
     tema escuro da 2,42:1. */
  --ct-badge-danger-ink: #ffffff;
  /* Veu do tutorial guiado: superficie do produto, logo token — nao hex solto. */
  --ct-tour-scrim: rgba(3, 18, 15, .68);
  --ct-good: #16835e;
  --ct-good-soft: #e0f4eb;
  /* 5,08:1 sobre --ct-warning-soft: mantém badges e estados de fonte em AA. */
  --ct-warning: #925a00;
  --ct-warning-soft: #fff1cf;
  --ct-danger: #b42335;
  --ct-danger-soft: #fde8eb;
  --ct-info: #176a8c;
  --ct-info-soft: #e2f1f8;
  --ct-organic: #758682;

  --ct-series-1: #0f7672;
  --ct-series-2: #e36a2e;
  --ct-series-3: #4a45c8;
  --ct-series-4: #c78a00;
  --ct-series-5: #c95483;
  --ct-series-6: #32865c;
  --ct-ord-1: #b9e4df;
  --ct-ord-2: #8fd2cc;
  --ct-ord-3: #5dbbb7;
  --ct-ord-4: #29a2a7;
  --ct-ord-5: #0f7672;
  --ct-ord-6: #004a40;
  --ct-seq-100: #e3e2f9;
  --ct-seq-200: #c9c7f2;
  --ct-seq-300: #a9a5ea;
  --ct-seq-400: #8a84f0;
  --ct-seq-500: #6f68e0;
  --ct-seq-600: #4a45c8;
  --ct-seq-700: #332f9e;
  --ct-comparison: #c3c2b7;
  --ct-comparison-ink: #8d8b80;
  --ct-delta-up: #006300;
  --ct-delta-down: #d03b3b;

  --ct-font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ct-font-heading: var(--ct-font-sans);
  --ct-font-body: var(--ct-font-sans);
  --ct-font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --ct-title-size: 1.5rem;
  --ct-subtitle-size: .875rem;
  --ct-body-size: .875rem;
  --ct-title-weight: 700;
  --ct-subtitle-weight: 600;
  --ct-body-weight: 400;
  --ct-title-line-height: 1.2;
  --ct-subtitle-line-height: 1.45;
  --ct-body-line-height: 1.55;
  --ct-title-tracking: -.02em;
  --ct-size-2xs: .6875rem;
  --ct-size-xs: .75rem;
  --ct-size-sm: .8125rem;
  --ct-size-base: .9375rem;
  --ct-size-md: 1rem;
  --ct-size-lg: 1.125rem;
  --ct-size-xl: clamp(1.45rem, 2vw, 2rem);
  --ct-size-hero: clamp(1.85rem, 3vw, 2.65rem);
  --ct-icon-size-action: 1rem;
  --ct-icon-size-close: 1.125rem;
  /*
   * Densidade da navegação espelhando o Chat-Tag: rótulo em 14px com peso 500 e
   * ícone em 16px. Os valores anteriores (16px herdado do corpo, peso 650,
   * ícone 18,4px) faziam a coluna do DASH-TAG parecer maior que a do painel que
   * a hospeda — e, com 11 itens, criavam barra de rolagem própria dentro dela.
   */
  --ct-nav-font-size: .875rem;
  --ct-nav-font-weight: 500;
  --ct-nav-icon-size: 1rem;
  --ct-icon-size-nav: var(--ct-nav-icon-size);
  --ct-icon-size-nav-mobile: 1.3rem;
  --ct-icon-size-empty: 1.25rem;
  --ct-icon-size-creative-empty: 2rem;

  --ct-space-1: .25rem;
  --ct-space-2: .5rem;
  --ct-space-3: .75rem;
  --ct-space-4: 1rem;
  --ct-space-5: 1.25rem;
  --ct-space-6: 1.5rem;
  --ct-space-8: 2rem;
  --ct-space-10: 2.5rem;
  --ct-radius-sm: .5rem;
  --ct-radius-md: .75rem;
  --ct-radius-lg: 1rem;
  --ct-radius-xl: 1.25rem;
  --ct-radius-pill: 999px;
  --ct-card-background: #ffffff;
  --ct-card-border: 1px solid var(--ct-border);
  --ct-card-text: var(--ct-text);
  --ct-card-shadow: 0 4px 12px rgba(0,38,32,.10);
  --ct-card-radius: 12px;
  --ct-card-padding-block: 1rem;
  --ct-card-padding-inline: 1rem;
  --ct-card-gap: .75rem;
  --ct-card-hover-shadow: 0 4px 12px rgba(0,38,32,.10);
  --ct-card-active-border: 1px solid #29a2a7;

  --ct-nav-padding-block: .625rem;
  --ct-nav-padding-inline: .75rem;
  --ct-nav-gap: .625rem;
  --ct-nav-background: transparent;
  --ct-nav-text: #40534f;
  --ct-nav-icon: #667773;
  --ct-nav-hover-background: #edf4f2;
  --ct-nav-hover-text: #10201d;
  --ct-nav-active-background: #e0ece9;
  --ct-nav-active-text: #0f7672;
  --ct-nav-active-indicator: #29a2a7;
  --ct-nav-border: 1px solid rgba(0,38,32,.13);
  --ct-nav-disabled-text: #94a7a2;

  /*
   * Véu do player de criativo (v0.5.5). O rótulo "Reproduzir aqui" fica SOBRE
   * a arte do anúncio, que pode ser clara ou escura — sem véu ele some. Não
   * reaproveita `--ct-backdrop`: aquele cobre a tela inteira atrás do modal e
   * mudá-lo para acertar o player mexeria em toda a camada de sobreposição.
   */
  --ct-creative-scrim: rgba(0, 0, 0, .45);
  --ct-creative-scrim-strong: rgba(0, 0, 0, .62);

  /* Dashboard Scripts semantic component contract. */
  --ct-modal-surface: #ffffff;
  --ct-modal-border: 1px solid var(--ct-border);
  --ct-modal-text: var(--ct-text);
  --ct-modal-backdrop: rgba(0, 0, 0, .55);
  --ct-modal-backdrop-filter: blur(4px);
  /* Compatibilidade v1: somente comprimento; nunca uma função CSS completa. */
  --ct-modal-blur: 4px;
  --ct-modal-radius: 12px;
  --ct-modal-shadow: 0 20px 60px rgba(0,0,0,.35);
  /*
   * Fallback de densidade medido no parent PROD v9.4.14. O DEV v9.4.15 e
   * versões futuras entram somente pelo bridge runtime após o gate de rebase.
   */
  --ct-modal-width: 440px;
  --ct-modal-padding-block: 1rem;
  --ct-modal-padding-inline: 1.125rem;
  --ct-modal-title-size: 1rem;
  --ct-modal-description-size: .75rem;
  --ct-modal-close-size: 2rem;
  --ct-modal-close-radius: .5rem;
  --ct-control-font-size: .8125rem;
  --ct-control-font-weight: 500;
  --ct-control-min-height: 2.25rem;
  --ct-control-radius: .5rem;
  --ct-control-padding-block: .5625rem;
  --ct-control-padding-inline: 1.125rem;
  --ct-label-font-size: .75rem;
  --ct-label-font-weight: 500;
  --ct-input-font-size: .8125rem;
  --ct-input-min-height: 2.25rem;
  --ct-input-padding-block: .5rem;
  --ct-input-padding-inline: .625rem;
  --ct-button-primary-background: var(--ct-brand-gradient);
  --ct-button-primary-hover-background: linear-gradient(to top right,#002620 0%,#0f7672 100%);
  --ct-button-primary-border: 1px solid transparent;
  --ct-button-primary-text: var(--ct-text-on-brand);
  --ct-button-primary-hover-border: 1px solid transparent;
  --ct-button-primary-shadow: none;
  --ct-button-primary-hover-shadow: none;
  --ct-button-primary-active-background: #002620;
  --ct-button-primary-active-border: 1px solid #002620;
  --ct-button-primary-active-shadow: inset 0 1px 2px rgba(0,0,0,.20);
  --ct-button-primary-disabled-background: #9cafaa;
  --ct-button-primary-disabled-border: 1px solid transparent;
  --ct-button-primary-disabled-text: #ffffff;
  --ct-button-primary-radius: 8px;
  --ct-button-disabled-opacity: .55;
  --ct-button-secondary-background: #edf4f2;
  --ct-button-secondary-border: 1px solid rgba(0,38,32,.24);
  --ct-button-secondary-text: #10201d;
  --ct-button-secondary-shadow: none;
  --ct-button-secondary-radius: 8px;
  --ct-button-secondary-hover-background: #edf4f2;
  --ct-button-secondary-hover-border: 1px solid rgba(0,38,32,.24);
  --ct-button-secondary-hover-text: #10201d;
  --ct-button-secondary-active-background: #e0ece9;
  --ct-button-secondary-active-border: 1px solid #29a2a7;
  --ct-button-secondary-active-text: #0f7672;
  --ct-button-secondary-active-shadow: inset 0 1px 2px rgba(0,38,32,.10);
  --ct-button-secondary-disabled-background: #edf4f2;
  --ct-button-secondary-disabled-border: 1px solid rgba(0,38,32,.13);
  --ct-button-secondary-disabled-text: #94a7a2;
  --ct-button-danger-background: var(--ct-danger);
  --ct-button-danger-border: 1px solid transparent;
  --ct-button-danger-text: #ffffff;
  --ct-button-danger-shadow: none;
  --ct-button-danger-radius: 8px;
  --ct-button-danger-hover-background: #961c2c;
  --ct-button-danger-hover-border: 1px solid transparent;
  --ct-button-danger-hover-text: #ffffff;
  --ct-button-danger-active-background: #7c1724;
  --ct-button-danger-active-border: 1px solid #7c1724;
  --ct-button-danger-active-text: #ffffff;
  --ct-button-danger-active-shadow: inset 0 1px 2px rgba(0,0,0,.25);
  --ct-button-danger-disabled-background: #c3c2b7;
  --ct-button-danger-disabled-border: 1px solid transparent;
  --ct-button-danger-disabled-text: #ffffff;
  --ct-input-background: #ffffff;
  --ct-input-border: 1px solid var(--ct-border-strong);
  --ct-input-text: var(--ct-text);
  --ct-input-shadow: none;
  --ct-input-radius: 8px;
  --ct-input-focus-border: 1px solid var(--ct-accent);
  --ct-input-focus-shadow: var(--ct-ring);
  --ct-input-hover-border: 1px solid #29a2a7;
  --ct-input-placeholder: #667773;
  --ct-input-disabled-background: #edf4f2;
  --ct-input-disabled-border: 1px solid rgba(0,38,32,.13);
  --ct-input-disabled-text: #94a7a2;
  --ct-input-disabled-opacity: .7;

  --ct-button-hover-transform: translateY(-1px);
  --ct-button-active-transform: translateY(0);
  --ct-nav-hover-transform: translateX(2px);
  --ct-motion-fast: 150ms;
  --ct-motion-base: 200ms;
  --ct-button-transition: background-color var(--ct-motion-fast) var(--ct-ease-soft), border-color var(--ct-motion-fast) var(--ct-ease-soft), box-shadow var(--ct-motion-fast) var(--ct-ease-soft), transform var(--ct-motion-fast) var(--ct-ease-soft);
  --ct-nav-transition: background-color var(--ct-motion-base) var(--ct-ease-soft), color var(--ct-motion-fast) var(--ct-ease-soft), transform var(--ct-motion-fast) var(--ct-ease-soft);
  --ct-cursor-interactive: pointer;
  --ct-cursor-disabled: not-allowed;

  --ct-ease-out: cubic-bezier(.16, 1, .3, 1);
  --ct-ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ct-ease-soft: cubic-bezier(.4, 0, .2, 1);
  --ct-shadow-1: 0 1px 2px rgba(0,38,32,.06);
  --ct-shadow-2: 0 4px 12px rgba(0,38,32,.10);
  --ct-shadow-3: 0 12px 32px rgba(0,38,32,.16);
  --ct-ring: 0 0 0 2px rgba(41,162,167,.45);
  --ct-ring-inset: inset 0 0 0 1px rgba(41, 162, 167, .30);

  --ct-sidebar-width: 14.5rem;
  --ct-topbar-height: 4.25rem;
  --ct-content-max: 100rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ct-brand-deep: #29a2a7;
  --ct-brand: #29a2a7;
  --ct-accent: #4dd9b4;
  --ct-accent-text: #4dd9b4;
  --ct-brand-gradient: linear-gradient(to top right,#002620 0%,#29a2a7 100%);
  --ct-brand-gradient-soft: linear-gradient(135deg, rgba(41, 162, 167, .14), rgba(77, 217, 180, .08));
  --ct-page: #0a1110;
  --ct-surface: #111b19;
  --ct-surface-raised: #172421;
  --ct-surface-soft: #1b2c28;
  --ct-surface-strong: #233732;
  --ct-backdrop: rgba(0, 0, 0, .65);
  --ct-modal-surface: #1b1b1f;
  --ct-card-background: #172421;
  --ct-card-shadow: 0 4px 12px rgba(0,0,0,.40);
  --ct-modal-backdrop: rgba(0, 0, 0, .65);
  --ct-button-primary-border: 1px solid rgba(41,162,167,.55);
  --ct-button-primary-active-background: #0f7672;
  --ct-button-primary-active-border: 1px solid #4dd9b4;
  --ct-button-primary-active-shadow: inset 0 1px 2px rgba(0,0,0,.35);
  --ct-button-primary-disabled-background: #526862;
  --ct-button-primary-disabled-text: #c0cfcb;
  --ct-button-primary-hover-border: 1px solid rgba(41,162,167,.75);
  --ct-button-primary-shadow: 0 2px 8px rgba(0,0,0,.45), 0 0 0 1px rgba(41,162,167,.15) inset;
  --ct-button-primary-hover-shadow: 0 3px 12px rgba(0,0,0,.55), 0 0 0 1px rgba(41,162,167,.35) inset;
  --ct-button-danger-background: #8f1f2d;
  --ct-button-secondary-background: #1b2c28;
  --ct-button-secondary-border: 1px solid rgba(220,245,239,.22);
  --ct-button-secondary-text: #f0f7f5;
  --ct-input-background: #111b19;
  --ct-card-hover-shadow: 0 4px 12px rgba(0,0,0,.40);
  --ct-card-active-border: 1px solid #4dd9b4;
  --ct-nav-text: #c0cfcb;
  --ct-nav-icon: #94a7a2;
  --ct-nav-hover-background: #1b2c28;
  --ct-nav-hover-text: #f0f7f5;
  --ct-nav-active-background: #233732;
  --ct-nav-active-text: #4dd9b4;
  --ct-nav-active-indicator: #4dd9b4;
  --ct-nav-border: 1px solid rgba(220,245,239,.12);
  --ct-nav-disabled-text: #667773;
  --ct-button-secondary-hover-background: #1b2c28;
  --ct-button-secondary-hover-border: 1px solid rgba(220,245,239,.22);
  --ct-button-secondary-hover-text: #f0f7f5;
  --ct-button-secondary-active-background: #233732;
  --ct-button-secondary-active-border: 1px solid #4dd9b4;
  --ct-button-secondary-active-text: #4dd9b4;
  --ct-button-secondary-active-shadow: inset 0 1px 2px rgba(0,0,0,.30);
  --ct-button-secondary-disabled-background: #1b2c28;
  --ct-button-secondary-disabled-border: 1px solid rgba(220,245,239,.12);
  --ct-button-secondary-disabled-text: #667773;
  --ct-button-danger-hover-background: #a72b3b;
  --ct-button-danger-active-background: #8f1f2d;
  --ct-button-danger-active-border: 1px solid #ff7f8d;
  --ct-button-danger-active-shadow: inset 0 1px 2px rgba(0,0,0,.35);
  --ct-button-danger-disabled-background: #526862;
  --ct-button-danger-disabled-text: #c0cfcb;
  --ct-input-hover-border: 1px solid #4dd9b4;
  --ct-input-placeholder: #94a7a2;
  --ct-input-disabled-background: #1b2c28;
  --ct-input-disabled-border: 1px solid rgba(220,245,239,.12);
  --ct-input-disabled-text: #667773;
  --ct-text: #f0f7f5;
  --ct-text-secondary: #c0cfcb;
  --ct-text-muted: #94a7a2;
  --ct-text-on-brand: #ffffff;
  --ct-border: rgba(220, 245, 239, .12);
  --ct-border-strong: rgba(220, 245, 239, .22);
  --ct-gridline: #263a35;
  --ct-axis: #526862;
  --ct-good: #4dd9a4;
  --ct-good-soft: #133b2e;
  --ct-warning: #f5bc4d;
  --ct-warning-soft: #3e2f12;
  --ct-danger: #ff7f8d;
  --ct-badge-danger-ink: #2a0e12;
  --ct-tour-scrim: rgba(0, 0, 0, .72);
  --ct-danger-soft: #421c23;
  --ct-info: #73c8e9;
  --ct-info-soft: #153545;
  --ct-organic: #94a7a2;
  --ct-series-1: #4dd9b4;
  --ct-series-2: #f18b5a;
  --ct-series-3: #8a84f0;
  --ct-series-4: #efbd52;
  --ct-series-5: #e779a7;
  --ct-series-6: #68c98d;
  --ct-ord-1: #0f5c56;
  --ct-ord-2: #16746e;
  --ct-ord-3: #1e8d8a;
  --ct-ord-4: #29a2a7;
  --ct-ord-5: #4dc0bd;
  --ct-ord-6: #7ed8d1;
  --ct-seq-100: #332f9e;
  --ct-seq-200: #4a45c8;
  --ct-seq-300: #5651d2;
  --ct-seq-400: #6f68e0;
  --ct-seq-500: #8a84f0;
  --ct-seq-600: #a9a5ea;
  --ct-seq-700: #c9c7f2;
  --ct-comparison: #383835;
  --ct-comparison-ink: #6b6a63;
  --ct-delta-up: #0ca30c;
  --ct-delta-down: #f06a6a;
  --ct-shadow-1: 0 1px 2px rgba(0,0,0,.30);
  --ct-shadow-2: 0 4px 12px rgba(0,0,0,.40);
  --ct-shadow-3: 0 12px 32px rgba(0,0,0,.55);
  --ct-ring: 0 0 0 2px rgba(77,217,180,.55);
  --ct-ring-inset: inset 0 0 0 1px rgba(77, 217, 180, .40);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --ct-brand-deep: #29a2a7;
    --ct-brand: #29a2a7;
    --ct-accent: #4dd9b4;
    --ct-accent-text: #4dd9b4;
    --ct-page: #0a1110;
    --ct-surface: #111b19;
    --ct-surface-raised: #172421;
    --ct-surface-soft: #1b2c28;
    --ct-surface-strong: #233732;
    --ct-backdrop: rgba(0, 0, 0, .65);
    --ct-modal-surface: #1b1b1f;
    --ct-modal-backdrop: rgba(0, 0, 0, .65);
    --ct-button-primary-border: 1px solid rgba(41,162,167,.55);
    --ct-button-primary-hover-border: 1px solid rgba(41,162,167,.75);
    --ct-button-primary-shadow: 0 2px 8px rgba(0,0,0,.45), 0 0 0 1px rgba(41,162,167,.15) inset;
    --ct-button-primary-hover-shadow: 0 3px 12px rgba(0,0,0,.55), 0 0 0 1px rgba(41,162,167,.35) inset;
    --ct-button-danger-background: #8f1f2d;
    --ct-text: #f0f7f5;
    --ct-text-secondary: #c0cfcb;
    --ct-text-muted: #94a7a2;
    --ct-border: rgba(220, 245, 239, .12);
    --ct-border-strong: rgba(220, 245, 239, .22);
    --ct-gridline: #263a35;
    --ct-axis: #526862;
    --ct-good: #4dd9a4;
    --ct-good-soft: #133b2e;
    --ct-warning: #f5bc4d;
    --ct-warning-soft: #3e2f12;
    --ct-danger: #ff7f8d;
    --ct-badge-danger-ink: #2a0e12;
    --ct-tour-scrim: rgba(0, 0, 0, .72);
    --ct-danger-soft: #421c23;
    --ct-info: #73c8e9;
    --ct-info-soft: #153545;
    --ct-organic: #94a7a2;
    --ct-series-1: #4dd9b4;
    --ct-series-2: #f18b5a;
    --ct-series-3: #8a84f0;
    --ct-series-4: #efbd52;
    --ct-series-5: #e779a7;
    --ct-series-6: #68c98d;
    --ct-ord-1: #0f5c56;
    --ct-ord-2: #16746e;
    --ct-ord-3: #1e8d8a;
    --ct-ord-4: #29a2a7;
    --ct-ord-5: #4dc0bd;
    --ct-ord-6: #7ed8d1;
    --ct-seq-100: #332f9e;
    --ct-seq-200: #4a45c8;
    --ct-seq-300: #5651d2;
    --ct-seq-400: #6f68e0;
    --ct-seq-500: #8a84f0;
    --ct-seq-600: #a9a5ea;
    --ct-seq-700: #c9c7f2;
    --ct-comparison: #383835;
    --ct-comparison-ink: #6b6a63;
    --ct-delta-up: #0ca30c;
    --ct-delta-down: #f06a6a;
    --ct-shadow-1: 0 1px 2px rgba(0,0,0,.30);
    --ct-shadow-2: 0 4px 12px rgba(0,0,0,.40);
    --ct-shadow-3: 0 12px 32px rgba(0,0,0,.55);
    --ct-ring: 0 0 0 2px rgba(77,217,180,.55);
  }
}
