/* ==========================================================================
   G2 LOGISTICS DESIGN SYSTEM
   Premium Vehicle Transport Portal - Desktop-First Architecture

   A bespoke design language for high-end automotive dealerships
   ========================================================================== */

/* ==========================================================================
   TYPOGRAPHY - Premium Font Stack
   Using Inter (clean geometric) + Source Serif 4 (refined serif accents)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&display=swap');

/* ==========================================================================
   CSS CUSTOM PROPERTIES - G2 Brand System
   ========================================================================== */
:root {
  /* ─────────────────────────────────────────────────────────────────────────
     PRIMARY BRAND COLORS - Orange Spectrum
     ───────────────────────────────────────────────────────────────────────── */
  --g2-orange-50: #FFF7ED;
  --g2-orange-100: #FFEDD5;
  --g2-orange-200: #FED7AA;
  --g2-orange-300: #FDBA74;
  --g2-orange-400: #FB923C;
  --g2-orange-500: #FF5733;  /* Primary brand orange */
  --g2-orange-600: #e64d2e;
  --g2-orange-700: #C2410C;
  --g2-orange-800: #9A3412;
  --g2-orange-900: #7C2D12;

  /* ─────────────────────────────────────────────────────────────────────────
     NEUTRAL COLORS - Warm Greys & Browns
     ───────────────────────────────────────────────────────────────────────── */
  --g2-stone-50: #FAFAF9;
  --g2-stone-100: #F5F5F4;
  --g2-stone-200: #E7E5E4;
  --g2-stone-300: #D6D3D1;
  --g2-stone-400: #A8A29E;
  --g2-stone-500: #78716C;
  --g2-stone-600: #57534E;
  --g2-stone-700: #44403C;
  --g2-stone-800: #292524;
  --g2-stone-900: #1C1917;
  --g2-stone-950: #0C0A09;

  /* ─────────────────────────────────────────────────────────────────────────
     DARK MODE COLORS - Premium Dark Theme
     ───────────────────────────────────────────────────────────────────────── */
  --g2-dark-bg: #0F0D0C;
  --g2-dark-surface: #1A1816;
  --g2-dark-elevated: #252220;
  --g2-dark-border: #3D3835;

  /* ─────────────────────────────────────────────────────────────────────────
     SEMANTIC COLORS
     ───────────────────────────────────────────────────────────────────────── */
  /* Success - Emerald tones */
  --g2-success-50: #ECFDF5;
  --g2-success-100: #D1FAE5;
  --g2-success-500: #10B981;
  --g2-success-600: #059669;
  --g2-success-700: #047857;

  /* Warning - Amber tones */
  --g2-warning-50: #FFFBEB;
  --g2-warning-100: #FEF3C7;
  --g2-warning-500: #F59E0B;
  --g2-warning-600: #D97706;
  --g2-warning-700: #B45309;

  /* Error - Rose tones */
  --g2-error-50: #FFF1F2;
  --g2-error-100: #FFE4E6;
  --g2-error-500: #F43F5E;
  --g2-error-600: #E11D48;
  --g2-error-700: #BE123C;

  /* Info - Sky tones */
  --g2-info-50: #F0F9FF;
  --g2-info-100: #E0F2FE;
  --g2-info-500: #0EA5E9;
  --g2-info-600: #0284C7;
  --g2-info-700: #0369A1;

  /* ─────────────────────────────────────────────────────────────────────────
     APPLIED THEME COLORS (Light Mode Default)
     ───────────────────────────────────────────────────────────────────────── */
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: var(--g2-stone-50);
  --color-bg-tertiary: var(--g2-stone-100);
  --color-surface: #FFFFFF;
  --color-surface-elevated: #FFFFFF;
  --color-surface-sunken: var(--g2-stone-100);

  --color-border-subtle: var(--g2-stone-200);
  --color-border-default: var(--g2-stone-300);
  --color-border-strong: var(--g2-stone-400);

  --color-text-primary: var(--g2-stone-900);
  --color-text-secondary: var(--g2-stone-600);
  --color-text-tertiary: var(--g2-stone-500);
  --color-text-inverse: #FFFFFF;

  --color-brand-primary: var(--g2-orange-500);
  --color-brand-hover: var(--g2-orange-600);
  --color-brand-active: var(--g2-orange-700);
  --color-brand-subtle: var(--g2-orange-50);
  --color-brand-muted: var(--g2-orange-100);

  /* ─────────────────────────────────────────────────────────────────────────
     TYPOGRAPHY SCALE - Desktop-First (Generous Sizing)
     ───────────────────────────────────────────────────────────────────────── */
  --font-family-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family-serif: 'Source Serif 4', Georgia, serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;

  /* Desktop-first type scale */
  --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 */
  --text-7xl: 4.5rem;      /* 72px */

  /* Line heights */
  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --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;

  /* Font weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  --font-black: 900;

  /* ─────────────────────────────────────────────────────────────────────────
     SPACING SYSTEM - 8px Grid
     ───────────────────────────────────────────────────────────────────────── */
  --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 */

  /* ─────────────────────────────────────────────────────────────────────────
     LAYOUT - Desktop-First Container Widths
     ───────────────────────────────────────────────────────────────────────── */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
  --container-max: 1800px;

  --gutter-desktop: 48px;
  --gutter-tablet: 32px;
  --gutter-mobile: 20px;

  /* ─────────────────────────────────────────────────────────────────────────
     BORDER RADIUS - Premium Rounded Corners
     ───────────────────────────────────────────────────────────────────────── */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* ─────────────────────────────────────────────────────────────────────────
     SHADOWS - Layered Depth System
     ───────────────────────────────────────────────────────────────────────── */
  --shadow-xs: 0 1px 2px 0 rgb(28 25 23 / 0.03);
  --shadow-sm: 0 1px 3px 0 rgb(28 25 23 / 0.06), 0 1px 2px -1px rgb(28 25 23 / 0.06);
  --shadow-md: 0 4px 6px -1px rgb(28 25 23 / 0.07), 0 2px 4px -2px rgb(28 25 23 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(28 25 23 / 0.08), 0 4px 6px -4px rgb(28 25 23 / 0.08);
  --shadow-xl: 0 20px 25px -5px rgb(28 25 23 / 0.08), 0 8px 10px -6px rgb(28 25 23 / 0.08);
  --shadow-2xl: 0 25px 50px -12px rgb(28 25 23 / 0.15);
  --shadow-inner: inset 0 2px 4px 0 rgb(28 25 23 / 0.04);

  /* Orange glow for brand elements */
  --shadow-brand: 0 4px 14px 0 rgb(249 115 22 / 0.25);
  --shadow-brand-lg: 0 8px 28px 0 rgb(249 115 22 / 0.3);

  /* ─────────────────────────────────────────────────────────────────────────
     TRANSITIONS - Smooth Micro-interactions
     ───────────────────────────────────────────────────────────────────────── */
  --duration-instant: 50ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;
  --duration-slower: 500ms;

  --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-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  --transition-fast: all var(--duration-fast) var(--ease-default);
  --transition-normal: all var(--duration-normal) var(--ease-default);
  --transition-slow: all var(--duration-slow) var(--ease-default);

  /* ─────────────────────────────────────────────────────────────────────────
     Z-INDEX SCALE
     ───────────────────────────────────────────────────────────────────────── */
  --z-below: -1;
  --z-base: 0;
  --z-elevated: 10;
  --z-sticky: 100;
  --z-fixed: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-popover: 500;
  --z-tooltip: 600;
  --z-toast: 700;
  --z-max: 9999;

  /* ─────────────────────────────────────────────────────────────────────────
     FOCUS RING - Accessibility
     ───────────────────────────────────────────────────────────────────────── */
  --focus-ring: 0 0 0 3px rgb(249 115 22 / 0.2);
  --focus-ring-offset: 0 0 0 2px var(--color-bg-primary), 0 0 0 4px var(--g2-orange-500);
}

/* ==========================================================================
   GLOBAL RESET & BASE STYLES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  font-family: var(--font-family-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

/* ==========================================================================
   TYPOGRAPHY COMPONENTS
   ========================================================================== */

/* Display Headlines - For hero sections */
.g2-display-xl {
  font-family: var(--font-family-display);
  font-size: var(--text-6xl);
  font-weight: var(--font-black);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-tighter);
  color: var(--color-text-primary);
}

