/**
 * Первый Вагон — Design System
 * Стиль: Linear.app (тёмная тема, минимализм, премиум)
 * Версия: 1.0
 */

/* ========================================
   FONTS
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  /* ===== COLORS: Backgrounds (Linear.app Style) ===== */
  --bg-primary: #08090A;
  /* Almost pure black */
  --bg-secondary: #0F1113;
  /* Dark panel background */
  --bg-tertiary: #16181B;
  /* Hover states */
  --bg-card: #121316;
  /* Card background */
  --bg-card-hover: #191A1E;
  --bg-elevated: #1C1E23;
  --bg-input: #0A0A0B;

  /* ===== COLORS: Text ===== */
  --text-primary: #EDEDEF;
  /* Off-white */
  --text-secondary: #9CA3AF;
  /* Neutral Grey */
  --text-muted: #6B7280;
  /* Muted Grey */
  --text-disabled: #4B5563;
  --text-on-brand: #000000;
  /* Black text for white buttons */

  /* ===== COLORS: Brand (Pure Monochrome) ===== */
  --brand-primary: #FFFFFF;
  /* Pure White */
  --brand-primary-hover: #E5E5E5;
  /* Light Grey Hover */
  --brand-secondary: #A3A3A3;
  /* Grey */
  --brand-gradient: linear-gradient(135deg, #FFFFFF 0%, #D4D4D8 100%);
  --brand-glow: rgba(255, 255, 255, 0.2);

  /* ===== COLORS: Status ===== */
  --status-open: #FFFFFF;
  --status-open-bg: rgba(255, 255, 255, 0.1);
  --status-radar: #D4D4D8;
  --status-radar-bg: rgba(212, 212, 216, 0.1);
  --status-closed: #52525B;
  --status-closed-bg: rgba(82, 82, 91, 0.1);

  /* ===== COLORS: Semantic ===== */
  --success: #22C55E;
  /* Keep green for success/money */
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #FFFFFF;

  /* ===== BORDERS ===== */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(255, 255, 255, 0.4);

  /* ===== SHADOWS & GLOWS ===== */
  --glow-primary: 0 0 30px rgba(255, 255, 255, 0.15);
  --glow-primary-intense: 0 0 60px rgba(255, 255, 255, 0.25);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.7);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);

  /* ===== TYPOGRAPHY ===== */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
  --text-6xl: 4.5rem;
  --text-7xl: 5.5rem;

  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  --leading-none: 1;
  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;

  /* ===== SPACING ===== */
  --spacing-0: 0;
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;
  --spacing-20: 5rem;
  --spacing-24: 6rem;
  --spacing-32: 8rem;
  --spacing-40: 10rem;

  /* ===== LAYOUT ===== */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;
  --container-max: 1600px;

  /* ===== BORDER RADIUS ===== */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;

  /* ===== TRANSITIONS ===== */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --transition-slower: 500ms ease;

  /* ===== Z-INDEX ===== */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
}

/* Remove default list styles */
ul,
ol {
  list-style: none;
}

/* Remove default link styles */
a {
  color: inherit;
  text-decoration: none;
}

/* Remove default button styles */
button {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* Default image styles */
img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Form elements */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Container */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--spacing-6);
  padding-right: var(--spacing-6);
}

.container-narrow {
  max-width: var(--container-lg);
}

.container-wide {
  max-width: var(--container-2xl);
}

/* Text alignment */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* Font weights */
.font-normal {
  font-weight: var(--font-normal);
}

.font-medium {
  font-weight: var(--font-medium);
}

.font-semibold {
  font-weight: var(--font-semibold);
}

.font-bold {
  font-weight: var(--font-bold);
}

/* Text colors */
.text-primary {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.text-brand {
  color: var(--brand-primary);
}

/* Background colors */
.bg-primary {
  background-color: var(--bg-primary);
}

.bg-secondary {
  background-color: var(--bg-secondary);
}

.bg-card {
  background-color: var(--bg-card);
}

/* Flex utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

.gap-1 {
  gap: var(--spacing-1);
}

.gap-2 {
  gap: var(--spacing-2);
}

.gap-3 {
  gap: var(--spacing-3);
}

.gap-4 {
  gap: var(--spacing-4);
}

.gap-6 {
  gap: var(--spacing-6);
}

.gap-8 {
  gap: var(--spacing-8);
}

/* Grid utilities */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Spacing */
.mt-auto {
  margin-top: auto;
}

.mb-auto {
  margin-bottom: auto;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Visibility */
.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ========================================
   TYPOGRAPHY HELPERS
   ======================================== */
.heading-1 {
  font-size: var(--text-6xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.heading-2 {
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.heading-3 {
  font-size: var(--text-4xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
}

.heading-4 {
  font-size: var(--text-3xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
}

.heading-5 {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
}

.heading-6 {
  font-size: var(--text-xl);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
}

.body-lg {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.body-base {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

.body-sm {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.caption {
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--text-muted);
}

/* Gradient text */
.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */
/* 
  sm: 640px
  md: 768px
  lg: 1024px
  xl: 1280px
  2xl: 1536px
*/

@media (max-width: 1024px) {
  .container {
    padding-left: var(--spacing-4);
    padding-right: var(--spacing-4);
  }

  .heading-1 {
    font-size: var(--text-5xl);
  }

  .heading-2 {
    font-size: var(--text-4xl);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .heading-1 {
    font-size: var(--text-4xl);
  }

  .heading-2 {
    font-size: var(--text-3xl);
  }

  .heading-3 {
    font-size: var(--text-2xl);
  }

  .grid-cols-3 {
    grid-template-columns: repeat(1, 1fr);
  }

  .grid-cols-2 {
    grid-template-columns: repeat(1, 1fr);
  }
}