/**
 * Lora Panel - Global Design System
 * Based on premium fintech/crypto aesthetic
 * Dark navy | Cyan glow | Glassmorphism | Futuristic
 */

/* ============================================
   FONT LOADING OPTIMIZATION
   Both Inter and Vazirmatn are loaded via Google Fonts
   with &display=swap to ensure font-display: swap behavior.
   Preconnect hints (<link rel="preconnect">) are included
   in all HTML <head> sections for faster DNS/TLS setup.
   This prevents render-blocking (FOIT) — text is shown
   immediately in a fallback font while web fonts load.
   ============================================ */

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  /* ---- Accent Color Scales ---- */
  /* Cyan */
  --color-cyan: #06b6d4;
  --color-cyan-light: #22d3ee;
  --color-cyan-bright: #67e8f9;

  /* Blue */
  --color-blue: #3b82f6;
  --color-blue-light: #60a5fa;
  --color-blue-bright: #93c5fd;

  /* Indigo */
  --color-indigo: #6366f1;
  --color-indigo-light: #818cf8;
  --color-indigo-bright: #a5b4fc;

  /* Violet */
  --color-violet: #a855f7;
  --color-violet-light: #c084fc;
  --color-violet-bright: #d8b4fe;

  /* Emerald */
  --color-emerald: #10b981;
  --color-emerald-light: #34d399;
  --color-emerald-bright: #6ee7b7;

  /* ---- Semantic State Tokens ---- */
  /* Success */
  --color-success-bg: rgba(16, 185, 129, 0.1);
  --color-success-border: rgba(16, 185, 129, 0.2);
  --color-success-text: #34d399;

  /* Error */
  --color-error-bg: rgba(239, 68, 68, 0.1);
  --color-error-border: rgba(239, 68, 68, 0.2);
  --color-error-text: #f87171;

  /* Warning */
  --color-warning-bg: rgba(245, 158, 11, 0.1);
  --color-warning-border: rgba(245, 158, 11, 0.2);
  --color-warning-text: #fbbf24;

  /* Info */
  --color-info-bg: rgba(6, 182, 212, 0.1);
  --color-info-border: rgba(6, 182, 212, 0.2);
  --color-info-text: #22d3ee;

  /* ---- Gradient Presets ---- */
  --gradient-primary: linear-gradient(135deg, #06b6d4, #3b82f6, #a855f7);
  --gradient-card-highlight: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.4), transparent);
  --gradient-text: linear-gradient(135deg, #60a5fa, #a855f7);

  /* ---- Background Tokens ---- */
  --color-bg: #020617;                    /* luminance <5% */
  --color-bg-elevated: rgba(15, 23, 42, 0.6); /* luminance <12% */

  /* ---- Surface & Text Tokens ---- */
  --color-surface: rgba(30, 41, 59, 0.5);
  --color-surface-hover: rgba(30, 41, 59, 0.7);
  --color-surface-active: rgba(30, 41, 59, 0.8);
  --color-text: #f8fafc;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #8b9bb4;

  /* ---- Border Tokens ---- */
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.15);
  --border-glass-active: rgba(6, 182, 212, 0.5);

  /* ---- Spacing Scale (4px-based) ---- */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 6rem;     /* 96px */

  /* ---- Border Radius Tokens ---- */
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 20px;
  --border-radius-2xl: 24px;

  /* ---- Typography Scale ---- */
  /* Base */
  --font-size-base: 0.875rem;           /* 14px */
  --line-height-body: 1.5;
  --line-height-heading: 1.3;

  /* Headings */
  --font-size-h1: 1.75rem;              /* 28px */
  --font-size-h2: 1.5rem;               /* 24px */
  --font-size-h3: 1.25rem;              /* 20px */
  --font-size-h4: 1.125rem;             /* 18px */
  --font-size-h5: 1rem;                 /* 16px */
  --font-size-h6: 0.875rem;             /* 14px */

  /* Landing Page */
  --font-size-hero-desktop: 3rem;        /* 48px */
  --font-size-hero-mobile: 2.25rem;      /* 36px */
  --font-size-section-desktop: 2rem;     /* 32px */
  --font-size-section-mobile: 1.5rem;    /* 24px */

  /* Sidebar */
  --font-size-sidebar-item: 0.8125rem;   /* 13px */
  --font-size-sidebar-label: 0.6875rem;  /* 11px */

  /* Stat Cards */
  --font-size-stat-value: 1.25rem;       /* 20px */
  --font-size-stat-label: 0.75rem;       /* 12px */

  /* Buttons */
  --font-size-btn: 0.8125rem;           /* 13px */
  --font-size-btn-lg: 0.875rem;         /* 14px */

  /* Tables */
  --font-size-table-body: 0.8125rem;    /* 13px */
  --font-size-table-header: 0.6875rem;  /* 11px */

  /* ---- Shadows ---- */
  --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset, 0 0 80px rgba(6, 182, 212, 0.1) inset;
  --shadow-card-hover: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 0 100px rgba(6, 182, 212, 0.15) inset;
  --shadow-glow-cyan: 0 0 20px rgba(6, 182, 212, 0.3), 0 4px 15px rgba(6, 182, 212, 0.2);
  --shadow-glow-cyan-hover: 0 0 30px rgba(6, 182, 212, 0.5), 0 8px 25px rgba(6, 182, 212, 0.3);
  --shadow-input-focus: 0 0 0 3px rgba(6, 182, 212, 0.1), 0 0 20px rgba(6, 182, 212, 0.15);

  /* ---- Transitions ---- */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;

  /* ---- Animation Timing ---- */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-standard: 300ms;
  --duration-fast: 200ms;
}