.g2-display-lg {
  font-family: var(--font-family-display);
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tighter);
  color: var(--color-text-primary);
}

.g2-display-md {
  font-family: var(--font-family-display);
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

/* Headings */
.g2-heading-xl {
  font-family: var(--font-family-display);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

.g2-heading-lg {
  font-family: var(--font-family-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}

.g2-heading-md {
  font-family: var(--font-family-display);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}

.g2-heading-sm {
  font-family: var(--font-family-display);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}

/* Body Text */
.g2-body-lg {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

.g2-body-md {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

.g2-body-sm {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
}

/* Labels & Captions */
.g2-label {
  font-family: var(--font-family-display);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.g2-caption {
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--color-text-tertiary);
}

/* Brand Accent Text */
.g2-text-brand {
  color: var(--color-brand-primary);
}

.g2-text-gradient {
  background: linear-gradient(135deg, var(--g2-orange-500) 0%, var(--g2-orange-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================================
   LINKS
   ========================================================================== */
a {
  color: var(--color-brand-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-brand-hover);
}

a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   BUTTONS - Premium Component System
   ========================================================================== */
.g2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  min-height: 48px;
  font-family: var(--font-family-display);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-wide);
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-normal);
  white-space: nowrap;
}

.g2-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-offset);
}

.g2-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary Button - Orange Brand */
.g2-btn-primary {
  background: linear-gradient(135deg, var(--g2-orange-500) 0%, var(--g2-orange-600) 100%);
  color: white;
  border-color: var(--g2-orange-500);
  box-shadow: var(--shadow-md), var(--shadow-brand);
}

.g2-btn-primary:hover {
  background: linear-gradient(135deg, var(--g2-orange-600) 0%, var(--g2-orange-700) 100%);
  border-color: var(--g2-orange-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-brand-lg);
}

.g2-btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Secondary Button - Dark Stone */
.g2-btn-secondary {
  background: var(--g2-stone-900);
  color: white;
  border-color: var(--g2-stone-800);
  box-shadow: var(--shadow-md);
}

.g2-btn-secondary:hover {
  background: var(--g2-stone-800);
  border-color: var(--g2-stone-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.g2-btn-secondary:active {
  transform: translateY(0);
}

/* Outline Button */
.g2-btn-outline {
  background: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border-default);
}

.g2-btn-outline:hover {
  background: var(--color-bg-tertiary);
  border-color: var(--color-border-strong);
}

/* Ghost Button */
.g2-btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: transparent;
}

.g2-btn-ghost:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

/* Button Sizes */
.g2-btn-sm {
  padding: var(--space-2) var(--space-4);
  min-height: 36px;
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

.g2-btn-lg {
  padding: var(--space-4) var(--space-8);
  min-height: 56px;
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

/* Icon Buttons */
.g2-btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-lg);
}

.g2-btn-icon.g2-btn-sm {
  width: 36px;
  height: 36px;
}

.g2-btn-icon.g2-btn-lg {
  width: 56px;
  height: 56px;
}

/* ==========================================================================
   FORM INPUTS - Premium Form Elements
   ========================================================================== */
.g2-input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.g2-input-label {
  font-family: var(--font-family-display);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-primary);
}

.g2-input-label.required::after {
  content: ' *';
  color: var(--g2-error-500);
}

.g2-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  min-height: 52px;
  font-family: var(--font-family-body);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--color-surface);
  border: 2px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
}

