/**
 * ExpressWeb Design System
 * Premium CSS Variables & Design Tokens
 *
 * Apple/Stripe/Linear inspired design system
 * Version: 1.0.0
 */

/* ============================================
   1. COLOR PALETTE
   ============================================ */
:root {
  /* Primary Colors - Mint/Teal (meglévő színek megtartása) */
  --primary: #A9D9D4;
  --primary-hover: #80bfbf;
  --primary-dark: #5ba3a3;
  --dark: #0C0D0A;

  /* Extended Primary Palette */
  --color-primary-50: #F0FAFA;
  --color-primary-100: #D4F1EF;
  --color-primary-200: #A9D9D4;
  --color-primary-300: #80bfbf;
  --color-primary-400: #5ba3a3;
  --color-primary-500: #458888;
  --color-primary-600: #356969;
  --color-primary-700: #264D4D;
  --color-primary-800: #1A3333;
  --color-primary-900: #0C0D0A;

  /* Neutral Colors (Slate) */
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;
  --neutral-950: #020617;

  /* Semantic Colors */
  --color-success: #10B981;
  --color-success-light: #D1FAE5;
  --color-success-dark: #059669;

  --color-warning: #F59E0B;
  --color-warning-light: #FEF3C7;
  --color-warning-dark: #D97706;

  --color-error: #EF4444;
  --color-error-light: #FEE2E2;
  --color-error-dark: #DC2626;

  --color-info: #3B82F6;
  --color-info-light: #DBEAFE;
  --color-info-dark: #2563EB;

  /* Surface Colors */
  --surface-primary: #FFFFFF;
  --surface-secondary: #f8fafc;
  --surface-tertiary: #f1f5f9;
  --surface-elevated: #FFFFFF;
  --surface-overlay: rgba(0, 0, 0, 0.5);

  /* Border Colors */
  --border-default: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: #cbd5e1;
  --border-focus: var(--primary);

  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #FFFFFF;
  --text-link: var(--color-primary-500);
  --text-link-hover: var(--color-primary-600);
}

/* ============================================
   2. GLASSMORPHISM
   ============================================ */
:root {
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-bg-dark: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-border-colored: rgba(169, 217, 212, 0.3);
  --glass-shadow: 0 8px 32px rgba(12, 13, 10, 0.08);
  --glass-blur: 20px;
  --glass-blur-strong: 40px;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
:root {
  /* Font Families */
  --font-display: 'Katibeh', cursive;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */

  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.2;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
}

/* ============================================
   4. SPACING
   ============================================ */
:root {
  /* Spacing Scale (4px base) */
  --space-0: 0;
  --space-px: 1px;
  --space-0-5: 0.125rem;  /* 2px */
  --space-1: 0.25rem;     /* 4px */
  --space-1-5: 0.375rem;  /* 6px */
  --space-2: 0.5rem;      /* 8px */
  --space-2-5: 0.625rem;  /* 10px */
  --space-3: 0.75rem;     /* 12px */
  --space-3-5: 0.875rem;  /* 14px */
  --space-4: 1rem;        /* 16px */
  --space-5: 1.25rem;     /* 20px */
  --space-6: 1.5rem;      /* 24px */
  --space-7: 1.75rem;     /* 28px */
  --space-8: 2rem;        /* 32px */
  --space-9: 2.25rem;     /* 36px */
  --space-10: 2.5rem;     /* 40px */
  --space-11: 2.75rem;    /* 44px */
  --space-12: 3rem;       /* 48px */
  --space-14: 3.5rem;     /* 56px */
  --space-16: 4rem;       /* 64px */
  --space-20: 5rem;       /* 80px */
  --space-24: 6rem;       /* 96px */
  --space-28: 7rem;       /* 112px */
  --space-32: 8rem;       /* 128px */
  --space-36: 9rem;       /* 144px */
  --space-40: 10rem;      /* 160px */
}

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

/* ============================================
   6. SHADOWS
   ============================================ */
:root {
  /* Standard Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  --shadow-none: 0 0 #0000;

  /* Colored Shadows */
  --shadow-primary: 0 4px 14px 0 rgba(169, 217, 212, 0.35);
  --shadow-primary-lg: 0 10px 25px -3px rgba(169, 217, 212, 0.4);
  --shadow-success: 0 4px 14px 0 rgba(16, 185, 129, 0.35);
  --shadow-error: 0 4px 14px 0 rgba(239, 68, 68, 0.35);

  /* Focus Rings */
  --ring-offset: 2px;
  --ring-width: 3px;
  --ring-color: rgba(169, 217, 212, 0.5);
  --ring-primary: 0 0 0 var(--ring-offset) var(--surface-primary), 0 0 0 calc(var(--ring-offset) + var(--ring-width)) var(--ring-color);
}

/* ============================================
   7. TRANSITIONS & ANIMATIONS
   ============================================ */
:root {
  /* Durations */
  --duration-75: 75ms;
  --duration-100: 100ms;
  --duration-150: 150ms;
  --duration-200: 200ms;
  --duration-300: 300ms;
  --duration-500: 500ms;
  --duration-700: 700ms;
  --duration-1000: 1000ms;

  /* Timing Functions */
  --ease-linear: linear;
  --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.175, 0.885, 0.32, 1.275);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);

  /* Common Transitions */
  --transition-none: none;
  --transition-all: all var(--duration-200) var(--ease-in-out);
  --transition-colors: color var(--duration-150) var(--ease-in-out), background-color var(--duration-150) var(--ease-in-out), border-color var(--duration-150) var(--ease-in-out);
  --transition-opacity: opacity var(--duration-200) var(--ease-in-out);
  --transition-shadow: box-shadow var(--duration-200) var(--ease-in-out);
  --transition-transform: transform var(--duration-200) var(--ease-in-out);
}