/* ============================================
   BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg) !important;
  color: var(--color-text);
  font-family: 'Inter', 'Vazirmatn', sans-serif;
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 { font-size: var(--font-size-h1); line-height: var(--line-height-heading); }
h2 { font-size: var(--font-size-h2); line-height: var(--line-height-heading); }
h3 { font-size: var(--font-size-h3); line-height: var(--line-height-heading); }
h4 { font-size: var(--font-size-h4); line-height: var(--line-height-heading); }
h5 { font-size: var(--font-size-h5); line-height: var(--line-height-heading); }
h6 { font-size: var(--font-size-h6); line-height: var(--line-height-heading); }

/* ============================================
   GLASSMORPHISM COMPONENTS
   ============================================ */

/* Glass Card - Primary container */
.glass-card {
  background: var(--color-bg-elevated);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  border-radius: var(--border-radius-2xl);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-card-highlight);
}

.glass-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-glass-hover);
}

/* Glow Ring - Animated border */
.glow-ring {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.3) 0%, transparent 30%, transparent 70%, rgba(99, 102, 241, 0.2) 100%);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Glass Panel - Lighter variant */
.glass-panel {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  background: rgba(15, 23, 42, 0.7);
  border-color: var(--border-glass-hover);
}

/* ============================================
   PREMIUM INPUTS
   ============================================ */
.premium-input,
.dark input[type="text"].premium-input,
.dark input[type="email"].premium-input,
.dark input[type="password"].premium-input,
.dark input[type="number"].premium-input,
.dark textarea.premium-input,
.dark select.premium-input {
  background: var(--color-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-sm);
  color: var(--color-text);
  padding: 0.875rem 1rem;
  font-size: var(--font-size-base);
  transition: var(--transition-smooth);
  outline: none;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.premium-input::placeholder {
  color: var(--color-text-muted);
}

.premium-input:hover {
  border-color: var(--border-glass-hover);
  background: var(--color-surface-hover);
}

.premium-input:focus {
  outline: none;
  border-color: var(--border-glass-active);
  background: var(--color-surface-active);
  box-shadow: var(--shadow-input-focus);
}

.premium-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.premium-input:disabled:hover {
  border-color: var(--border-glass);
  background: var(--color-surface);
}

/* Input with icon */
.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper .input-icon {
  position: absolute;
  inset-inline-start: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
  z-index: 2;
}

.input-icon-wrapper .premium-input,
.input-icon-wrapper .dark input[type="text"].premium-input,
.input-icon-wrapper .dark input[type="email"].premium-input,
.input-icon-wrapper .dark input[type="password"].premium-input,
.input-icon-wrapper .dark input[type="number"].premium-input,
.dark .input-icon-wrapper input[type="text"].premium-input,
.dark .input-icon-wrapper input[type="email"].premium-input,
.dark .input-icon-wrapper input[type="password"].premium-input,
.dark .input-icon-wrapper input[type="number"].premium-input {
  padding-inline-start: 3.25rem;
}

/* Input with trailing action button (e.g. show/hide password) */
.input-icon-wrapper .premium-input.has-trailing-action,
.dark .input-icon-wrapper input[type="text"].premium-input.has-trailing-action,
.dark .input-icon-wrapper input[type="password"].premium-input.has-trailing-action {
  padding-inline-end: 3rem;
}

/* Select dropdown arrow */
select.premium-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8.825a.5.5 0 0 1-.354-.146l-4-4a.5.5 0 1 1 .708-.708L6 7.617l3.646-3.646a.5.5 0 1 1 .708.708l-4 4A.5.5 0 0 1 6 8.825z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-inline-end: 2.5rem;
}