.g2-input::placeholder {
  color: var(--color-text-tertiary);
}

.g2-input:hover {
  border-color: var(--color-border-default);
}

.g2-input:focus {
  outline: none;
  border-color: var(--color-brand-primary);
  box-shadow: var(--focus-ring);
}

.g2-input:disabled {
  background: var(--color-bg-tertiary);
  color: var(--color-text-tertiary);
  cursor: not-allowed;
}

/* Input States */
.g2-input.error {
  border-color: var(--g2-error-500);
}

.g2-input.error:focus {
  box-shadow: 0 0 0 3px rgb(244 63 94 / 0.2);
}

.g2-input.success {
  border-color: var(--g2-success-500);
}

/* Select Dropdown */
.g2-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2378716C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-12);
  cursor: pointer;
}

/* Textarea */
.g2-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: var(--leading-relaxed);
}

/* Input Help Text */
.g2-input-help {
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}

.g2-input-error {
  font-size: var(--text-sm);
  color: var(--g2-error-500);
}

/* Checkbox */
.g2-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--color-border-default);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.g2-checkbox:hover {
  border-color: var(--color-brand-primary);
}

.g2-checkbox:checked {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
}

.g2-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.g2-checkbox:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ==========================================================================
   CARDS - Premium Card Components
   ========================================================================== */
