/* ============================================================================
 * PLANQA · Design tokens (Midnight Teal v0.2)
 * ============================================================================ */

@font-face {
  font-family: 'Zen Dots Kir';
  src: url('../fonts/ZenDotsKir.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- Primary · Teal 50–950 ---------- */
  --teal-50:  #F0FDFA;
  --teal-100: #CCFBF1;
  --teal-200: #99F6E4;
  --teal-300: #5EEAD4;
  --teal-400: #2DD4BF;
  --teal-500: #14B8A6;
  --teal-600: #0D9488;
  --teal-700: #0F766E;
  --teal-800: #115E59;
  --teal-900: #134E4A;
  --teal-950: #042F2E;

  /* ---------- Neutral · Slate ---------- */
  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;

  /* ---------- Semantic ---------- */
  --success-50:  #ECFDF5;
  --success-500: #10B981;
  --success-700: #047857;
  --warning-50:  #FFFBEB;
  --warning-500: #F59E0B;
  --warning-700: #B45309;
  --error-50:    #FFF1F2;
  --error-500:   #F43F5E;
  --error-700:   #BE123C;
  --info-50:     #EFF6FF;
  --info-500:    #3B82F6;
  --info-700:    #1D4ED8;

  /* ---------- AI accent · 3 регистра ---------- */
  --ai-bright:  #F59E0B;
  --ai-dim:     #FCD34D;
  --ai-surface: #FEF3C7;
  --ai-text:    #78350F;

  /* ---------- Role aliases · LIGHT ---------- */
  --color-paper:          #FFFFFF;
  --color-surface:        var(--teal-50);
  --color-surface-alt:    var(--slate-50);
  --color-ink:            var(--teal-950);
  --color-text-primary:   var(--teal-900);
  --color-text-secondary: var(--slate-500);
  --color-text-tertiary:  var(--slate-400);
  --color-border:         rgba(19, 78, 74, 0.10);
  --color-border-strong:  rgba(19, 78, 74, 0.18);
  --color-primary:         var(--teal-600);
  --color-primary-hover:   var(--teal-700);
  --color-primary-pressed: var(--teal-800);

  /* ---------- Typography ---------- */
  --font-display: 'Zen Dots Kir', 'Inter', system-ui, sans-serif;
  --font-sans:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ---------- Radius ---------- */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;

  /* ---------- Shadows ---------- */
  --shadow-sm:    0 1px 2px rgba(19, 78, 74, 0.05);
  --shadow-md:    0 4px 12px rgba(19, 78, 74, 0.08);
  --shadow-lg:    0 12px 32px rgba(13, 148, 136, 0.14);
  --shadow-focus: 0 0 0 3px rgba(13, 148, 136, 0.18);

  /* ---------- Animation ---------- */
  --duration-fast:    150ms;
  --duration-default: 200ms;
  --duration-slow:    300ms;
  --ease-soft:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-sheet:       cubic-bezier(0.32, 0.72, 0, 1);

  /* ---------- z-index ---------- */
  --z-sticky:  10;
  --z-tabbar:  20;
  --z-overlay: 50;
  --z-sheet:   60;
  --z-toast:   100;
  --z-loading: 9998;
  --z-auth:    9999;
}

/* ============================================================================
 * Base typography
 * ============================================================================ */

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html, body {
  background: var(--color-paper);
  color: var(--color-text-primary);
}

body {
  font-family: var(--font-sans);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  line-height: 1.5;
  margin: 0;
}

::selection { background: var(--teal-200); color: var(--teal-950); }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
button { cursor: pointer; border: none; background: transparent; padding: 0; }
a { color: inherit; text-decoration: none; }

/* Lucide-style иконки наследуют цвет */
svg { display: block; flex-shrink: 0; }