[dir="rtl"] select.premium-input {
  background-position: left 1rem center;
}

/* ============================================
   PREMIUM BUTTONS
   ============================================ */
.premium-btn {
  background: var(--gradient-primary);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  position: relative;
  overflow: hidden;
  border: none;
  color: white;
  font-weight: 600;
  font-size: var(--font-size-btn);
  border-radius: var(--border-radius-sm);
  padding: 1rem 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-glow-cyan);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.premium-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.15) 50%, transparent 70%);
  animation: shine 3s ease-in-out infinite;
}

.premium-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-cyan-hover);
}

.premium-btn:active {
  transform: translateY(0);
}

.premium-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.premium-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.premium-btn > * {
  position: relative;
  z-index: 1;
}

/* Large button variant */
.premium-btn-lg {
  font-size: var(--font-size-btn-lg);
  padding: 1.125rem 2rem;
}

/* Secondary Button */
.premium-btn-secondary {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-glass);
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: var(--font-size-btn);
  border-radius: var(--border-radius-sm);
  padding: 0.875rem 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.premium-btn-secondary:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--border-glass-hover);
  color: var(--color-text);
}

.premium-btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.premium-btn-secondary:disabled:hover {
  background: rgba(30, 41, 59, 0.6);
  border-color: var(--border-glass);
  color: var(--color-text-secondary);
}

/* Danger Button */
.premium-btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  position: relative;
  overflow: hidden;
  border: none;
  color: white;
  font-weight: 600;
  font-size: var(--font-size-btn);
  border-radius: var(--border-radius-sm);
  padding: 0.875rem 1.5rem;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.premium-btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

.premium-btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.premium-btn-danger:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Success Button */
.premium-btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  position: relative;
  overflow: hidden;
  border: none;
  color: white;
  font-weight: 600;
  font-size: var(--font-size-btn);
  border-radius: var(--border-radius-sm);
  padding: 0.875rem 1.5rem;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.premium-btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
}

.premium-btn-success:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.premium-btn-success:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ============================================
   NAVIGATION & SIDEBAR
   ============================================ */
.premium-nav {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(32px) saturate(1.2);
  -webkit-backdrop-filter: blur(32px) saturate(1.2);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.premium-sidebar {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-inline-end: 1px solid var(--border-glass);
}

.premium-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-sm);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sidebar-item);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  text-decoration: none;
  border-inline-start: 2px solid transparent;
}

.premium-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  border-inline-start-color: rgba(255, 255, 255, 0.15);
}

.premium-sidebar-item.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
  color: var(--color-cyan-light);
  border-inline-start: 2px solid var(--color-cyan);
}

.premium-sidebar-item.active:hover {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.22) 0%, transparent 100%);
  color: var(--color-cyan-bright);
  border-inline-start-color: var(--color-cyan-light);
}

.premium-sidebar-label {
  font-size: var(--font-size-sidebar-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--border-glass);
  margin-top: var(--space-sm);
}

/* ============================================
   TABLES
   ============================================ */
.premium-table-container {
  overflow-y: auto;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-glass);
}

.premium-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}

.premium-table thead th {
  padding: 1rem 1.25rem;
  text-align: start;
  font-size: var(--font-size-table-header);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--border-glass);
  background: rgba(15, 23, 42, 0.4);
  position: sticky;
  top: 0;
  z-index: 1;
}

.premium-table tbody tr {
  transition: var(--transition-fast);
}

.premium-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.premium-table tbody td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-glass);
  color: var(--color-text-secondary);
  font-size: var(--font-size-table-body);
}

