/* ═══════════════════════════════════════════════════
   T-Canvas Design Tokens
   Warm Pastel Glassmorphism Theme
   ═══════════════════════════════════════════════════ */

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

/* ── Light Theme (default) ───────────────────────── */
:root,
:root[data-theme="light"] {
  /* Backgrounds */
  --bg-primary: #faf7f4;
  --bg-secondary: #f3eeea;
  --bg-tertiary: #ebe5df;
  --bg-card: rgba(255, 255, 255, 0.6);
  --bg-card-hover: rgba(255, 255, 255, 0.85);
  --bg-card-active: rgba(255, 255, 255, 0.95);
  --bg-overlay: rgba(0, 0, 0, 0.3);

  /* Accents */
  --accent: #7c6cf0;
  --accent-hover: #6b5ad9;
  --accent-light: #a599f7;
  --accent-soft: rgba(124, 108, 240, 0.08);
  --accent-soft-hover: rgba(124, 108, 240, 0.15);
  --accent-gradient: linear-gradient(135deg, #7c6cf0 0%, #a78bfa 50%, #f0a0c8 100%);
  --accent-2: #f0a0c8;
  --accent-2-soft: rgba(240, 160, 200, 0.1);

  /* Text */
  --text-primary: #2d2937;
  --text-secondary: #7a7588;
  --text-tertiary: #a8a3b5;
  --text-inverse: #ffffff;

  /* Borders */
  --border-color: rgba(0, 0, 0, 0.06);
  --border-color-hover: rgba(0, 0, 0, 0.12);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);

  /* Glass */
  --glass-blur: 16px;
  --glass-border: rgba(255, 255, 255, 0.5);

  /* Semantic */
  --success: #5cc9a7;
  --success-soft: rgba(92, 201, 167, 0.1);
  --warning: #f0c078;
  --warning-soft: rgba(240, 192, 120, 0.1);
  --danger: #ef6b6b;
  --danger-soft: rgba(239, 107, 107, 0.1);
  --info: #68b5f8;
  --info-soft: rgba(104, 181, 248, 0.1);
}

/* ── Dark Theme ───────────────────────────────────── */
:root[data-theme="dark"] {
  --bg-primary: #18161e;
  --bg-secondary: #22202a;
  --bg-tertiary: #2e2c38;
  --bg-card: rgba(40, 38, 52, 0.6);
  --bg-card-hover: rgba(50, 48, 64, 0.8);
  --bg-card-active: rgba(60, 58, 74, 0.95);
  --bg-overlay: rgba(0, 0, 0, 0.55);

  --accent: #8b7cf6;
  --accent-hover: #9d90f8;
  --accent-light: #b0a5f8;
  --accent-soft: rgba(139, 124, 246, 0.12);
  --accent-soft-hover: rgba(139, 124, 246, 0.22);
  --accent-gradient: linear-gradient(135deg, #8b7cf6 0%, #b0a5f8 50%, #f0a0c8 100%);
  --accent-2: #f0a0c8;
  --accent-2-soft: rgba(240, 160, 200, 0.15);

  --text-primary: #eae8f0;
  --text-secondary: #8a86a0;
  --text-tertiary: #5a5670;
  --text-inverse: #18161e;

  --border-color: rgba(255, 255, 255, 0.06);
  --border-color-hover: rgba(255, 255, 255, 0.12);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.16);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.32);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4);

  --glass-blur: 16px;
  --glass-border: rgba(255, 255, 255, 0.08);

  --success: #5cc9a7;
  --success-soft: rgba(92, 201, 167, 0.15);
  --warning: #f0c078;
  --warning-soft: rgba(240, 192, 120, 0.15);
  --danger: #ef6b6b;
  --danger-soft: rgba(239, 107, 107, 0.15);
  --info: #68b5f8;
  --info-soft: rgba(104, 181, 248, 0.15);
}

/* ── Sizing Tokens ─────────────────────────────────── */
:root {
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --space-xxs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --space-3xl: 48px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-size-2xs: 10px;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-md: 13px;
  --font-size-base: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;

  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  --transition-fast: 150ms ease;
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Global Reset ──────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--text-tertiary);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}
