/* variables.css — CSS переменные AI Chat АКЗ v2.0 */
:root {
  /* Colors - Light theme */
  --bg: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Accent */
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --accent-light: #e0f2fe;

  /* Status */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info-light: #e0f2fe;

  /* User/AI colors */
  --user-bg: #1e3a5f;
  --user-text: #ffffff;
  --ai-bg: #f8fafc;
  --ai-border: #e2e8f0;

  /* Layout sizes */
  --header-height: 56px;

  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-bg: #0f172a;
  --sidebar-text: rgba(255, 255, 255, 0.85);
  --sidebar-text-muted: rgba(255, 255, 255, 0.5);
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --sidebar-hover: rgba(255, 255, 255, 0.08);

  /* Drawer */
  --drawer-width: 380px;
  --drawer-bg: #ffffff;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
  --font-size-xs: 11px;
  --font-size-sm: 13px;
  --font-size-md: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;

  /* Z-index */
  --z-sidebar: 30;
  --z-drawer: 40;
  --z-overlay: 45;
  --z-modal: 50;
  --z-header: 20;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.35s ease;

  /* Calc result */
  --calc-result-bg: #f0fdf4;
  --calc-result-border: #86efac;
}

/* Dark theme */
html.dark {
  --bg: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --border-light: #1e293b;

  --accent-light: #0c4a6e;

  --user-bg: #2563eb;
  --ai-bg: #1e293b;
  --ai-border: #334155;

  --drawer-bg: #1e293b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);

  --calc-result-bg: #064e3b;
  --calc-result-border: #059669;
}

/* Reset and base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-size: var(--font-size-md);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Selection */
::selection {
  background: var(--accent-light);
  color: var(--text);
}

html.dark ::selection {
  background: var(--accent);
  color: white;
}
