/* Jornada — Design Tokens (Premium) */
:root {
  color-scheme: light;

  /* Marca — Verde mint → Navy (identidade Jornada) */
  --brand-50: #f0fdfa;
  --brand-100: #ccfbf1;
  --brand-200: #99f6e4;
  --brand-300: #5eead4;
  --brand-400: #2dd4bf;
  --brand-500: #2AF598;
  --brand-600: #14B8A6;
  --brand-700: #0f766e;
  --brand-800: #115e59;
  --brand-900: #0B1B32;
  --brand-gradient: linear-gradient(135deg, #2AF598 0%, #14B8A6 45%, #0B1B32 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(42, 245, 152, 0.12) 0%, rgba(20, 184, 166, 0.06) 100%);
  --brand-glow: 0 0 40px rgba(20, 184, 166, 0.35);

  --color-primary: var(--brand-600);
  --color-primary-dark: var(--brand-700);
  --color-primary-light: var(--brand-500);
  --color-primary-subtle: var(--brand-50);
  --color-primary-gradient: var(--brand-gradient);
  --theme-color-meta: #0B1B32;

  /* Superfícies */
  --surface-app: #f4f7fb;
  --surface-app-pattern: radial-gradient(ellipse 80% 60% at 10% -10%, rgba(13, 148, 136, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 50% at 90% 0%, rgba(5, 150, 105, 0.06), transparent 45%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(59, 130, 246, 0.04), transparent 50%);
  --surface-card: #ffffff;
  --surface-elevated: #ffffff;
  --surface-muted: #f1f5f9;
  --surface-overlay: rgba(15, 23, 42, 0.6);
  --surface-sidebar: linear-gradient(180deg, #0f172a 0%, #0c1222 55%, #080d18 100%);
  --surface-sidebar-solid: #0f172a;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-glass-border: rgba(255, 255, 255, 0.5);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-on-primary: #ffffff;
  --text-on-sidebar: #e2e8f0;
  --border-default: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-subtle: rgba(226, 232, 240, 0.8);

  /* Semânticas */
  --color-success: #10b981;
  --color-success-bg: #d1fae5;
  --color-success-text: #065f46;
  --color-error: #ef4444;
  --color-error-bg: #fee2e2;
  --color-error-text: #991b1b;
  --color-warning: #f59e0b;
  --color-warning-bg: #fef3c7;
  --color-warning-text: #92400e;
  --color-info: #3b82f6;
  --color-info-bg: #dbeafe;
  --color-info-text: #1e40af;

  /* Chips de marcação (relatório) */
  --report-mark-in-bg: rgba(13, 148, 136, 0.12);
  --report-mark-in-text: var(--brand-700);
  --report-mark-out-bg: rgba(59, 130, 246, 0.12);
  --report-mark-out-text: #1d4ed8;

  /* Tipografia */
  --font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'DM Sans', system-ui, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --letter-tight: -0.025em;
  --letter-wide: 0.04em;

  /* Espaçamento */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Raios */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 24px 64px rgba(15, 23, 42, 0.16);
  --shadow-brand: 0 8px 32px rgba(13, 148, 136, 0.28);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 4px 12px rgba(15, 23, 42, 0.06), 0 16px 40px rgba(15, 23, 42, 0.1);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Layout PWA */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --topbar-height: 64px;
  --topbar-total-height: calc(var(--topbar-height) + var(--safe-top));
  --bottom-nav-height: calc(64px + env(safe-area-inset-bottom, 0px));
  --sidebar-width: 272px;
  --content-max-width: 1280px;

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 500;
  --z-toast: 600;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-app: #0b1120;
  --surface-app-pattern: radial-gradient(ellipse 80% 60% at 10% -10%, rgba(13, 148, 136, 0.15), transparent 50%),
    radial-gradient(ellipse 60% 50% at 90% 0%, rgba(5, 150, 105, 0.1), transparent 45%);
  --surface-card: #151f32;
  --surface-elevated: #1e293b;
  --surface-muted: #1a2438;
  --surface-sidebar: linear-gradient(180deg, #020617 0%, #0a0f1a 100%);
  --surface-sidebar-solid: #020617;
  --surface-glass: rgba(21, 31, 50, 0.85);
  --surface-glass-border: rgba(51, 65, 85, 0.6);
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-default: #1e293b;
  --border-strong: #334155;
  --border-subtle: rgba(30, 41, 59, 0.8);
  --color-primary-subtle: rgba(13, 148, 136, 0.18);
  --theme-color-meta: #0B1B32;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.2), 0 16px 40px rgba(0, 0, 0, 0.35);
  --report-mark-in-bg: rgba(45, 212, 191, 0.22);
  --report-mark-in-text: #5eead4;
  --report-mark-out-bg: rgba(96, 165, 250, 0.22);
  --report-mark-out-text: #93c5fd;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface-app: #0b1120;
    --surface-app-pattern: radial-gradient(ellipse 80% 60% at 10% -10%, rgba(13, 148, 136, 0.15), transparent 50%),
      radial-gradient(ellipse 60% 50% at 90% 0%, rgba(5, 150, 105, 0.1), transparent 45%);
    --surface-card: #151f32;
    --surface-elevated: #1e293b;
    --surface-muted: #1a2438;
    --surface-sidebar: linear-gradient(180deg, #020617 0%, #0a0f1a 100%);
    --surface-sidebar-solid: #020617;
    --surface-glass: rgba(21, 31, 50, 0.85);
    --surface-glass-border: rgba(51, 65, 85, 0.6);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-default: #1e293b;
    --border-strong: #334155;
    --border-subtle: rgba(30, 41, 59, 0.8);
    --color-primary-subtle: rgba(13, 148, 136, 0.18);
    --theme-color-meta: #0B1B32;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.2), 0 16px 40px rgba(0, 0, 0, 0.35);
    --report-mark-in-bg: rgba(45, 212, 191, 0.22);
    --report-mark-in-text: #5eead4;
    --report-mark-out-bg: rgba(96, 165, 250, 0.22);
    --report-mark-out-text: #93c5fd;
  }
}
