/**
 * Docket Ops - Main Stylesheet
 * Design System: Dark theme with glass morphism
 */

/* ==========================================================================
   CSS Variables / Design Tokens
   ========================================================================== */
:root {
  /* Brand Colors */
  --bg-deep: #020617;
  --bg-panel: #0F172A;
  --bg-card: rgba(30, 41, 59, 0.4);
  --bg-card-solid: #1e293b;

  /* Accents */
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-dim: rgba(59, 130, 246, 0.1);
  --primary-glow: rgba(59, 130, 246, 0.4);

  --accent: #7CFF6B;
  --accent-dim: rgba(124, 255, 107, 0.1);
  --accent-glow: rgba(124, 255, 107, 0.4);

  /* Status Colors */
  --success: #22c55e;
  --success-dim: rgba(34, 197, 94, 0.1);
  --warning: #f59e0b;
  --warning-dim: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-dim: rgba(239, 68, 68, 0.1);
  --info: #06b6d4;
  --info-dim: rgba(6, 182, 212, 0.1);

  /* Glass & Borders */
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.15);
  --glass-bg: rgba(30, 41, 59, 0.4);

  /* Text */
  --text-main: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Surfaces */
  --surface-0: #020617;
  --surface-1: #0f172a;
  --surface-2: #1e293b;
  --surface-3: #334155;
  --surface-4: #475569;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 80px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 100px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-glow-primary: 0 0 25px var(--primary-glow);
  --shadow-glow-accent: 0 0 25px var(--accent-glow);

  /* Layout */
  --max-w: 1240px;
  --max-w-sm: 640px;
  --max-w-md: 768px;
  --max-w-lg: 1024px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mesh background gradient */
body.with-mesh {
  background-image:
    radial-gradient(circle at 10% 0%, rgba(59, 130, 246, 0.15), transparent 40%),
    radial-gradient(circle at 90% 40%, rgba(124, 255, 107, 0.08), transparent 45%);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-main);
}

p {
  color: var(--text-muted);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-base);
}

a:hover {
  color: var(--text-main);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 15px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 32px; }
.text-4xl { font-size: 36px; }
.text-5xl { font-size: 48px; }
.text-6xl { font-size: 64px; }
.text-hero { font-size: clamp(48px, 6vw, 72px); }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-white { color: white; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 1px; }
.tracking-wider { letter-spacing: 2px; }