.g2-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition-normal);
}

.g2-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-default);
}

.g2-card-elevated {
  box-shadow: var(--shadow-lg);
  border: none;
}

.g2-card-elevated:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.g2-card-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--color-border-subtle);
}

.g2-card-body {
  padding: var(--space-6);
}

.g2-card-footer {
  padding: var(--space-4) var(--space-6);
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border-subtle);
}

/* ==========================================================================
   BADGES & STATUS INDICATORS
   ========================================================================== */
.g2-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1-5) var(--space-3);
  font-family: var(--font-family-display);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  line-height: var(--leading-none);
  border-radius: var(--radius-full);
}

.g2-badge-brand {
  background: var(--color-brand-muted);
  color: var(--g2-orange-700);
}

.g2-badge-success {
  background: var(--g2-success-100);
  color: var(--g2-success-700);
}

.g2-badge-warning {
  background: var(--g2-warning-100);
  color: var(--g2-warning-700);
}

.g2-badge-error {
  background: var(--g2-error-100);
  color: var(--g2-error-700);
}

.g2-badge-info {
  background: var(--g2-info-100);
  color: var(--g2-info-700);
}

.g2-badge-neutral {
  background: var(--g2-stone-200);
  color: var(--g2-stone-700);
}

/* Status Dot */
.g2-status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: currentColor;
}

.g2-status-dot.pulse {
  animation: g2-pulse 2s ease-in-out infinite;
}

@keyframes g2-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

/* ==========================================================================
   AVATAR
   ========================================================================== */
.g2-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--g2-orange-500) 0%, var(--g2-orange-600) 100%);
  color: white;
  font-family: var(--font-family-display);
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
  text-transform: uppercase;
}

.g2-avatar-sm {
  width: 32px;
  height: 32px;
  font-size: var(--text-sm);
}

.g2-avatar-lg {
  width: 64px;
  height: 64px;
  font-size: var(--text-xl);
}

.g2-avatar-xl {
  width: 80px;
  height: 80px;
  font-size: var(--text-2xl);
}

/* ==========================================================================
   TABLES - Premium Data Display
   ========================================================================== */
.g2-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.g2-table th {
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-family-display);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  text-align: left;
  color: var(--color-text-tertiary);
  background: var(--color-bg-tertiary);
  border-bottom: 2px solid var(--color-border-subtle);
}

.g2-table th:first-child {
  border-radius: var(--radius-lg) 0 0 0;
}

.g2-table th:last-child {
  border-radius: 0 var(--radius-lg) 0 0;
}

.g2-table td {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-subtle);
  transition: var(--transition-fast);
}

.g2-table tbody tr:hover td {
  background: var(--color-bg-secondary);
}

.g2-table tbody tr:last-child td {
  border-bottom: none;
}

.g2-table tbody tr:last-child td:first-child {
  border-radius: 0 0 0 var(--radius-lg);
}

.g2-table tbody tr:last-child td:last-child {
  border-radius: 0 0 var(--radius-lg) 0;
}

/* ==========================================================================
   TABS
   ========================================================================== */
.g2-tabs {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-xl);
}

.g2-tab {
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-family-display);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-fast);
}

.g2-tab:hover {
  color: var(--color-text-primary);
  background: var(--color-surface);
}

