/* frontend/styles/tokens.css
 * Single source of truth cho toàn bộ design tokens.
 * Import file này đầu tiên trong mọi page.
 * Không đặt rules ở đây — chỉ variables.
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* === Colors === */
  --color-bg:              #F7F5F0;
  --color-surface:         #FFFFFF;
  --color-surface-raised:  #FDFCF9;
  --color-primary:         #1B2B4B;
  --color-primary-hover:   #243863;
  --color-primary-dark:    #111E35;
  --color-accent:          #E88C3A;
  --color-accent-hover:    #CF7A2D;
  --color-accent-soft:     #FDF3E3;
  --color-text:            #1A1A1A;
  --color-text-muted:      #6B6B6B;
  --color-text-disabled:   #A8A8A8;
  --color-text-light:      #9B9B9B;
  --color-border:          #E2DDD5;
  --color-border-light:    #EDE9E3;
  --color-border-focus:    #1B2B4B;
  --color-success:         #2D6A4F;
  --color-success-soft:    #D8F3DC;
  --color-danger:          #C1440E;
  --color-danger-soft:     #FDEEE8;
  --color-warn:            #B45309;
  --color-warn-soft:       #FEF3C7;

  /* === Typography === */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Font sizes */
  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-md:   17px;
  --text-lg:   20px;
  --text-xl:   24px;
  --text-2xl:  32px;
  --text-3xl:  40px;
  --text-4xl:  52px;

  /* Line heights */
  --leading-tight:   1.2;
  --leading-normal:  1.6;
  --leading-relaxed: 1.8;

  /* === Spacing (4px base) === */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* === Radius === */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* === Shadows === */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

  /* === Transitions === */
  --transition-fast:   80ms ease;
  --transition-normal: 150ms ease;
  --transition-slow:   250ms ease;

  /* === Z-index === */
  --z-base:    0;
  --z-sticky:  10;
  --z-overlay: 20;
  --z-modal:   30;
  --z-toast:   40;

  /* === Layout === */
  --sidebar-width:     260px;
  --header-height:     60px;
  --content-max-width: 900px;
  --page-padding:      var(--space-6);
}

/* Mobile overrides */
@media (max-width: 767px) {
  :root {
    --page-padding:  var(--space-4);
    --header-height: 52px;
  }
}
