/* TTN Global ERP – design tokens (light / dark) */

:root,
[data-theme="light"] {
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;

  --color-primary: #00aeef;
  --color-primary-hover: #0099d4;
  --color-primary-muted: rgba(0, 174, 239, 0.12);

  --color-bg: #f5f7f9;
  --color-surface: #ffffff;
  --color-surface-elevated: #ffffff;
  --color-border: #e8ecef;
  --color-border-subtle: #f0f0f0;

  --color-sidebar: #000000;
  --color-sidebar-hover: rgba(255, 255, 255, 0.08);
  --color-sidebar-active: #00aeef;

  --color-text: #1a1a1a;
  --color-text-secondary: #757575;
  --color-text-muted: #9e9e9e;
  --color-text-inverse: #ffffff;

  --color-success: #4caf50;
  --color-success-bg: rgba(76, 175, 80, 0.12);
  --color-success-text: #2e7d32;

  --color-danger: #e53935;
  --color-danger-bg: rgba(229, 57, 53, 0.12);
  --color-danger-text: #c62828;

  --color-warning: #fb8c00;
  --color-warning-bg: rgba(251, 140, 0, 0.12);

  --color-info: #1976d2;
  --color-info-bg: rgba(25, 118, 210, 0.12);

  --color-search-bg: #f0f2f5;
  --color-table-head: #f0f0f0;
  --color-table-row-hover: #fafbfc;

  --chart-blue-1: #00aeef;
  --chart-blue-2: #0288d1;
  --chart-blue-3: #4fc3f7;
  --chart-gray: #cfd8dc;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-sidebar: 2px 0 12px rgba(0, 0, 0, 0.15);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --sidebar-width: 220px;
  --topbar-height: 96px;
  --main-gutter: 220px;
}

[data-theme="dark"] {
  --color-primary: #00aeef;
  --color-primary-hover: #33bef2;
  --color-primary-muted: rgba(0, 174, 239, 0.18);

  --color-bg: #121212;
  --color-surface: #1e1e1e;
  --color-surface-elevated: #242424;
  --color-border: #2c2c2c;
  --color-border-subtle: #2c2c2c;

  --color-sidebar: #000000;
  --color-sidebar-hover: rgba(255, 255, 255, 0.08);
  --color-sidebar-active: #00aeef;

  --color-text: #e0e0e0;
  --color-text-secondary: #9e9e9e;
  --color-text-muted: #757575;
  --color-text-inverse: #ffffff;

  --color-success: #66bb6a;
  --color-success-bg: rgba(102, 187, 106, 0.15);
  --color-success-text: #81c784;

  --color-danger: #ef5350;
  --color-danger-bg: rgba(239, 83, 80, 0.15);
  --color-danger-text: #ef9a9a;

  --color-warning: #ffa726;
  --color-warning-bg: rgba(255, 167, 38, 0.15);

  --color-info: #42a5f5;
  --color-info-bg: rgba(66, 165, 245, 0.15);

  --color-search-bg: #2c2c2c;
  --color-table-head: #2c2c2c;
  --color-table-row-hover: #252525;

  --chart-blue-1: #00aeef;
  --chart-blue-2: #29b6f6;
  --chart-blue-3: #4dd0e1;
  --chart-gray: #546e7a;

  --shadow-card: none;
  --shadow-sidebar: 2px 0 16px rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: clip;
  max-width: 100%;
}

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-hover);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
