/**
 * Quotation System - Mobile-First Enterprise UI Stylesheet
 * Native-app feel on iOS & Android, high-productivity dashboard on Desktop
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Primary Brand */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  --primary: var(--primary-600);
  --primary-hover: var(--primary-700);
  --primary-light: var(--primary-50);

  /* Status Colors */
  --success: #10b981;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --warning-border: #fde68a;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;

  /* Neutrals */
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  /* Tokens */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --text-main: var(--slate-900);
  --text-muted: var(--slate-500);

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

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --bottom-bar-height: 68px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: env(safe-area-inset-bottom);
}

/* Icon Utilities */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon svg, [data-lucide] {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  vertical-align: middle;
}

.icon-sm svg, [data-lucide].icon-sm { width: 14px; height: 14px; }
.icon-lg svg, [data-lucide].icon-lg { width: 22px; height: 22px; }
.icon-xl svg, [data-lucide].icon-xl { width: 28px; height: 28px; }

/* Main Container */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 60;
  box-shadow: var(--shadow-xs);
}

.nav-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo-wrapper {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  max-width: 48px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.brand:hover .brand-logo-img {
  transform: scale(1.04);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #1e40af, #2563eb 60%, #3b82f6);
  color: var(--white);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--white);
  stroke-width: 2.2;
}

.brand-text h1 {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--slate-900);
}

.brand-text span {
  font-size: 0.7rem;
  color: var(--slate-500);
  font-weight: 500;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--slate-600);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--slate-100);
}

.nav-link.active {
  color: var(--primary);
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
}

.nav-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-700);
}

/* Bottom App Navigation Bar (Mobile Native App Bar) */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  box-shadow: var(--shadow-bar);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.2rem;
  color: var(--slate-500);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  gap: 0.2rem;
  transition: all 0.15s ease;
  position: relative;
}

.mobile-nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.mobile-nav-item.active {
  color: var(--primary);
}

.mobile-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* Center Action Button in Mobile Nav */
.mobile-nav-center-btn {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  margin-top: -16px;
  border: 3px solid var(--white);
  transition: transform 0.15s ease;
}

.mobile-nav-center-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--white);
  stroke-width: 2.4;
}

.mobile-nav-center-btn:active {
  transform: scale(0.92);
}

/* Main Content */
.main-content {
  flex: 1;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3.5rem 1.25rem;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--slate-200);
}

.page-title h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-title h2 svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
  flex-shrink: 0;
}

.page-title p {
  color: var(--slate-500);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-header h3 svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--slate-50);
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
}

