/**
 * Geo-Tagged Salesman Order-Taking Application
 * Shared Design Tokens and Core Styling Utilities
 */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Primary Foundation */
  --color-bg-app: #f8fafc;
  --color-bg-card: #ffffff;
  --color-border: #e2e8f0;
  --color-border-subtle: #f1f5f9;
  
  /* Deep Navy Typography */
  --color-text-main: #0f172a;
  --color-text-muted: #475569;
  --color-text-light: #94a3b8;
  
  /* Primary Actions: Teal / Vibrant Blue */
  --color-primary: #0d9488;
  --color-primary-hover: #0f766e;
  --color-primary-light: #ccfbf1;
  --color-accent-blue: #2563eb;
  --color-accent-blue-hover: #1d4ed8;
  
  /* Status Color Accents */
  --status-draft: #64748b;
  --status-draft-bg: #f1f5f9;
  --status-submitted: #0284c7;
  --status-submitted-bg: #e0f2fe;
  --status-accepted: #059669;
  --status-accepted-bg: #d1fae5;
  --status-processing: #d97706;
  --status-processing-bg: #fef3c7;
  --status-dispatched: #7c3aed;
  --status-dispatched-bg: #ede9fe;
  --status-delivered: #16a34a;
  --status-delivered-bg: #dcfce7;
  --status-rejected: #e11d48;
  --status-rejected-bg: #ffe4e6;
  --status-cancelled: #dc2626;
  --status-cancelled-bg: #fee2e2;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

/* Base resets & typography */
body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-app);
  color: var(--color-text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Horizontal top navigation white theme scrollbar */
#admin-horizontal-nav::-webkit-scrollbar {
  height: 4px;
}
#admin-horizontal-nav::-webkit-scrollbar-track {
  background: transparent;
}
#admin-horizontal-nav::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
#admin-horizontal-nav::-webkit-scrollbar-thumb:hover {
  background: #0d9488;
}

/* Accessible focus ring */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Subtle dot background pattern */
.bg-grid-pattern {
  background-image: radial-gradient(rgba(148, 163, 184, 0.25) 1px, transparent 1px);
  background-size: 20px 20px;
}

.bg-dot-pattern {
  background-image: radial-gradient(rgba(13, 148, 136, 0.12) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
}

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.2rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1.25;
}
.badge-draft { background-color: var(--status-draft-bg); color: var(--status-draft); }
.badge-submitted { background-color: var(--status-submitted-bg); color: var(--status-submitted); }
.badge-accepted { background-color: var(--status-accepted-bg); color: var(--status-accepted); }
.badge-processing { background-color: var(--status-processing-bg); color: var(--status-processing); }
.badge-dispatched { background-color: var(--status-dispatched-bg); color: var(--status-dispatched); }
.badge-delivered { background-color: var(--status-delivered-bg); color: var(--status-delivered); }
.badge-rejected { background-color: var(--status-rejected-bg); color: var(--status-rejected); }
.badge-cancelled { background-color: var(--status-cancelled-bg); color: var(--status-cancelled); }

/* GPS Pill Badges */
.badge-gps-success {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.badge-gps-failed {
  background-color: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
}
.badge-gps-exception {
  background-color: #fefce8;
  color: #854d0e;
  border: 1px solid #fde047;
}

/* Stock Banner Notice */
.stock-disclaimer-banner {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

/* Smooth transitions */
.transition-smooth {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Drawer & Modal Overlays */
.drawer-backdrop {
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
}

/* Animation utilities */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Table container styling */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Card hover effect */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Mobile screenshot frame styling */
.phone-mockup-frame {
  position: relative;
  border: 10px solid #1e293b;
  border-radius: 40px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  background: #0f172a;
  overflow: hidden;
}
.phone-mockup-speaker {
  width: 60px;
  height: 4px;
  background: #334155;
  border-radius: 4px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