.g2-tab.active {
  color: var(--color-brand-primary);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.g2-tab-badge {
  margin-left: var(--space-2);
  padding: var(--space-0-5) var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  background: var(--color-brand-muted);
  color: var(--g2-orange-700);
  border-radius: var(--radius-full);
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */
.g2-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-border-subtle);
  border-top-color: var(--color-brand-primary);
  border-radius: var(--radius-full);
  animation: g2-spin 0.8s linear infinite;
}

.g2-spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

@keyframes g2-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Skeleton Loading */
.g2-skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-tertiary) 0%,
    var(--g2-stone-200) 50%,
    var(--color-bg-tertiary) 100%
  );
  background-size: 200% 100%;
  animation: g2-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes g2-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==========================================================================
   CONTAINER & LAYOUT UTILITIES
   ========================================================================== */
.g2-container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter-desktop);
}

.g2-container-lg {
  max-width: var(--container-xl);
}

.g2-container-md {
  max-width: var(--container-lg);
}

.g2-container-sm {
  max-width: var(--container-md);
}

/* Grid System */
.g2-grid {
  display: grid;
  gap: var(--space-6);
}

.g2-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.g2-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.g2-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.g2-grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Flex Utilities */
.g2-flex {
  display: flex;
}

.g2-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.g2-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.g2-flex-col {
  flex-direction: column;
}

.g2-gap-1 { gap: var(--space-1); }
.g2-gap-2 { gap: var(--space-2); }
.g2-gap-3 { gap: var(--space-3); }
.g2-gap-4 { gap: var(--space-4); }
.g2-gap-5 { gap: var(--space-5); }
.g2-gap-6 { gap: var(--space-6); }
.g2-gap-8 { gap: var(--space-8); }

/* ==========================================================================
   ANIMATIONS & TRANSITIONS
   ========================================================================== */
@keyframes g2-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


/* ==========================================================================
   RESPONSIVE BREAKPOINTS - Desktop-First (Max-Width)
   ========================================================================== */

/* Large Desktop: Below 1536px */
@media (max-width: 1536px) {
  .g2-container {
    max-width: var(--container-xl);
  }
}

/* Desktop: Below 1280px */
@media (max-width: 1280px) {
  .g2-container {
    max-width: var(--container-lg);
    padding: 0 var(--gutter-tablet);
  }

  .g2-grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet: Below 1024px */
@media (max-width: 1024px) {
  :root {
    --text-5xl: 2.5rem;
    --text-6xl: 3rem;
    --text-7xl: 3.5rem;
  }

  .g2-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .g2-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small Tablet: Below 768px */
@media (max-width: 768px) {
  :root {
    --text-4xl: 1.875rem;
    --text-5xl: 2.25rem;
    --text-6xl: 2.5rem;
  }

  .g2-container {
    padding: 0 var(--gutter-mobile);
  }

  .g2-grid-2,
  .g2-grid-3,
  .g2-grid-4 {
    grid-template-columns: 1fr;
  }

  .g2-btn {
    width: 100%;
  }

  .g2-input {
    font-size: 16px; /* Prevent iOS zoom */
  }
}

/* Mobile: Below 640px */
@media (max-width: 640px) {
  :root {
    --text-3xl: 1.5rem;
    --text-4xl: 1.75rem;
    --text-5xl: 2rem;
  }

  .g2-card-header,
  .g2-card-body {
    padding: var(--space-4);
  }
}

/* Small Mobile: Below 480px */
@media (max-width: 480px) {
  .g2-container {
    padding: 0 var(--space-4);
  }

  .g2-btn-lg {
    padding: var(--space-3) var(--space-6);
    min-height: 48px;
  }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.g2-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.g2-hidden {
  display: none !important;
}

.g2-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Spacing Utilities */
.g2-mt-4 { margin-top: var(--space-4); }
.g2-mt-6 { margin-top: var(--space-6); }
.g2-mt-8 { margin-top: var(--space-8); }
.g2-mb-4 { margin-bottom: var(--space-4); }
.g2-mb-6 { margin-bottom: var(--space-6); }
.g2-mb-8 { margin-bottom: var(--space-8); }
.g2-p-4 { padding: var(--space-4); }
.g2-p-6 { padding: var(--space-6); }
.g2-p-8 { padding: var(--space-8); }
