/* ==========================================================================
   TASKMANAGER v3 — DESIGN SYSTEM
   Single Source of Truth für alle visuellen Tokens.
   Expert-level: Opacity Scale, Elevation, Motion, Type Colors, Responsive.
   ========================================================================== */

/* ====== 1. COLOR PALETTE ====== */
:root {
  /* ── Primary ── */
  --primary:         #3B82F6;
  --primary-hover:   #2563EB;
  --primary-active:  #1D4ED8;
  --primary-light:   #93C5FD;
  --primary-rgb:     59, 130, 246;

  /* ── Semantic Colors ── */
  --success:         #047857;
  --success-hover:   #065F46;
  --success-rgb:     16, 185, 129;
  --warning:         #F59E0B;
  --warning-hover:   #D97706;
  --warning-rgb:     245, 158, 11;
  --danger:          #E11D48;
  --danger-hover:    #E11D48;
  --danger-rgb:      244, 63, 94;
  --info:            #0369A1;
  --info-hover:      #075985;
  --info-rgb:        14, 165, 233;

  /* ── Opacity Scale (for overlays, hovers, disabled) ── */
  --alpha-0:   0;
  --alpha-5:   0.05;
  --alpha-10:  0.10;
  --alpha-15:  0.15;
  --alpha-20:  0.20;
  --alpha-30:  0.30;
  --alpha-40:  0.40;
  --alpha-50:  0.50;
  --alpha-60:  0.60;
  --alpha-70:  0.70;
  --alpha-80:  0.80;
  --alpha-90:  0.90;
  --alpha-100: 1.00;

  /* ── Surfaces (Light Mode) ── */
  --bg:              #F8FAFC;
  --surface:         #FFFFFF;
  --surface-alt:     #F1F5F9;
  --surface-overlay: #FFFFFF;
  --border:          #E2E8F0;
  --border-subtle:   #F1F5F9;
  --border-strong:   #CBD5E1;

  /* ── Text (Light Mode) ── */
  --text:            #0F172A;
  --text-secondary:  #475569;
  --text-muted:      #64748B;
  --text-placeholder:#CBD5E1;
  --text-inverse:    #FFFFFF;
  --text-on-primary: #FFFFFF;

  /* ── Type Badge Colors (Light + Dark) ── */
  --type-task:        #0891B2;
  --type-task-bg:     rgba(8, 145, 178, 0.1);
  --type-appointment: #7C3AED;
  --type-appointment-bg: rgba(124, 58, 237, 0.1);
  --type-event:       #D97706;
  --type-event-bg:    rgba(217, 119, 6, 0.1);
  --type-reminder:    #DC2626;
  --type-reminder-bg: rgba(220, 38, 38, 0.1);
  --type-birthday:    #DB2777;
  --type-birthday-bg: rgba(219, 39, 119, 0.1);

  /* ── Alert / Toast backgrounds ── */
  --alert-success-bg:   #ECFDF5;
  --alert-success-border: #A7F3D0;
  --alert-success-fg:   #065F46;
  --alert-warning-bg:   #FFFBEB;
  --alert-warning-border: #FDE68A;
  --alert-warning-fg:   #92400E;
  --alert-error-bg:     #FEF2F2;
  --alert-error-border: #FECACA;
  --alert-error-fg:     #991B1B;
  --alert-info-bg:      #EFF6FF;
  --alert-info-border:  #BFDBFE;
  --alert-info-fg:      #1E40AF;

  /* ── Calendar Event Colors ── */
  --cal-event:         #3B82F6;
  --cal-event-bg:      rgba(59, 130, 246, 0.08);
  --cal-appointment:   #8B5CF6;
  --cal-appointment-bg: rgba(139, 92, 246, 0.08);
  --cal-task:          #10B981;
  --cal-task-bg:       rgba(16, 185, 129, 0.08);
  --cal-reminder:      #F59E0B;
  --cal-reminder-bg:   rgba(245, 158, 11, 0.08);
  --cal-birthday:      #EC4899;
  --cal-birthday-bg:   rgba(236, 72, 153, 0.08);
  --cal-weekend-bg:    rgba(0, 0, 0, 0.022);
  --cal-today-bg:      rgba(59, 130, 246, 0.06);
  --cal-today-border:  rgba(59, 130, 246, 0.2);
  --cal-hover-bg:      rgba(59, 130, 246, 0.04);

  /* ── Priority Colors ── */
  --prio-0: #9CA3AF;
  --prio-1: #3B82F6;
  --prio-2: #6366F1;
  --prio-3: #F59E0B;
  --prio-4: #EF4444;
  --prio-5: #991B1B;

  /* ── Status Colors ── */
  --status-open:       #3B82F6;
  --status-progress:   #F59E0B;
  --status-done:       #10B981;
  --status-cancelled:  #94A3B8;

  /* ── Chip / Tag ── */
  --chip-bg:     #F3F4F6;
  --chip-fg:     #374151;
  --chip-border: transparent;

  /* ── KBD (Keyboard shortcut) ── */
  --kbd-bg:      #F1F5F9;
  --kbd-border:  #E2E8F0;
  --kbd-fg:      #64748B;
}