/* ============================================
   CARDS & STATS
   ============================================ */
.stat-card {
  background: var(--color-bg-elevated);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  padding: var(--space-lg);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-card-highlight);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-glass-hover);
}

.stat-value {
  font-size: var(--font-size-stat-value);
  font-weight: 700;
  color: var(--color-text);
  font-family: 'Inter', monospace;
  line-height: var(--line-height-heading);
}

.stat-label {
  font-size: var(--font-size-stat-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  line-height: var(--line-height-body);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-sm);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cyan-light);
}

/* ============================================
   BADGES & TAGS
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: var(--space-md);
  border-radius: var(--border-radius-sm);
  border: 1px solid;
  font-size: var(--font-size-base);
}

.alert-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
}

.alert-text {
  flex: 1;
}

.alert-success {
  background: var(--color-success-bg);
  border-color: var(--color-success-border);
  color: var(--color-success-text);
}

.alert-error {
  background: var(--color-error-bg);
  border-color: var(--color-error-border);
  color: var(--color-error-text);
}

.alert-warning {
  background: var(--color-warning-bg);
  border-color: var(--color-warning-border);
  color: var(--color-warning-text);
}

.alert-info {
  background: var(--color-info-bg);
  border-color: var(--color-info-border);
  color: var(--color-info-text);
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-container {
  background: var(--color-bg-elevated);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-2xl);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 520px;
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.modal-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
}

/* Legacy alias for backward compatibility */
.premium-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.premium-modal {
  background: var(--color-bg-elevated);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-2xl);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 520px;
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.premium-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-cyan), transparent);
}

/* ============================================
   LINKS
   ============================================ */
.premium-link {
  position: relative;
  color: var(--color-cyan-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.premium-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-cyan-light), var(--color-blue));
  transition: width 0.3s ease;
}

.premium-link:hover::after {
  width: 100%;
}

.premium-link:hover {
  color: var(--color-cyan-bright);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes gradientShift {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(6, 182, 212, 0.3); }
  50% { box-shadow: 0 0 40px rgba(6, 182, 212, 0.5); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.animate-logo-pulse {
  animation: logoPulse 3s ease-in-out infinite;
}

/* ============================================
   CATEGORY ICON TAB TRANSITIONS
   ============================================ */
.category-transition {
  transition: opacity 250ms var(--ease-default), transform 250ms var(--ease-default);
}

.category-icon-tab {
  transition: all 300ms var(--ease-default);
}

.category-icon-tab.active {
  border-color: rgba(6, 182, 212, 0.5);
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
  transform: scale(1.02);
}

.category-icon-tab.active .category-icon-label {
  color: var(--color-cyan-light);
}

.category-icon-tab.active svg {
  color: var(--color-cyan-light);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-text-cyan {
  text-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

.divider-gradient {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* ============================================
   RTL & MULTILINGUAL SUPPORT
   ============================================ */

/* RTL sidebar active indicator mirroring */
[dir="rtl"] .premium-sidebar-item.active {
  border-inline-start: 2px solid var(--color-cyan);
  background: linear-gradient(270deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
}

[dir="rtl"] .premium-sidebar-item.active:hover {
  background: linear-gradient(270deg, rgba(59, 130, 246, 0.22) 0%, transparent 100%);
}

/* Directional icon mirroring in RTL (arrows, chevrons, etc.) */
[dir="rtl"] .icon-directional {
  transform: scaleX(-1);
}

/* RTL Logical Property Utilities */
.mis-auto { margin-inline-start: auto; }
.mie-auto { margin-inline-end: auto; }

.mis-xs { margin-inline-start: var(--space-xs); }
.mis-sm { margin-inline-start: var(--space-sm); }
.mis-md { margin-inline-start: var(--space-md); }
.mis-lg { margin-inline-start: var(--space-lg); }
.mis-xl { margin-inline-start: var(--space-xl); }

.mie-xs { margin-inline-end: var(--space-xs); }
.mie-sm { margin-inline-end: var(--space-sm); }
.mie-md { margin-inline-end: var(--space-md); }
.mie-lg { margin-inline-end: var(--space-lg); }
.mie-xl { margin-inline-end: var(--space-xl); }

.pis-xs { padding-inline-start: var(--space-xs); }
.pis-sm { padding-inline-start: var(--space-sm); }
.pis-md { padding-inline-start: var(--space-md); }
.pis-lg { padding-inline-start: var(--space-lg); }
.pis-xl { padding-inline-start: var(--space-xl); }

.pie-xs { padding-inline-end: var(--space-xs); }
.pie-sm { padding-inline-end: var(--space-sm); }
.pie-md { padding-inline-end: var(--space-md); }
.pie-lg { padding-inline-end: var(--space-lg); }
.pie-xl { padding-inline-end: var(--space-xl); }

/* Logical inset utilities */
.inset-is-0 { inset-inline-start: 0; }
.inset-ie-0 { inset-inline-end: 0; }

/* Logical border utilities */
.border-is { border-inline-start: 1px solid var(--border-glass); }
.border-ie { border-inline-end: 1px solid var(--border-glass); }

/* Logical text alignment */
.text-start { text-align: start; }
.text-end { text-align: end; }

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.5rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.lang-switcher:hover {
  border-color: #334155;
  background: rgba(30, 41, 59, 0.8);
}

.lang-switcher .lang-btn {
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  color: var(--color-text-muted);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 0.75rem;
  font-weight: 500;
}

.lang-switcher .lang-btn:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.08);
}

.lang-switcher .lang-btn.active {
  color: var(--color-cyan-light);
  background: rgba(6, 182, 212, 0.2);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.2);
}

/* ============================================
   RTL FONT FAMILIES
   ============================================ */

/* Default (LTR): Inter primary, Vazirmatn fallback */
html, body {
  font-family: 'Inter', 'Vazirmatn', sans-serif;
}

/* RTL: Vazirmatn primary, Inter fallback */
[dir="rtl"],
[dir="rtl"] body {
  font-family: 'Vazirmatn', 'Inter', sans-serif;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-cyan);
  color: var(--color-bg);
  padding: 0.75rem 1.25rem;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-weight: 600;
  font-size: var(--font-size-base);
  border-radius: 0 0 var(--border-radius-sm) 0;
  text-decoration: none;
  white-space: nowrap;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-cyan-bright);
  outline-offset: 2px;
}

/* Focus-visible outlines for keyboard navigation on all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible,
[role="button"]:focus-visible,
[role="link"]:focus-visible,
[role="tab"]:focus-visible,
[role="menuitem"]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 2px;
}

/* Generic fallback for any focused element not covered above */
:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: 2px;
}