/* ============================================
   8. Z-INDEX SCALE
   ============================================ */
:root {
  --z-deep: -999;
  --z-default: 1;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
  --z-top: 9999;
}

/* ============================================
   9. CONTAINER WIDTHS
   ============================================ */
:root {
  --container-xs: 20rem;    /* 320px */
  --container-sm: 24rem;    /* 384px */
  --container-md: 28rem;    /* 448px */
  --container-lg: 32rem;    /* 512px */
  --container-xl: 36rem;    /* 576px */
  --container-2xl: 42rem;   /* 672px */
  --container-3xl: 48rem;   /* 768px */
  --container-4xl: 56rem;   /* 896px */
  --container-5xl: 64rem;   /* 1024px */
  --container-6xl: 72rem;   /* 1152px */
  --container-7xl: 80rem;   /* 1280px */
  --container-full: 100%;
}

/* ============================================
   10. BREAKPOINTS (for reference)
   ============================================ */
:root {
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* ============================================
   11. COMPONENT-SPECIFIC TOKENS
   ============================================ */
:root {
  /* Buttons */
  --btn-font-weight: var(--font-medium);
  --btn-border-radius: var(--radius-lg);
  --btn-transition: var(--transition-all);

  --btn-xs-height: 1.75rem;
  --btn-xs-padding: 0 var(--space-2);
  --btn-xs-font-size: var(--text-xs);

  --btn-sm-height: 2rem;
  --btn-sm-padding: 0 var(--space-3);
  --btn-sm-font-size: var(--text-sm);

  --btn-md-height: 2.5rem;
  --btn-md-padding: 0 var(--space-4);
  --btn-md-font-size: var(--text-sm);

  --btn-lg-height: 3rem;
  --btn-lg-padding: 0 var(--space-6);
  --btn-lg-font-size: var(--text-base);

  --btn-xl-height: 3.5rem;
  --btn-xl-padding: 0 var(--space-8);
  --btn-xl-font-size: var(--text-lg);

  /* Inputs */
  --input-border-radius: var(--radius-lg);
  --input-border-color: var(--border-default);
  --input-focus-border-color: var(--primary);
  --input-focus-ring: var(--ring-primary);
  --input-placeholder-color: var(--text-muted);
  --input-disabled-bg: var(--neutral-100);

  --input-sm-height: 2rem;
  --input-sm-padding: var(--space-2) var(--space-3);
  --input-sm-font-size: var(--text-sm);

  --input-md-height: 2.5rem;
  --input-md-padding: var(--space-2-5) var(--space-4);
  --input-md-font-size: var(--text-base);

  --input-lg-height: 3rem;
  --input-lg-padding: var(--space-3) var(--space-4);
  --input-lg-font-size: var(--text-base);

  /* Cards */
  --card-border-radius: var(--radius-xl);
  --card-border-color: var(--border-light);
  --card-shadow: var(--shadow-sm);
  --card-shadow-hover: var(--shadow-lg);
  --card-padding: var(--space-6);
  --card-padding-sm: var(--space-4);
  --card-padding-lg: var(--space-8);

  /* Tables */
  --table-header-bg: var(--neutral-50);
  --table-header-font-weight: var(--font-semibold);
  --table-row-hover-bg: var(--neutral-50);
  --table-border-color: var(--border-light);
  --table-cell-padding: var(--space-4);

  /* Modals */
  --modal-border-radius: var(--radius-2xl);
  --modal-shadow: var(--shadow-2xl);
  --modal-backdrop-bg: rgba(0, 0, 0, 0.5);
  --modal-backdrop-blur: 4px;

  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-width-collapsed: 70px;
  --sidebar-bg: var(--surface-primary);
  --sidebar-border-color: var(--border-light);
  --sidebar-item-height: 2.75rem;
  --sidebar-item-padding: var(--space-3) var(--space-4);
  --sidebar-item-border-radius: var(--radius-lg);

  /* Header */
  --header-height: 64px;
  --header-height-mobile: 56px;
  --header-bg: var(--surface-primary);
  --header-border-color: var(--border-light);
  --header-shadow: var(--shadow-sm);
}

/* ============================================
   12. DARK MODE PREPARATION
   ============================================ */
@media (prefers-color-scheme: dark) {
  :root.auto-dark {
    --surface-primary: #0f172a;
    --surface-secondary: #1e293b;
    --surface-tertiary: #334155;
    --surface-elevated: #1e293b;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-muted: #64748b;

    --border-default: #334155;
    --border-light: #1e293b;
    --border-dark: #475569;

    --glass-bg: rgba(15, 23, 42, 0.8);
    --glass-border: rgba(51, 65, 85, 0.5);
  }
}

/* Manual Dark Mode Class */
.dark-mode {
  --surface-primary: #0f172a;
  --surface-secondary: #1e293b;
  --surface-tertiary: #334155;
  --surface-elevated: #1e293b;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-muted: #64748b;

  --border-default: #334155;
  --border-light: #1e293b;
  --border-dark: #475569;

  --glass-bg: rgba(15, 23, 42, 0.8);
  --glass-border: rgba(51, 65, 85, 0.5);

  --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}