/* ── Dark Mode ── */
html[data-theme="dark"],
.dark {
  --bg:              #0B1120;
  --surface:         #1E293B;
  --surface-alt:     #162032;
  --surface-overlay: #1E293B;
  --border:          #334155;
  --border-subtle:   #1E293B;
  --border-strong:   #475569;

  --text:            #F1F5F9;
  --text-secondary:  #94A3B8;
  --text-muted:      #64748B;
  --text-placeholder:#475569;
  --text-inverse:    #0F172A;
  --text-on-primary: #FFFFFF;

  --primary:         #60A5FA;
  --primary-hover:   #93C5FD;
  --primary-active:  #3B82F6;
  --primary-light:   #BFDBFE;
  --primary-rgb:     96, 165, 250;

  /* Type Badges (Dark) */
  --type-task:        #22D3EE;
  --type-task-bg:     rgba(34, 211, 238, 0.12);
  --type-appointment: #A78BFA;
  --type-appointment-bg: rgba(167, 139, 250, 0.12);
  --type-event:       #FBBF24;
  --type-event-bg:    rgba(251, 191, 36, 0.12);
  --type-reminder:    #FCA5A5;
  --type-reminder-bg: rgba(252, 165, 165, 0.12);
  --type-birthday:    #F9A8D4;
  --type-birthday-bg: rgba(249, 168, 212, 0.12);

  --alert-success-bg:   #064E3B;
  --alert-success-border: #065F46;
  --alert-success-fg:   #A7F3D0;
  --alert-warning-bg:   #78350F;
  --alert-warning-border: #92400E;
  --alert-warning-fg:   #FDE68A;
  --alert-error-bg:     #7F1D1D;
  --alert-error-border: #991B1B;
  --alert-error-fg:     #FECACA;
  --alert-info-bg:      #1E3A5F;
  --alert-info-border:  #1E40AF;
  --alert-info-fg:      #BFDBFE;

  --cal-event:         #60A5FA;
  --cal-event-bg:      rgba(96, 165, 250, 0.12);
  --cal-appointment:   #A78BFA;
  --cal-appointment-bg: rgba(167, 139, 250, 0.12);
  --cal-task:          #34D399;
  --cal-task-bg:       rgba(52, 211, 153, 0.12);
  --cal-reminder:      #FBBF24;
  --cal-reminder-bg:   rgba(251, 191, 36, 0.12);
  --cal-birthday:      #F472B6;
  --cal-birthday-bg:   rgba(244, 114, 182, 0.12);
  --cal-weekend-bg:    rgba(255, 255, 255, 0.02);
  --cal-today-bg:      rgba(59, 130, 246, 0.1);
  --cal-today-border:  rgba(59, 130, 246, 0.3);
  --cal-hover-bg:      rgba(96, 165, 250, 0.06);

  --prio-0: #6B7280;
  --prio-1: #3B82F6;
  --prio-2: #6366F1;
  --prio-3: #FBBF24;
  --prio-4: #F87171;
  --prio-5: #DC2626;

  --status-open:       #60A5FA;
  --status-progress:   #FBBF24;
  --status-done:       #34D399;
  --status-cancelled:  #6B7280;

  --chip-bg:     #334155;
  --chip-fg:     #E5E7EB;
  --chip-border: #475569;

  --kbd-bg:      #334155;
  --kbd-border:  #475569;
  --kbd-fg:      #CBD5E1;

  --shadow-focus: 0 0 0 3px rgba(96, 165, 250, 0.4);
}