/* Minimum touch target sizes (44×44px) for interactive elements */
a,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
input[type="checkbox"],
input[type="radio"],
select,
[role="button"] {
  min-height: 44px;
  min-width: 44px;
}

/* Ensure text inputs and textareas meet touch target height */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
textarea {
  min-height: 44px;
}

/* Keep the native login checkbox compact while its associated label remains an easy touch target. */
#login-remember {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  min-height: 1rem;
  flex: 0 0 1rem;
}

label[for="login-remember"] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   BACKDROP-FILTER FALLBACK
   ============================================ */
@supports not (backdrop-filter: blur(1px)) {
  .glass-card {
    background: rgba(15, 23, 42, 0.85);
  }

  .glass-panel {
    background: rgba(15, 23, 42, 0.8);
  }

  .glass-panel:hover {
    background: rgba(15, 23, 42, 0.85);
  }

  .premium-nav {
    background: rgba(15, 23, 42, 0.92);
  }

  .premium-sidebar {
    background: rgba(15, 23, 42, 0.9);
  }

  .modal-overlay {
    background: rgba(0, 0, 0, 0.8);
  }

  .modal-container {
    background: rgba(15, 23, 42, 0.95);
  }

  .premium-modal-overlay {
    background: rgba(0, 0, 0, 0.8);
  }

  .premium-modal {
    background: rgba(15, 23, 42, 0.95);
  }
}

/* ============================================
   NEW ORDER PAGE - COMPONENT STYLES
   ============================================ */

/* --- Category Navigation Bar --- */
.new-order-category-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
}

.new-order-category-bar .category-icons-scroll {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: var(--space-sm);
  flex: 1;
}

.new-order-category-bar .category-icons-scroll::-webkit-scrollbar {
  display: none;
}

/* --- Category Icon Tab --- */
.new-order-category-bar .category-icon-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  min-width: 96px;
  min-height: 96px;
  padding: var(--space-sm);
  gap: var(--space-xs);
  background: var(--color-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all 300ms var(--ease-default);
  color: var(--color-text-secondary);
  text-decoration: none;
}