/* Gradient text */
.text-gradient {
  background: linear-gradient(180deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-sm { max-width: var(--max-w-sm); }
.container-md { max-width: var(--max-w-md); }
.container-lg { max-width: var(--max-w-lg); }

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* Grid utilities */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Spacing */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }
.mt-4xl { margin-top: var(--space-4xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.py-2xl { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.py-3xl { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }
.py-4xl { padding-top: var(--space-4xl); padding-bottom: var(--space-4xl); }

.px-sm { padding-left: var(--space-sm); padding-right: var(--space-sm); }
.px-md { padding-left: var(--space-md); padding-right: var(--space-md); }
.px-lg { padding-left: var(--space-lg); padding-right: var(--space-lg); }
.px-xl { padding-left: var(--space-xl); padding-right: var(--space-xl); }

.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.p-2xl { padding: var(--space-2xl); }
.p-3xl { padding: var(--space-3xl); }

/* ==========================================================================
   Components: Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 16px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-glow-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: var(--bg-deep);
  box-shadow: var(--shadow-glow-accent);
}

.btn-accent:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Components: Cards & Glass Effect
   ========================================================================== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-top-color: var(--glass-highlight);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-2xl);
}

.card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: var(--transition-base);
}

.card:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

.card-solid {
  background: var(--surface-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

/* ==========================================================================
   Components: Forms
   ========================================================================== */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition-base);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-dim);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.form-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.form-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: var(--space-xs);
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: var(--space-xs);
}

/* ==========================================================================
   Components: Navigation
   ========================================================================== */
.nav {
  position: sticky;
  top: 20px;
  z-index: var(--z-sticky);
  margin-bottom: 40px;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-radius: var(--radius-full);
}

.nav-logo {
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: white;
}

/* ==========================================================================
   Components: Pills & Badges
   ========================================================================== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
}

.pill-primary {
  background: var(--primary-dim);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.pill-accent {
  background: var(--accent-dim);
  border: 1px solid rgba(124, 255, 107, 0.3);
  color: var(--accent);
}

.pill-subtle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
}

.badge-success {
  background: var(--success-dim);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-dim);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-dim);
  color: var(--danger);
}

.badge-info {
  background: var(--info-dim);
  color: var(--info);
}

/* ==========================================================================
   Components: Icons
   ========================================================================== */
i.fa-duotone {
  --fa-primary-opacity: 1;
  --fa-secondary-opacity: 0.4;
}

.icon-box {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.icon-box-primary {
  background: var(--primary-dim);
  color: var(--primary);
}

.icon-box-accent {
  background: var(--accent-dim);
  color: var(--accent);
}

.icon-box-lg {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Components: Tables
   ========================================================================== */
.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.2);
}

.table td {
  font-size: 14px;
  color: var(--text-secondary);
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   Components: Stats Cards
   ========================================================================== */
.stat-card {
  padding: var(--space-lg);
  border-radius: var(--radius-xl);
  background: var(--surface-2);
  border: 1px solid var(--glass-border);
}

.stat-card-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border: none;
  color: white;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.stat-card-gradient .stat-label {
  color: rgba(255, 255, 255, 0.8);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
}

.stat-card-gradient .stat-value {
  color: white;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  margin-top: var(--space-sm);
}

.stat-change-up {
  background: var(--success-dim);
  color: var(--success);
}

.stat-change-down {
  background: var(--danger-dim);
  color: var(--danger);
}

/* ==========================================================================
   Components: Activity Items
   ========================================================================== */
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-size: 13px;
  font-weight: 600;
  color: white;
}

.activity-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   Landing Page: Hero Section
   ========================================================================== */
.hero {
  text-align: center;
  padding: 60px 0 100px;
}

.hero h1 {
  font-size: clamp(48px, 6vw, 72px);
  line-height: 1.05;
  margin-bottom: var(--space-lg);
}

.hero p {
  font-size: 20px;
  max-width: 640px;
  margin: 0 auto var(--space-2xl);
}

/* ==========================================================================
   Landing Page: Problem Section
   ========================================================================== */
.problem-section {
  padding: var(--space-4xl) 0;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.prob-card {
  padding: 30px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
}

.prob-card-success {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.prob-list {
  margin-top: 20px;
  display: grid;
  gap: 15px;
}

.prob-item {
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.prob-item-success {
  color: white;
}

.prob-icon {
  width: 20px;
  text-align: center;
}

/* ==========================================================================
   Landing Page: Steps Section
   ========================================================================== */
.steps-section {
  padding: 120px 0;
  position: relative;
}

.step-line {
  position: absolute;
  left: 50%;
  top: 200px;
  bottom: 100px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
  transform: translateX(-50%);
  opacity: 0.3;
  z-index: -1;
}

.step-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-bottom: 120px;
  align-items: center;
}

.step-row.reverse {
  direction: rtl;
}

.step-row.reverse .step-text {
  direction: ltr;
}

.step-label {
  color: var(--primary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-bottom: var(--space-sm);
}

.step-text h2 {
  font-size: 32px;
  margin-bottom: var(--space-md);
  color: white;
}

.step-check {
  margin-top: var(--space-lg);
  display: grid;
  gap: 12px;
}

.step-check-item {
  display: flex;
  gap: 10px;
  font-size: 15px;
  color: var(--text-muted);
  align-items: center;
}

.check-icon {
  color: var(--accent);
}

/* ==========================================================================
   Landing Page: Visual Mockups
   ========================================================================== */
.mock-browser {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-xl);
}

.mock-header {
  background: var(--surface-1);
  padding: 12px;
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.mock-body {
  padding: var(--space-lg);
}

.mock-field {
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text-dim);
}

.mock-btn {
  height: 40px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-weight: 600;
  color: white;
  font-size: 13px;
}

.mock-product {
  flex: 1;
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mock-product.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.mock-product-name {
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.mock-product-price {
  font-size: 11px;
  color: var(--accent);
}

/* Map mockup */
.map-view {
  height: 200px;
  background: var(--surface-1);
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.map-path {
  position: absolute;
  top: 50%;
  left: 20%;
  width: 60%;
  height: 2px;
  background: var(--accent);
  opacity: 0.5;
}

.map-pin {
  font-size: 18px;
  color: var(--accent);
  position: absolute;
  top: 40%;
  left: 20%;
  text-shadow: 0 0 10px var(--accent);
}

.map-pin-2 {
  font-size: 18px;
  color: white;
  position: absolute;
  top: 40%;
  right: 20%;
}

/* Phone mockup */
.mock-phone {
  width: 240px;
  margin: 0 auto;
  background: #000;
  border-radius: 30px;
  border: 4px solid var(--surface-3);
  overflow: hidden;
  position: relative;
}

.mock-phone-screen {
  background: var(--surface-2);
  padding: 20px 15px;
  height: 380px;
}

.mock-phone-lg {
  width: 300px;
  border-radius: 40px;
  border: 6px solid var(--surface-2);
  box-shadow: var(--shadow-xl);
}

.mock-phone-lg .mock-phone-screen {
  height: 500px;
  padding: 40px 20px 20px;
}

.mock-phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 25px;
  background: var(--surface-2);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 10;
}

/* ==========================================================================
   Landing Page: Features Grid
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: 100px;
}

.feat-card {
  padding: var(--space-xl);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  transition: var(--transition-base);
}

.feat-card:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

.feat-icon {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 20px;
  display: block;
}

.feat-card h3 {
  font-size: 18px;
  margin-bottom: var(--space-sm);
  color: white;
}

/* ==========================================================================
   Landing Page: Industry Section
   ========================================================================== */
.industry-section {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, #060e1f 100%);
}

.ind-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.ind-card {
  padding: var(--space-lg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  text-align: center;
  background: rgba(255, 255, 255, 0.01);
  transition: var(--transition-base);
}

.ind-card:hover {
  border-color: var(--accent);
}

.ind-icon {
  font-size: 32px;
  color: var(--accent);
  margin-bottom: var(--space-md);
  display: block;
}

/* ==========================================================================
   Landing Page: Testimonials
   ========================================================================== */
.testimonial-card {
  padding: var(--space-xl);
}

.testimonial-stars {
  color: #fbbf24;
  margin-bottom: var(--space-md);
}

.testimonial-text {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  background: var(--surface-3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
}

.testimonial-name {
  font-size: 13px;
  font-weight: 700;
  color: white;
}

.testimonial-role {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Landing Page: CTA & Pricing
   ========================================================================== */
.cta-section {
  background: var(--bg-panel);
  border-top: 1px solid var(--glass-border);
  padding: 100px 0;
  text-align: center;
}

.price-display {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
}

.price-period {
  font-size: 24px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Landing Page: Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--glass-border);
  background: var(--bg-deep);
  padding: var(--space-4xl) 0 var(--space-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand {
  max-width: 300px;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(124, 255, 107, 0.05);
  border: 1px solid rgba(124, 255, 107, 0.2);
  border-radius: var(--radius-full);
}

.footer-status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

.footer-title {
  color: white;
  font-size: 14px;
  margin-bottom: var(--space-md);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid var(--glass-border);
  padding-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copyright {
  color: var(--text-dim);
  font-size: 13px;
}

.footer-social {
  display: flex;
  gap: var(--space-lg);
}

.footer-social a {
  color: var(--text-dim);
  font-size: 18px;
}

.footer-social a:hover {
  color: white;
}

/* ==========================================================================
   Landing Page: Integration Bar
   ========================================================================== */
.integrations-bar {
  border-bottom: 1px solid var(--glass-border);
  padding: 30px 0;
  background: rgba(0, 0, 0, 0.3);
}

.integrations-list {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  opacity: 0.6;
}

.integration-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  color: var(--text-muted);
}

.integration-item span {
  font-weight: 600;
  font-size: 16px;
}

/* ==========================================================================
   Dashboard Layout
   ========================================================================== */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.dashboard-sidebar {
  width: 260px;
  background: var(--surface-1);
  border-right: 1px solid var(--glass-border);
  padding: var(--space-lg);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: var(--z-sticky);
}

.dashboard-main {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  background-color: var(--bg-deep);
}

.dashboard-header {
  background: var(--surface-1);
  border-bottom: 1px solid var(--glass-border);
  padding: var(--space-md) var(--space-xl);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-content {
  padding: var(--space-xl);
  background-color: var(--bg-deep);
  min-height: calc(100vh - 70px);
}

/* Sidebar navigation */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: white;
  margin-bottom: var(--space-2xl);
  padding: var(--space-sm) 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.sidebar-section {
  margin-bottom: var(--space-lg);
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-xs);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-base);
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.sidebar-link.active {
  background: var(--primary-dim);
  color: var(--primary);
}

.sidebar-link i {
  width: 20px;
  text-align: center;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Header elements */
.header-search {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--surface-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  width: 300px;
}

.header-search input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 14px;
  width: 100%;
}

.header-search input::placeholder {
  color: var(--text-dim);
}

.header-search input:focus {
  outline: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  transition: var(--transition-base);
}

.header-icon-btn:hover {
  background: var(--surface-2);
  color: white;
}

.header-icon-btn .badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
}

.header-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
}

.header-user:hover {
  background: var(--surface-2);
}

.header-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

/* Page header */
.page-header {
  margin-bottom: var(--space-xl);
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-xs);
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.page-actions {
  display: flex;
  gap: var(--space-sm);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }

  .dashboard-sidebar.open {
    transform: translateX(0);
  }

  .dashboard-main {
    margin-left: 0;
  }
}

@media (max-width: 900px) {
  .problem-grid,
  .step-row,
  .features-grid,
  .ind-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .step-line {
    display: none;
  }

  .step-row.reverse {
    direction: ltr;
  }

  .step-row {
    gap: 40px;
    margin-bottom: 80px;
  }

  .nav-links {
    display: none;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ind-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .features-grid,
  .ind-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 36px;
  }

  .container {
    padding: 0 var(--space-md);
  }
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.w-full { width: 100%; }
.h-full { height: 100%; }
.opacity-60 { opacity: 0.6; }
.opacity-80 { opacity: 0.8; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }

/* ==========================================================================
   Enhanced Modern Components
   ========================================================================== */

/* Animated Number Counters */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.stat-number {
  animation: countUp 0.5s ease-out;
}

/* Trend Indicators */
.trend-up, .trend-down, .trend-neutral {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.trend-up {
  color: var(--success);
  background: var(--success-dim);
}

.trend-down {
  color: var(--danger);
  background: var(--danger-dim);
}

.trend-neutral {
  color: var(--text-muted);
  background: var(--surface-3);
}

/* Sparkline Charts Placeholder */
.sparkline {
  height: 32px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.sparkline-bar {
  flex: 1;
  background: var(--primary);
  border-radius: 2px;
  min-height: 4px;
  transition: height 0.3s ease;
}

.sparkline-bar:hover {
  background: var(--accent);
}

/* Enhanced Data Tables */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table th {
  background: var(--surface-1);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

.data-table th:first-child {
  border-radius: var(--radius-lg) 0 0 0;
}

.data-table th:last-child {
  border-radius: 0 var(--radius-lg) 0 0;
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--glass-border);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.data-table tbody tr {
  transition: all 0.15s ease;
  cursor: pointer;
}

.data-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.data-table tbody tr:hover td {
  color: var(--text-main);
}

.data-table tbody tr:active {
  background: rgba(59, 130, 246, 0.1);
}

/* Table Row Actions */
.row-actions {
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.data-table tbody tr:hover .row-actions {
  opacity: 1;
}

.row-action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.row-action-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.row-action-btn.danger:hover {
  background: var(--danger);
  border-color: var(--danger);
}

/* Enhanced Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-badge.pending {
  background: var(--warning-dim);
  color: var(--warning);
}

.status-badge.confirmed, .status-badge.active {
  background: var(--info-dim);
  color: var(--info);
}

.status-badge.delivered, .status-badge.completed, .status-badge.success {
  background: var(--success-dim);
  color: var(--success);
}

.status-badge.cancelled, .status-badge.failed {
  background: var(--danger-dim);
  color: var(--danger);
}

.status-badge.in_service, .status-badge.in_progress {
  background: var(--primary-dim);
  color: var(--primary);
}

/* Product Cards Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.product-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);
}

.product-card-body {
  padding: 20px;
}

.product-card-title {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 8px;
}

.product-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}

.product-card-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.product-card-price span {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.product-card-stock {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--success-dim);
  color: var(--success);
}

.product-card-stock.low {
  background: var(--warning-dim);
  color: var(--warning);
}

.product-card-stock.out {
  background: var(--danger-dim);
  color: var(--danger);
}

/* Product Card Actions Overlay */
.product-card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}

.product-card:hover .product-card-actions {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Form Inputs */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-label.required::after {
  content: '*';
  color: var(--danger);
  margin-left: 4px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface-1);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-lg);
  color: var(--text-main);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-input:hover, .form-select:hover, .form-textarea:hover {
  border-color: var(--surface-4);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-dim);
}

.form-input::placeholder {
  color: var(--text-dim);
}

.form-input.error {
  border-color: var(--danger);
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 6px;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Form Row Grid */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Enhanced Search Input */
.search-input-wrapper {
  position: relative;
}

.search-input-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input-wrapper .form-input {
  padding-left: 42px;
}

/* Toggle Switches */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  transition: 0.3s;
}

.toggle-slider::before {
  position: absolute;
  content: '';
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* Enhanced Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
}

.modal-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  z-index: calc(var(--z-modal) + 1);
  opacity: 0;
  transition: all 0.2s ease;
}

.modal-container.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: var(--surface-2);
  color: white;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--glass-border);
  background: var(--surface-2);
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton-image {
  height: 180px;
  width: 100%;
}

/* Page Header Enhanced */
.page-header-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--glass-border);
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-header-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-radius: var(--radius-lg);
  font-size: 22px;
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.page-header-text h1 {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.page-header-text p {
  font-size: 14px;
  color: var(--text-muted);
}

.page-header-actions {
  display: flex;
  gap: 12px;
}

/* Tabs Enhanced */
.tabs-modern {
  display: flex;
  gap: 4px;
  background: var(--surface-1);
  padding: 4px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.tab-modern {
  flex: 1;
  padding: 12px 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-modern:hover {
  color: var(--text-main);
  background: var(--surface-2);
}

.tab-modern.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* Empty States Enhanced */
.empty-state-modern {
  text-align: center;
  padding: 60px 40px;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border-radius: 50%;
  font-size: 32px;
  color: var(--text-dim);
}

.empty-state-modern h3 {
  font-size: 20px;
  font-weight: 600;
  color: white;
  margin-bottom: 8px;
}

.empty-state-modern p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Notifications Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-toast);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 18px;
}

.toast.success .toast-icon {
  background: var(--success-dim);
  color: var(--success);
}

.toast.error .toast-icon {
  background: var(--danger-dim);
  color: var(--danger);
}

.toast.warning .toast-icon {
  background: var(--warning-dim);
  color: var(--warning);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: white;
  font-size: 14px;
}

.toast-message {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Dropdown Menus */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.dropdown-item:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.dropdown-item:hover {
  background: var(--surface-2);
  color: white;
}

.dropdown-item i {
  width: 18px;
  text-align: center;
  color: var(--text-dim);
}

.dropdown-item:hover i {
  color: var(--primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 8px 0;
}

/* Keyboard Shortcuts */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background: var(--surface-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: inherit;
}

/* Signature Pad */
.signature-pad-wrapper {
  background: var(--surface-2);
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.signature-pad-wrapper.active {
  border-color: var(--primary);
  border-style: solid;
}

.signature-pad {
  width: 100%;
  height: 200px;
  background: white;
  border-radius: var(--radius-md);
  cursor: crosshair;
}

.signature-pad-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

/* Calendar Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-header-cell {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  padding: 12px 0;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.calendar-day:hover {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: white;
}

.calendar-day.today {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}

.calendar-day.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.calendar-day.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.calendar-day.has-events::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

/* Customer Avatar */
.customer-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  flex-shrink: 0;
}

.customer-avatar.sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.customer-avatar.lg {
  width: 56px;
  height: 56px;
  font-size: 20px;
  border-radius: var(--radius-lg);
}

/* File Upload Zone */
.upload-zone {
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--surface-1);
}

.upload-zone:hover {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-zone-icon {
  font-size: 40px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.upload-zone-text {
  font-size: 14px;
  color: var(--text-muted);
}

.upload-zone-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 8px;
}

/* Progress Bar */
.progress-bar {
  height: 8px;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--glass-border);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  border: 3px solid var(--surface-1);
}

.timeline-item.completed::before {
  background: var(--success);
}

.timeline-time {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.timeline-content {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Pill Buttons */
.pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  padding: 6px 14px;
  background: var(--surface-2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Info Cards */
.info-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
}

.info-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-dim);
  border-radius: var(--radius-lg);
  color: var(--primary);
  font-size: 20px;
  flex-shrink: 0;
}

.info-card-content {
  flex: 1;
}

.info-card-title {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.info-card-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   GLOBAL MOBILE RESPONSIVE STYLES
   ========================================================================== */

/* Mobile-first visibility utilities */
.mobile-only {
  display: none;
}

.desktop-only {
  display: block;
}

/* Responsive container */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Card responsive */
.card-responsive {
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
}

/* Form responsive */
.form-responsive {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
  .container {
    padding: 0 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Hide large screen only elements */
  .lg-only {
    display: none !important;
  }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }

  .desktop-only {
    display: none;
  }

  .container {
    padding: 0 16px;
  }

  .card-responsive {
    border-radius: var(--radius-lg);
    padding: var(--space-md);
  }

  /* Typography scaling */
  .text-4xl { font-size: 28px; }
  .text-3xl { font-size: 24px; }
  .text-2xl { font-size: 20px; }
  .text-xl { font-size: 18px; }

  /* Grid utilities */
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr !important;
  }

  /* Stat cards responsive */
  .stat-card {
    padding: var(--space-md);
  }

  .stat-card-value {
    font-size: 24px;
  }

  .stat-card-label {
    font-size: 12px;
  }

  /* Data table responsive */
  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table table {
    min-width: 600px;
  }

  .data-table th,
  .data-table td {
    padding: 12px;
    font-size: 13px;
  }

  /* Form elements */
  .input-modern,
  .textarea-modern,
  .select-modern {
    padding: 12px 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Buttons */
  .btn,
  .btn-primary,
  .btn-secondary {
    padding: 12px 20px;
    font-size: 14px;
    min-height: 44px; /* Touch target */
  }

  /* Button group stacking */
  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
    justify-content: center;
  }

  /* Modal responsive */
  .modal-content {
    margin: 16px;
    max-height: calc(100vh - 32px);
    border-radius: var(--radius-lg);
  }

  .modal-header {
    padding: 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 16px;
    flex-direction: column-reverse;
    gap: 8px;
  }

  .modal-footer .btn {
    width: 100%;
  }

  /* Footer responsive */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }

  .footer-brand {
    max-width: none;
  }

  /* Hide elements on mobile */
  .md-hide {
    display: none !important;
  }
}

/* Small mobile breakpoint */
@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .card-responsive {
    padding: 12px;
  }

  /* Ultra compact typography */
  .text-3xl { font-size: 22px; }
  .text-2xl { font-size: 18px; }
  .text-xl { font-size: 16px; }

  /* Spacing utilities */
  .space-lg { padding: var(--space-md); }
  .gap-lg { gap: var(--space-md); }

  /* Status badges smaller */
  .status-badge {
    padding: 3px 8px;
    font-size: 11px;
  }

  /* Info card responsive */
  .info-card {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .info-card-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  /* Timeline responsive */
  .timeline {
    padding-left: 16px;
    margin-left: 8px;
  }

  .timeline-item::before {
    left: -20px;
    width: 10px;
    height: 10px;
  }

  /* Progress bars */
  .progress-modern {
    height: 6px;
  }

  /* File upload zones */
  .file-upload-zone {
    padding: 24px 16px;
  }

  .file-upload-icon {
    font-size: 32px;
  }

  /* Pills */
  .pill {
    padding: 5px 12px;
    font-size: 12px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn,
  .btn-primary,
  .btn-secondary,
  a.btn {
    min-height: 44px;
  }

  /* Remove hover states that cause sticky behavior on touch */
  .btn:hover,
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }

  /* Add active states for feedback */
  .btn:active,
  .btn-primary:active,
  .btn-secondary:active {
    transform: scale(0.98);
    opacity: 0.9;
  }

  .card-responsive:active {
    transform: scale(0.99);
  }

  /* Prevent text selection on interactive elements */
  .btn,
  .nav-link,
  .sidebar-link,
  .pill {
    -webkit-user-select: none;
    user-select: none;
  }
}

/* iOS safe area insets */
@supports (padding-top: env(safe-area-inset-top)) {
  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .modal-content {
    max-height: calc(100vh - 20px);
  }

  .modal-body {
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }

  /* Compact stat cards in landscape */
  .stat-card {
    padding: 12px;
  }

  .stat-card-value {
    font-size: 20px;
  }
}

/* Print styles */
@media print {
  .no-print,
  .btn,
  .mobile-fab,
  .sidebar,
  .header {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .card-responsive {
    border: 1px solid #ddd;
    box-shadow: none;
    break-inside: avoid;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