/* ── Light mode prefers-color-scheme (before data-theme override) ── */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not(.dark) {
    --bg:              #0B1120;
    --surface:         #1E293B;
    --surface-alt:     #162032;
    --surface-overlay: #1E293B;
    --border:          #334155;
    --border-subtle:   #1E293B;
    --border-strong:   #475569;
    --text:            #F1F5F9;
    --text-secondary:  #94A3B8;
    --text-muted:      #94A3B8;
    --text-placeholder:#475569;
    --text-inverse:    #0F172A;
    --primary:         #3B82F6;
    --primary-hover:   #60A5FA;
    --primary-active:  #2563EB;
    --primary-light:   #93C5FD;
    --primary-rgb:     59, 130, 246;
    --type-task:       #22D3EE;
    --type-task-bg:    rgba(34, 211, 238, 0.12);
    --type-appointment: #A78BFA;
    --type-appointment-bg: rgba(167, 139, 250, 0.12);
    --type-event:      #FBBF24;
    --type-event-bg:   rgba(251, 191, 36, 0.12);
    --type-reminder:   #FCA5A5;
    --type-reminder-bg: rgba(252, 165, 165, 0.12);
    --type-birthday:   #F9A8D4;
    --type-birthday-bg: rgba(249, 168, 212, 0.12);
    --cal-event:       #60A5FA;
    --cal-event-bg:    rgba(96, 165, 250, 0.12);
    --cal-appointment: #A78BFA;
    --cal-appointment-bg: rgba(167, 139, 250, 0.12);
    --cal-task:        #34D399;
    --cal-task-bg:     rgba(52, 211, 153, 0.12);
    --cal-reminder:    #FBBF24;
    --cal-reminder-bg: rgba(251, 191, 36, 0.12);
    --cal-birthday:    #F472B6;
    --cal-birthday-bg: rgba(244, 114, 182, 0.12);
    --cal-weekend-bg:  rgba(255, 255, 255, 0.02);
    --cal-today-bg:    rgba(59, 130, 246, 0.1);
    --cal-today-border: rgba(59, 130, 246, 0.3);
    --cal-hover-bg:    rgba(96, 165, 250, 0.06);
    --prio-0: #6B7280;
    --prio-1: #3B82F6;
    --prio-2: #6366F1;
    --prio-3: #FBBF24;
    --prio-4: #F87171;
    --prio-5: #DC2626;
    --status-open:     #60A5FA;
    --status-progress: #FBBF24;
    --status-done:     #34D399;
    --status-cancelled:#6B7280;
    --chip-bg:         #334155;
    --chip-fg:         #E5E7EB;
    --chip-border:     #475569;
    --kbd-bg:          #334155;
    --kbd-border:      #475569;
    --kbd-fg:          #CBD5E1;
    --shadow-focus:    0 0 0 3px rgba(96, 165, 250, 0.4);
  }
}

/* ====== 2. TYPOGRAPHY ====== */
:root {
  --font-family:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                      Roboto, Helvetica, Arial, sans-serif;
  --font-family-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Optical heading scale (fluent, not rigid) */
  --text-h1: 2.25rem;   /* 36px — page titles */
  --text-h2: 1.5rem;    /* 24px — section titles */
  --text-h3: 1.25rem;   /* 20px — card titles */
  --text-h4: 1.125rem;  /* 18px — subsection */
  --text-h5: 1rem;      /* 16px — label-level */
  --text-h6: 0.875rem;  /* 14px — compact */

  /* Body scale */
  --text-body-l:  1.125rem;  /* 18px */
  --text-body-m:  1rem;      /* 16px — default */
  --text-body-s:  0.875rem;  /* 14px */
  --text-caption: 0.75rem;   /* 12px */
  --text-overline: 0.6875rem;/* 11px — labels, overlines */

  /* Weights (Inter supports 100-900) */
  --fw-normal:   400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  /* Line heights (optical, not arithmetic) */
  --lh-tight:   1.15;  /* headings */
  --lh-snug:    1.25;  /* subheadings */
  --lh-normal:  1.5;   /* body */
  --lh-relaxed: 1.625; /* long-form body */

  /* Letter spacing */
  --ls-tight:   -0.025em;
  --ls-snug:    -0.015em;
  --ls-normal:  0;
  --ls-wide:    0.025em;
  --ls-wider:   0.05em;
  --ls-widest:  0.1em;
}

/* ====== 3. SPACING SCALE ====== */
:root {
  --space-0:   0;
  --space-px:  1px;
  --space-05:  0.125rem; /*  2px */
  --space-1:   0.25rem;  /*  4px */
  --space-2:   0.5rem;   /*  8px */
  --space-3:   0.75rem;  /* 12px */
  --space-4:   1rem;     /* 16px */
  --space-5:   1.25rem;  /* 20px */
  --space-6:   1.5rem;   /* 24px */
  --space-8:   2rem;     /* 32px */
  --space-10:  2.5rem;   /* 40px */
  --space-12:  3rem;     /* 48px */
  --space-16:  4rem;     /* 64px */
  --space-20:  5rem;     /* 80px */
  --space-24:  6rem;     /* 96px */
}