.new-order-category-bar .category-icon-tab:hover {
  border-color: var(--border-glass-hover);
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.new-order-category-bar .category-icon-tab.active {
  border-color: rgba(6, 182, 212, 0.5);
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
  transform: scale(1.05);
  color: var(--color-cyan-light);
}

.new-order-category-bar .category-icon-tab.active svg,
.new-order-category-bar .category-icon-tab.active .category-icon-label {
  color: var(--color-cyan-light);
}

.new-order-category-bar .category-icon-tab svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.new-order-category-bar .category-icon-label {
  font-size: 0.6875rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  color: var(--color-text-muted);
}

/* --- Scroll Buttons --- */
.scroll-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: var(--color-bg-elevated);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.scroll-btn:hover {
  border-color: var(--border-glass-hover);
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.scroll-btn.visible {
  display: flex;
}

.scroll-btn-start {
  inset-inline-start: 0;
}

.scroll-btn-end {
  inset-inline-end: 0;
}

/* --- Step Guide --- */
.step-guide {
  position: relative;
  padding: var(--space-md) var(--space-lg);
  min-height: 48px;
  display: flex;
  align-items: center;
}

.step-guide .step-guide-close {
  position: absolute;
  top: var(--space-sm);
  inset-inline-end: var(--space-sm);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
}

.step-guide .step-guide-close:hover {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.08);
}

.step-guide-steps {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  justify-content: center;
}

/* --- Step Item --- */
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  position: relative;
}

.step-circle {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 2px solid var(--border-glass);
  background: var(--color-surface);
  color: var(--color-text-muted);
  transition: var(--transition-smooth);
}

.step-item.active .step-circle {
  border-color: var(--color-cyan);
  background: rgba(6, 182, 212, 0.15);
  color: var(--color-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}

.step-item.completed .step-circle {
  border-color: var(--color-success-text);
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success-text);
}

.step-item.completed .step-circle::after {
  content: '✓';
  font-size: 0.875rem;
  font-weight: 700;
}

.step-item.completed .step-circle .step-number {
  display: none;
}

/* --- Step Connector --- */
.step-connector {
  flex: 1;
  height: 2px;
  min-width: 24px;
  background: var(--border-glass);
  margin: 0 var(--space-sm);
  align-self: center;
  margin-bottom: var(--space-lg);
  transition: var(--transition-smooth);
}

.step-item.completed + .step-connector,
.step-connector.completed {
  background: var(--color-success-text);
}

/* --- Step Label --- */
.step-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-align: center;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.step-item.active .step-label {
  color: var(--color-cyan);
}

.step-item.completed .step-label {
  color: var(--color-success-text);
}

/* --- Service Details Panel --- */
.service-details-panel {
  padding: var(--space-lg);
  opacity: 1;
  transition: opacity 200ms var(--ease-default);
}

.service-details-panel.fade-out {
  opacity: 0;
}

.service-details-panel.hidden {
  display: none;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
}

/* --- Detail Item --- */
.detail-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.detail-label {
  font-size: var(--font-size-stat-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.detail-value {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text);
}

.detail-description {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-glass);
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-body);
}

/* --- Order Preview --- */
.order-preview {
  padding: var(--space-lg);
  opacity: 1;
  transition: opacity 200ms var(--ease-default);
}

.order-preview.fade-out {
  opacity: 0;
}

.order-preview.hidden {
  display: none;
}

.preview-title {
  font-size: var(--font-size-h5);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.preview-details,
.preview-balance {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.preview-balance {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-glass);
}

/* --- Preview Row --- */
.preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
}

.preview-row.highlight {
  color: var(--color-text);
  font-weight: 600;
  background: rgba(6, 182, 212, 0.05);
  border-radius: var(--border-radius-sm);
  padding: var(--space-sm) var(--space-md);
  margin-inline: calc(-1 * var(--space-md));
  border: 1px solid rgba(6, 182, 212, 0.15);
}

.preview-row span:last-child {
  font-weight: 500;
  color: var(--color-text);
}