.stat-card.blue::before { background: var(--primary); }
.stat-card.green::before { background: var(--success); }
.stat-card.purple::before { background: #8b5cf6; }
.stat-card.amber::before { background: var(--warning); }

.stat-info span {
  font-size: 0.75rem;
  color: var(--slate-500);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-info h3 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-top: 0.25rem;
  letter-spacing: -0.02em;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue { background: var(--primary-50); color: var(--primary-600); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.purple { background: #f5f3ff; color: #7c3aed; }
.stat-icon.amber { background: var(--warning-light); color: var(--warning); }

/* Buttons - Touch First */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px; /* Touch target */
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--white);
  color: var(--slate-700);
  border-color: var(--slate-300);
}

.btn-secondary:hover {
  background: var(--slate-50);
}

.btn-outline-primary {
  border-color: var(--primary-300);
  color: var(--primary-700);
  background: var(--white);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-sm {
  min-height: 36px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  border-radius: var(--radius-xs);
}

.btn-lg {
  min-height: 50px;
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

/* Forms & Touch-Friendly Inputs */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  min-height: 44px; /* Touch friendly */
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-size: 1rem; /* 16px prevents iOS automatic zoom on focus */
  font-family: inherit;
  color: var(--slate-900);
  background-color: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-control-sm {
  min-height: 38px;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.input-suffix-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-suffix {
  position: absolute;
  right: 0.75rem;
  font-size: 0.775rem;
  color: var(--slate-500);
  pointer-events: none;
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--slate-100);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
}

/* Result Box */
.result-box {
  background: linear-gradient(145deg, #ffffff, var(--slate-50));
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--slate-200);
  font-size: 0.875rem;
  color: var(--slate-700);
}

.result-item strong {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--slate-900);
}

.result-item:last-child {
  border-bottom: none;
}

.result-item.highlight {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-700);
  border-top: 2px solid var(--slate-300);
  margin-top: 0.6rem;
  padding-top: 0.75rem;
}

.result-item.highlight span:last-child {
  font-family: var(--font-mono);
  font-size: 1.35rem;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.badge-draft { background: var(--slate-100); color: var(--slate-700); border: 1px solid var(--slate-300); }
.badge-draft::before { background: var(--slate-400); }

.badge-sent { background: var(--primary-50); color: var(--primary-700); border: 1px solid var(--primary-200); }
.badge-sent::before { background: var(--primary-500); }

.badge-approved { background: var(--success-light); color: #047857; border: 1px solid var(--success-border); }
.badge-approved::before { background: var(--success); }

.badge-rejected { background: var(--danger-light); color: #b91c1c; border: 1px solid var(--danger-border); }
.badge-rejected::before { background: var(--danger); }

.badge-safe { background: var(--success-light); color: #047857; border: 1px solid var(--success-border); }
.badge-safe::before { background: var(--success); }

.badge-warning { background: var(--warning-light); color: #b45309; border: 1px solid var(--warning-border); }
.badge-warning::before { background: var(--warning); }

.badge-danger { background: var(--danger-light); color: #b91c1c; border: 1px solid var(--danger-border); }
.badge-danger::before { background: var(--danger); }

.badge-purple { background: #faf5ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.badge-purple::before { background: #9333ea; }

/* Toggle Slider */
.mould-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--slate-300);
  transition: 0.25s ease;
  border-radius: 24px;
}
.mould-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input:checked + .mould-toggle-slider {
  background-color: var(--primary);
}
input:checked + .mould-toggle-slider:before {
  transform: translateX(20px);
}

/* Segmented Tabs (Touch Native) */
.tabs {
  display: flex;
  background: var(--slate-200);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  flex: 1;
  min-width: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--slate-600);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--slate-900);
}

.tab-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Quick preset pills */
.preset-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.2rem 0;
  -webkit-overflow-scrolling: touch;
}

.preset-chip {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  color: var(--slate-700);
}

.preset-chip:active {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary);
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.table th {
  background: var(--slate-50);
  color: var(--slate-600);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--slate-700);
  vertical-align: middle;
}

/* Mobile Line Item Card */
.mobile-item-card {
  display: none;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-xs);
}

.mobile-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

/* Sticky Bottom Summary Bar on Mobile (Quotation Builder) */
.mobile-sticky-action-bar {
  display: none;
  position: fixed;
  bottom: calc(var(--bottom-bar-height) + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  padding: 0.85rem 1.25rem;
  box-shadow: var(--shadow-lg);
  z-index: 90;
  justify-content: space-between;
  align-items: center;
}

.mobile-sticky-action-bar .total-label {
  font-size: 0.75rem;
  color: var(--slate-400);
  text-transform: uppercase;
  font-weight: 700;
}

.mobile-sticky-action-bar .total-value {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #60a5fa;
}

/* Printable Sheet */
.print-sheet {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 3rem;
  max-width: 950px;
  margin: 0 auto;
  border: 1px solid var(--slate-200);
}

.quote-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid var(--slate-900);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.quote-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.party-box h4 {
  font-size: 0.775rem;
  text-transform: uppercase;
  color: var(--slate-500);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.quote-summary {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.summary-table {
  width: 320px;
}

.summary-table td {
  padding: 0.4rem 0.5rem;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-bar-height) + 1.25rem + env(safe-area-inset-bottom, 0px));
  right: 1.25rem;
  left: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--slate-900);
  color: var(--white);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
  animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success { background: #064e3b; }
.toast.toast-error { background: #7f1d1d; }
.toast.toast-warning { background: #78350f; }

@keyframes slideIn {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Print Styles */
@media print {
  body { background: white !important; color: black !important; padding: 0 !important; }
  .navbar, .mobile-bottom-nav, .mobile-sticky-action-bar, .page-header, .btn-print-hide, .app-footer, .toast-container {
    display: none !important;
  }
  .main-content { padding: 0 !important; max-width: 100% !important; }
  .print-sheet { box-shadow: none !important; border: none !important; padding: 0 !important; max-width: 100% !important; }
  .table th { background: #f1f5f9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ========================================================
   MOBILE-FIRST RESPONSIVE BREAKPOINT (Below 768px)
   ======================================================== */
@media (max-width: 768px) {
  /* Show bottom native app navigation bar */
  .mobile-bottom-nav {
    display: flex;
  }

  /* Adjust body padding so content does not get hidden under bottom nav */
  body {
    padding-bottom: calc(var(--bottom-bar-height) + 20px + env(safe-area-inset-bottom, 0px));
  }

  /* Hide desktop top nav links on mobile */
  .nav-links {
    display: none;
  }

  .nav-badge-pill {
    display: none;
  }

  .mobile-sticky-action-bar {
    display: flex;
  }

  .main-content {
    padding: 1rem 0.85rem 4rem 0.85rem;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .page-actions {
    width: 100%;
    display: flex;
  }

  .page-actions .btn {
    flex: 1;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .stat-card {
    padding: 0.95rem;
  }

  .stat-info h3 {
    font-size: 1.35rem;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
  }

  .stat-icon svg {
    width: 20px;
    height: 20px;
  }

  .quote-parties {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .quote-header {
    flex-direction: column;
    gap: 1.25rem;
  }

  .quote-header div:last-child {
    text-align: left;
  }

  .quote-header div:last-child table {
    margin-left: 0;
    text-align: left;
  }

  .print-sheet {
    padding: 1.25rem;
    border-radius: var(--radius-sm);
  }

  .summary-table {
    width: 100%;
  }

  /* Quotation items table switch to responsive cards */
  .desktop-table-view {
    display: none;
  }

  .mobile-item-card {
    display: block;
  }

  /* Quotations list card transformation on mobile */
  .quotations-table-wrapper .table th,
  .quotations-table-wrapper .table td {
    padding: 0.75rem 0.65rem;
  }
}