/* ====== 4. SHADOWS & ELEVATION ====== */
:root {
  --shadow-none:  none;
  --shadow-2xs:   0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-xs:    0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm:    0 1px 3px  rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:    0 4px 6px  -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg:    0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl:    0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-2xl:   0 25px 50px -12px rgba(0, 0, 0, 0.2);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.04);

  /* Colored shadows for interactive states */
  --shadow-focus:        0 0 0 3px rgba(59, 130, 246, 0.25);
  --shadow-focus-danger: 0 0 0 3px rgba(244, 63, 94, 0.25);
  --shadow-focus-success: 0 0 0 3px rgba(16, 185, 129, 0.25);
  --shadow-glow-primary: 0 0 12px rgba(59, 130, 246, 0.15);
}

/* Dark mode: shadows are more prominent */
html[data-theme="dark"] {
  --shadow-2xs:   0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-xs:    0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm:    0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md:    0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg:    0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
  --shadow-xl:    0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  --shadow-2xl:   0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.2);
}

/* ====== 5. BORDER RADIUS ====== */
:root {
  --radius-none: 0;
  --radius-2xs:  0.125rem; /*  2px */
  --radius-xs:   0.25rem;  /*  4px */
  --radius-sm:   0.375rem; /*  6px */
  --radius-md:   0.5rem;   /*  8px */
  --radius-lg:   0.75rem;  /* 12px */
  --radius-xl:   1rem;     /* 16px */
  --radius-2xl:  1.25rem;  /* 20px */
  --radius-3xl:  1.5rem;   /* 24px */
  --radius-full: 9999px;

  /* Inherited radii (child = parent × 0.5 when sensible) */
  --radius-inherit: inherit;
}

/* ====== 6. MOTION / TRANSITIONS ====== */
:root {
  /* Easing curves */
  --ease-default:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in:       cubic-bezier(0.4, 0, 1, 1);
  --ease-out:      cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1); /* bouncy */
  --ease-snappy:   cubic-bezier(0.2, 0, 0, 1);        /* fast deceleration */
  --ease-emphatic: cubic-bezier(0.16, 1, 0.3, 1);     /* dramatic entrance */

  /* Durations */
  --duration-instant: 50ms;
  --duration-fast:    120ms;
  --duration-normal:  200ms;
  --duration-moderate: 300ms;
  --duration-slow:    400ms;
  --duration-slower:  600ms;

  /* Presets (for most common use) */
  --transition-colors: color var(--duration-fast) var(--ease-default),
                       background-color var(--duration-fast) var(--ease-default),
                       border-color var(--duration-fast) var(--ease-default);
  --transition-transform: transform var(--duration-normal) var(--ease-out);
  --transition-shadow: box-shadow var(--duration-normal) var(--ease-default);
  --transition-all: all var(--duration-normal) var(--ease-default);
}

/* ====== 7. Z-INDEX SCALE ====== */
:root {
  --z-behind:   -1;
  --z-base:     0;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-popover:  450;
  --z-toast:    500;
  --z-tooltip:  600;
  --z-max:      9999;
}

/* ====== 8. RESPONSIVE BREAKPOINTS (for JS/CSS reference) ====== */
:root {
  --bp-xs:  480px;
  --bp-sm:  640px;
  --bp-md:  768px;
  --bp-lg:  1024px;
  --bp-xl:  1280px;
  --bp-2xl: 1536px;

  /* Layout tokens */
  --layout-max:    1280px;
  --layout-gutter: 1.25rem;
  --header-h:      3.25rem;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -moz-tab-size: 4;
  tab-size: 4;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-body-m);
  font-weight: var(--fw-normal);
  line-height: var(--lh-normal);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Improved media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* ====== 9.1 Compatibility Aliases ====== */