.truncate-50 {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

/* --- Tooltip --- */
.tooltip-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip-trigger .tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.tooltip-trigger .tooltip-icon:hover {
  color: var(--color-cyan-light);
  background: rgba(6, 182, 212, 0.1);
}

.tooltip-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms var(--ease-default), transform 200ms var(--ease-default);
  transform: translateX(-50%) translateY(4px);
}

[dir="rtl"] .tooltip-popover {
  transform: translateX(50%) translateY(4px);
}

.tooltip-popover.visible {
  pointer-events: auto;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

[dir="rtl"] .tooltip-popover.visible {
  transform: translateX(50%) translateY(0);
}

.tooltip-popover.hidden {
  display: none;
}

.tooltip-content {
  background: var(--color-bg-elevated);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.8125rem;
  color: var(--color-text);
  line-height: var(--line-height-body);
  white-space: normal;
  max-width: 240px;
  min-width: 120px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.tooltip-arrow {
  position: absolute;
  bottom: -6px;
  inset-inline-start: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--color-bg-elevated);
  border-inline-end: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}

[dir="rtl"] .tooltip-arrow {
  transform: translateX(50%) rotate(45deg);
}

/* ============================================
   NEW ORDER PAGE - RESPONSIVE LAYOUT
   ============================================ */

/* --- Page Layout Container --- */
.new-order-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

/* Mobile: below 768px - single column, 16px gap, native scroll */
@media (max-width: 767px) {
  .new-order-layout {
    flex-direction: column;
    gap: var(--space-md);
  }

  .new-order-category-bar .scroll-btn {
    display: none !important;
  }

  .new-order-category-bar .category-icons-scroll {
    padding-inline-start: var(--space-md);
    padding-inline-end: var(--space-md);
    /* Native scroll with dynamic fade hints based on scroll position */
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  }

  /* When at the start of scroll (no items before), remove left fade */
  .new-order-category-bar .category-icons-scroll.scroll-at-start {
    mask-image: linear-gradient(to right, black 0%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 0%, black 95%, transparent 100%);
  }

  /* When at the end of scroll (no items after), remove right fade */
  .new-order-category-bar .category-icons-scroll.scroll-at-end {
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 100%);
  }

  /* When content doesn't overflow (no scroll needed), no fade at all */
  .new-order-category-bar .category-icons-scroll.scroll-at-start.scroll-at-end {
    mask-image: none;
    -webkit-mask-image: none;
  }

  [dir="rtl"] .new-order-category-bar .category-icons-scroll {
    mask-image: linear-gradient(to left, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, transparent 0%, black 5%, black 95%, transparent 100%);
  }

  [dir="rtl"] .new-order-category-bar .category-icons-scroll.scroll-at-start {
    mask-image: linear-gradient(to left, black 0%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 0%, black 95%, transparent 100%);
  }

  [dir="rtl"] .new-order-category-bar .category-icons-scroll.scroll-at-end {
    mask-image: linear-gradient(to left, transparent 0%, black 5%, black 100%);
    -webkit-mask-image: linear-gradient(to left, transparent 0%, black 5%, black 100%);
  }

  [dir="rtl"] .new-order-category-bar .category-icons-scroll.scroll-at-start.scroll-at-end {
    mask-image: none;
    -webkit-mask-image: none;
  }

  .step-guide-steps {
    gap: 0;
  }

  .step-connector {
    min-width: 16px;
    margin: 0 var(--space-xs);
  }

  .step-label {
    font-size: 0.625rem;
  }

  .tooltip-popover {
    inset-inline-start: auto;
    inset-inline-end: 0;
    transform: translateY(4px);
  }

  .tooltip-popover.visible {
    transform: translateY(0);
  }

  [dir="rtl"] .tooltip-popover {
    inset-inline-end: auto;
    inset-inline-start: 0;
    transform: translateY(4px);
  }

  [dir="rtl"] .tooltip-popover.visible {
    transform: translateY(0);
  }

  .tooltip-arrow {
    inset-inline-start: auto;
    inset-inline-end: 16px;
    transform: rotate(45deg);
  }

  [dir="rtl"] .tooltip-arrow {
    inset-inline-end: auto;
    inset-inline-start: 16px;
    transform: rotate(45deg);
  }
}

/* Tablet: 768px to 1024px - single column, max-width 720px, centered */
@media (min-width: 768px) and (max-width: 1024px) {
  .new-order-layout {
    flex-direction: column;
    max-width: 720px;
    margin-inline: auto;
    gap: var(--space-lg);
  }
}

/* Desktop: above 1024px - two-column layout */
@media (min-width: 1025px) {
  .new-order-layout {
    flex-direction: row;
    gap: var(--space-xl);
    align-items: flex-start;
  }

  .new-order-layout .new-order-form-col {
    flex: 1;
    min-width: 0;
  }

  .new-order-layout .new-order-side-col {
    width: 360px;
    min-width: 360px;
    position: sticky;
    top: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
  }
}

/* ============================================
   NEW ORDER PAGE - RTL-SPECIFIC RULES
   ============================================ */

/* Mirror scroll buttons in RTL */
[dir="rtl"] .scroll-btn-start {
  inset-inline-start: 0;
}

[dir="rtl"] .scroll-btn-end {
  inset-inline-end: 0;
}

/* Mirror directional icons in category bar for RTL */
[dir="rtl"] .new-order-category-bar .icon-directional {
  transform: scaleX(-1);
}

/* RTL preview row highlight uses logical margins */
[dir="rtl"] .preview-row.highlight {
  margin-inline: calc(-1 * var(--space-md));
}

/* RTL step guide close button positioning */
[dir="rtl"] .step-guide .step-guide-close {
  inset-inline-end: var(--space-sm);
}

/* New order platform picker: show the complete catalog without a hidden strip. */
.new-order-category-bar #noCategoryIconsList {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.new-order-category-bar .platform-choice {
  width: 100%;
  min-width: 0;
  height: 58px;
  min-height: 58px;
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.625rem;
  padding: 0.625rem;
  text-align: start;
}

.new-order-category-bar .platform-choice-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  min-width: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  background: var(--color-surface);
}

.new-order-category-bar .platform-choice-icon svg {
  width: 19px;
  height: 19px;
}

.new-order-category-bar .platform-choice .category-icon-label {
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .new-order-category-bar #noCategoryIconsList {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .new-order-category-bar #noCategoryIconsList {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .new-order-category-bar #noCategoryIconsList {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

.order-category-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
  padding: 0.25rem;
}

.order-category-choice,
.order-service-choice {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.75rem 0.875rem;
  color: var(--color-text-secondary);
  text-align: start;
  border: 1px solid var(--border-glass);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.order-category-choice:hover,
.order-service-choice:hover,
.order-category-choice:focus-visible,
.order-service-choice:focus-visible {
  outline: none;
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.08);
  color: #f1f5f9;
}

.order-category-choice.active,
.order-service-choice.active {
  border-color: rgba(34, 211, 238, 0.7);
  background: rgba(34, 211, 238, 0.1);
  color: #e2faff;
}

.order-category-choice-name,
.order-service-choice-info {
  min-width: 0;
  overflow-wrap: anywhere;
}

.order-category-choice-arrow {
  color: #67e8f9;
  font-size: 1.25rem;
  line-height: 1;
}

.order-service-choices {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.order-service-choice-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.order-service-choice-title {
  color: #f1f5f9;
  font-size: 0.875rem;
  font-weight: 600;
}

.order-service-choice-meta {
  color: #94a3b8;
  font-size: 0.75rem;
  line-height: 1.5;
}

.order-service-choice-price {
  flex: 0 0 auto;
  color: #6ee7b7;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.order-service-load-more {
  padding: 0.75rem;
  color: #67e8f9;
  border: 1px dashed rgba(34, 211, 238, 0.35);
  border-radius: 0.75rem;
  background: rgba(8, 145, 178, 0.06);
}

.order-service-load-more:hover,
.order-service-load-more:focus-visible {
  outline: none;
  border-color: rgba(34, 211, 238, 0.7);
  background: rgba(8, 145, 178, 0.12);
}

.order-catalog-loading {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  color: #a5f3fc;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 0.75rem;
  background: rgba(8, 145, 178, 0.08);
}

.order-catalog-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(165, 243, 252, 0.3);
  border-top-color: #67e8f9;
  border-radius: 50%;
  animation: order-catalog-spin 700ms linear infinite;
}

@keyframes order-catalog-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 420px) {
  .order-category-choices { grid-template-columns: minmax(0, 1fr); }
  .order-service-choice { align-items: flex-start; }
  .order-service-choice-price { font-size: 0.72rem; }
}