:root {
  --color-bg:              var(--bg);
  --color-fg:              var(--text);
  --color-muted:           var(--text-muted);
  --color-border:          var(--border);
  --color-bg-alt:          var(--surface-alt);
  --color-surface:         var(--surface);
  --color-primary:         var(--primary);
  --color-primary-hover:   var(--primary-hover);
  --color-primary-rgb:     var(--primary-rgb);
  --color-danger:          var(--danger);
  --color-danger-rgb:      var(--danger-rgb);
  --color-success:         var(--success);
  --color-success-rgb:     var(--success-rgb);
  --color-info:            var(--info);
  --color-info-rgb:        var(--info-rgb);
  --color-warning:         var(--warning);
  --color-warning-rgb:     var(--warning-rgb);
  --color-on-primary:      var(--text-on-primary);
  --color-primary-active:  var(--primary-active);
  --radius:                var(--radius-xs);
  --radius-base:           var(--radius-sm);
  --focus-ring:            var(--shadow-focus);
  --focus-outline:         2px solid var(--primary);
}

html[data-theme="dark"] {
  --color-bg:           var(--bg);
  --color-fg:           var(--text);
  --color-muted:        var(--text-muted);
  --color-border:       var(--border);
  --color-bg-alt:       var(--surface-alt);
  --color-surface:      var(--surface);
  --color-primary:      var(--primary);
  --color-primary-hover: var(--primary-hover);
  --color-primary-rgb:  var(--primary-rgb);
  --color-on-primary:   var(--text-on-primary);
  --color-primary-active: var(--primary-active);
  --shadow-focus:       0 0 0 3px rgba(96, 165, 250, 0.4);
  --focus-ring:         var(--shadow-focus);
  --focus-outline:      2px solid var(--primary);
}

/* ====== 10. TYPOGRAPHY CLASSES ====== */
h1, .h1 { font-size: var(--text-h1); font-weight: var(--fw-bold);    line-height: var(--lh-tight); letter-spacing: var(--ls-tight); }
h2, .h2 { font-size: var(--text-h2); font-weight: var(--fw-semibold); line-height: var(--lh-snug);  letter-spacing: var(--ls-tight); }
h3, .h3 { font-size: var(--text-h3); font-weight: var(--fw-semibold); line-height: var(--lh-normal); letter-spacing: var(--ls-snug); }
h4, .h4 { font-size: var(--text-h4); font-weight: var(--fw-semibold); line-height: var(--lh-normal); letter-spacing: var(--ls-snug); }
h5, .h5 { font-size: var(--text-h5); font-weight: var(--fw-semibold); line-height: var(--lh-normal); letter-spacing: var(--ls-normal); }
h6, .h6 { font-size: var(--text-h6); font-weight: var(--fw-semibold); line-height: var(--lh-normal); letter-spacing: var(--ls-normal); }

.text-body-l   { font-size: var(--text-body-l);  line-height: var(--lh-relaxed); }
.text-body-m   { font-size: var(--text-body-m);  line-height: var(--lh-normal); }
.text-body-s   { font-size: var(--text-body-s);  line-height: var(--lh-normal); }
.text-caption  { font-size: var(--text-caption); line-height: var(--lh-normal); }
.text-overline { font-size: var(--text-overline); font-weight: var(--fw-semibold); line-height: var(--lh-normal); text-transform: uppercase; letter-spacing: var(--ls-wider); }

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

/* Monospace */
.mono { font-family: var(--font-family-mono); font-size: 0.9em; }

/* KBD styling (keyboard shortcuts) */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5em;
  height: 1.5em;
  padding: 0 var(--space-1);
  font-family: var(--font-family-mono);
  font-size: var(--text-caption);
  font-weight: var(--fw-medium);
  color: var(--kbd-fg);
  background: var(--kbd-bg);
  border: 1px solid var(--kbd-border);
  border-radius: var(--radius-xs);
  line-height: 1;
  white-space: nowrap;
}

/* ====== 11. FOCUS STYLES (WCAG 2.1 AA+) ====== */
:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ====== 12. UTILITY CLASSES ====== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.flex      { display: flex; }
.inline-flex { display: inline-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-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-0   { gap: var(--space-0); }
.gap-05  { gap: var(--space-05); }
.gap-1   { gap: var(--space-1); }
.gap-2   { gap: var(--space-2); }
.gap-3   { gap: var(--space-3); }
.gap-4   { gap: var(--space-4); }
.gap-5   { gap: var(--space-5); }
.gap-6   { gap: var(--space-6); }
.gap-8   { gap: var(--space-8); }
.w-full  { width: 100%; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.flex-1  { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* Visually divide content */
.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: var(--space-4) 0;
}

/* Surface variants with semantic meaning */
.surface-raised {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.surface-overlay {
  background: var(--surface-overlay);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.surface-sunken {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-inner);
}
