/* ============================================================================
   ARISE ABOVE CONSTRUCTION - ESTIMATING PWA v3.5
   "Building Excellence, Elevating Homes"

   Complete CSS Stylesheet - White Glove Design System
   Target: 9.0+ UI/UX Score
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Montserrat:wght@400;500;600;700&display=swap');

/* ============================================================================
   1. DESIGN TOKENS & ROOT VARIABLES
   ============================================================================ */

:root {
  /* Brand Colors */
  --navy-primary: #19195F;
  --navy-dark: #0d0a3e;
  --gold-accent: #C9A84C;
  --gold-light: #F5E6D3;
  --gold-callout-light: #FEF3C7;
  --gold-callout-medium: #FDE68A;

  /* Semantic Colors */
  --success-green: #16a34a;
  --success-bg: #f0fdf4;
  --warning-amber: #f59e0b;
  --warning-bg: #fffbeb;
  --error-red: #dc2626;
  --error-bg: #fef2f2;

  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --black: #000000;

  /* Typography */
  --font-display: 'Playfair Display', serif;
  --font-body: 'Montserrat', sans-serif;

  /* Font Sizes */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-4xl: 40px;

  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;

  /* Gradients */
  --gradient-navy: linear-gradient(135deg, var(--navy-primary), var(--navy-dark));
  --gradient-gold: linear-gradient(135deg, var(--gold-accent), #c09950);
  --gradient-success: linear-gradient(135deg, #16a34a, #15803d);
  --gradient-callout: linear-gradient(135deg, var(--gold-callout-light), var(--gold-callout-medium));

  /* Accent Borders */
  --border-accent: 5px solid var(--navy-primary);
  --border-left-accent: 5px solid var(--navy-primary);
}

/* ============================================================================
   2. RESET & BASE STYLES
   ============================================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Safe area support for notched devices */
body {
  padding-bottom: max(80px, env(safe-area-inset-bottom));
}

/* Viewport meta tag support */
@supports (padding: max(0px)) {
  body {
    padding-bottom: max(80px, env(safe-area-inset-bottom));
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy-primary);
}

h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-xl);
}

h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

h4 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
}

h5, h6 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--gold-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #c09950;
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid var(--gold-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
}

input, textarea, select {
  font-family: var(--font-body);
}

/* ============================================================================
   3. ACCESSIBILITY UTILITIES
   ============================================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background-color: var(--navy-primary);
  color: var(--white);
  padding: var(--space-md);
  z-index: 1000;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--gold-accent);
}

:focus-visible {
  outline: 3px solid var(--gold-accent);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  :root {
    --gray-400: #6b7280;
    --gray-500: #4b5563;
  }

  body {
    border: 2px solid var(--navy-primary);
  }

  button, input, select, textarea {
    border-width: 2px !important;
  }
}

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

/* ============================================================================
   4. CONTAINER & LAYOUT UTILITIES
   ============================================================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

/* Flex utilities */
.flex-row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.flex-row-gap-8 {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-lg);
}

.flex-row-gap-4 {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-sm);
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-col-gap-8 {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.flex-col-gap-4 {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.flex-between {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-0 { gap: 0; }
.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }
.gap-6 { gap: var(--space-xl); }

/* Grid utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 768px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Visibility utilities */
.hidden {
  display: none !important;
}

.hidden-panel {
  display: none;
}

.visible {
  display: block !important;
}

.invisible {
  visibility: hidden;
}

/* ============================================================================
   5. SECTION NUMBERING SYSTEM (01, 02, 03)
   ============================================================================ */

.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy-primary);
  color: var(--white);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-right: var(--space-md);
}

.section-number.gold {
  background: var(--gold-accent);
  color: var(--navy-primary);
}

.section-divider {
  height: 2px;
  background: linear-gradient(90deg, var(--navy-primary), transparent);
  margin: var(--space-3xl) 0;
}

/* ============================================================================
   6. TYPOGRAPHY & TEXT UTILITIES
   ============================================================================ */

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }

.text-bold { font-weight: 700; }
.text-semibold { font-weight: 600; }
.text-medium { font-weight: 500; }

.text-navy { color: var(--navy-primary); }
.text-gold { color: var(--gold-accent); }
.text-gray { color: var(--gray-500); }
.text-white { color: var(--white); }
.text-success { color: var(--success-green); }
.text-error { color: var(--error-red); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 9px;
  font-weight: 600;
  color: var(--gray-500);
}

.info-text {
  font-size: var(--text-xs);
  color: var(--gray-500);
  margin-top: var(--space-sm);
}

/* ============================================================================
   7. BUTTONS & INTERACTIVE ELEMENTS
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  user-select: none;
  gap: var(--space-sm);
}

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

.btn:focus-visible {
  outline: 3px solid var(--gold-accent);
  outline-offset: 2px;
}

/* Primary Button */
.btn-primary {
  background: var(--gradient-navy);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-sm);
}

/* Gold/Accent Button */
.btn-accent {
  background: var(--gradient-gold);
  color: var(--navy-primary);
  box-shadow: var(--shadow-md);
  font-weight: 700;
}

.btn-accent:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-accent:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-sm);
}

/* Secondary Button */
.btn-secondary {
  background: var(--gray-100);
  color: var(--navy-primary);
  border: 2px solid var(--navy-primary);
}

.btn-secondary:hover {
  background: var(--navy-primary);
  color: var(--white);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  color: var(--navy-primary);
  border: 2px solid var(--navy-primary);
}

.btn-outline:hover {
  background: var(--navy-primary);
  color: var(--white);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--gold-accent);
}

.btn-ghost:hover {
  background: var(--gold-callout-light);
}

/* Success Button */
.btn-success {
  background: var(--gradient-success);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-success:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Size variants */
.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-lg) var(--space-2xl);
  font-size: var(--text-lg);
}

.btn-block {
  width: 100%;
}

/* Icon buttons */
.btn-icon {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--gray-100);
  color: var(--navy-primary);
}

.btn-icon:hover {
  background: var(--navy-primary);
  color: var(--white);
}

.btn-icon-nav {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--gray-500);
  transition: all var(--transition-base);
}

.btn-icon-nav.active {
  color: var(--gold-accent);
}

/* ============================================================================
   8. SVG ICON SYSTEM
   ============================================================================ */

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.5;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 32px;
  height: 32px;
}

.icon-xl {
  width: 48px;
  height: 48px;
}

.icon-navy {
  color: var(--navy-primary);
}

.icon-gold {
  color: var(--gold-accent);
}

.icon-success {
  color: var(--success-green);
}

.icon-error {
  color: var(--error-red);
}

.icon-white {
  color: var(--white);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--navy-primary), var(--navy-dark));
  color: var(--white);
  flex-shrink: 0;
}

.card-icon.gold {
  background: var(--gradient-gold);
  color: var(--navy-primary);
}

.card-icon.success {
  background: var(--gradient-success);
  color: var(--white);
}

/* ============================================================================
   9. FORM ELEMENTS
   ============================================================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.form-group.inline {
  flex-direction: row;
  align-items: center;
  gap: var(--space-lg);
}

.form-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--gray-500);
}

.form-label.required::after {
  content: ' *';
  color: var(--error-red);
}

.form-control {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-base);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  background-color: var(--white);
  font-family: var(--font-body);
}

.form-control:focus {
  outline: none;
  border-color: var(--navy-primary);
  box-shadow: 0 0 0 3px rgba(25, 18, 101, 0.1);
}

.form-control:disabled {
  background-color: var(--gray-100);
  color: var(--gray-500);
  cursor: not-allowed;
}

.form-control.error {
  border-color: var(--error-red);
  background-color: var(--error-bg);
}

.form-control.error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-control.success {
  border-color: var(--success-green);
  background-color: var(--success-bg);
}

.form-control.success:focus {
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* Textarea */
textarea.form-control {
  resize: vertical;
  min-height: 120px;
  font-family: var(--font-body);
}

/* Select dropdown */
select.form-control {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2319195F' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right var(--space-md) center;
  background-repeat: no-repeat;
  background-size: 20px;
}

/* Input group */
.input-group {
  display: flex;
  align-items: stretch;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-base);
}

.input-group:focus-within {
  border-color: var(--navy-primary);
  box-shadow: 0 0 0 3px rgba(25, 18, 101, 0.1);
}

.input-group .form-control {
  border: none;
  flex: 1;
}

.input-group-addon {
  padding: var(--space-md) var(--space-lg);
  background-color: var(--gray-100);
  color: var(--gray-500);
  font-weight: 600;
  white-space: nowrap;
}

/* Checkbox and Radio */
.form-checkbox, .form-radio {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  cursor: pointer;
}

.form-checkbox input[type="checkbox"],
.form-radio input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--navy-primary);
}

.form-checkbox input[type="checkbox"]:focus-visible,
.form-radio input[type="radio"]:focus-visible {
  outline: 3px solid var(--gold-accent);
  outline-offset: 2px;
}

.form-checkbox label,
.form-radio label {
  cursor: pointer;
}

/* Form validation messages */
.form-error {
  font-size: var(--text-xs);
  color: var(--error-red);
  margin-top: -var(--space-sm);
}

.form-success {
  font-size: var(--text-xs);
  color: var(--success-green);
  margin-top: -var(--space-sm);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--gray-500);
  margin-top: -var(--space-sm);
}

/* ============================================================================
   10. CARDS & PANELS
   ============================================================================ */

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card.accent {
  border-left: var(--border-left-accent);
}

.card.highlight {
  border: 2px solid var(--navy-primary);
  box-shadow: var(--shadow-md);
}

.card.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: var(--space-lg);
  background: var(--gradient-navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-base);
}

.card-header:hover {
  background: linear-gradient(135deg, #241d7b, #14114e);
}

.card-header.clickable:active {
  transform: scale(0.98);
}

.card-header-content {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex: 1;
}

.card-header-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0;
  color: var(--white);
}

.card-header-subtitle {
  font-size: var(--text-sm);
  color: var(--gold-light);
  margin: 0;
}

.card-chevron {
  width: 24px;
  height: 24px;
  transition: transform var(--transition-base);
  color: var(--gold-accent);
  flex-shrink: 0;
}

.card.collapsed .card-chevron {
  transform: rotate(180deg);
}

.card-body {
  padding: var(--space-lg);
  max-height: none;
  overflow: visible;
  transition: all var(--transition-base);
}

.card.collapsed .card-body {
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

.card-footer {
  padding: var(--space-lg);
  background-color: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.card-footer.no-border {
  border-top: none;
}

.card-section {
  margin-bottom: var(--space-xl);
}

.card-section:last-child {
  margin-bottom: 0;
}

.card-section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: var(--space-md);
}

/* ============================================================================
   11. CALLOUT BOXES & ALERTS
   ============================================================================ */

.callout-box {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border-left: 5px solid var(--gold-accent);
  background: var(--gradient-callout);
  margin: var(--space-lg) 0;
}

.callout-box.info {
  border-left-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.callout-box.success {
  border-left-color: var(--success-green);
  background: var(--success-bg);
}

.callout-box.warning {
  border-left-color: var(--warning-amber);
  background: var(--warning-bg);
}

.callout-box.error {
  border-left-color: var(--error-red);
  background: var(--error-bg);
}

.callout-title {
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: var(--space-sm);
}

.callout-text {
  font-size: var(--text-sm);
  color: var(--gray-800);
}

/* Alert */
.alert {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid;
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
}

.alert.success {
  background-color: var(--success-bg);
  border-color: var(--success-green);
  color: #166534;
}

.alert.info {
  background-color: #eff6ff;
  border-color: #3b82f6;
  color: #1e40af;
}

.alert.warning {
  background-color: var(--warning-bg);
  border-color: var(--warning-amber);
  color: #92400e;
}

.alert.error {
  background-color: var(--error-bg);
  border-color: var(--error-red);
  color: #991b1b;
}

.alert-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.alert-message {
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* ============================================================================
   12. BADGES & CHIPS
   ============================================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge.primary {
  background: var(--navy-primary);
  color: var(--white);
}

.badge.gold {
  background: var(--gold-accent);
  color: var(--navy-primary);
}

.badge.success {
  background: var(--success-green);
  color: var(--white);
}

.badge.warning {
  background: var(--warning-amber);
  color: var(--white);
}

.badge.error {
  background: var(--error-red);
  color: var(--white);
}

.badge.outline {
  background: transparent;
  border: 2px solid var(--navy-primary);
  color: var(--navy-primary);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================================================
   13. TABLES
   ============================================================================ */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

thead {
  background: var(--gradient-navy);
  color: var(--white);
}

thead th {
  padding: var(--space-lg);
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
}

tbody td {
  padding: var(--space-lg);
  border-top: 1px solid var(--gray-200);
  font-size: var(--text-sm);
}

tbody tr:hover {
  background-color: var(--gray-50);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Table variants */
table.striped tbody tr:nth-child(odd) {
  background-color: var(--gray-50);
}

table.striped tbody tr:nth-child(odd):hover {
  background-color: var(--gray-100);
}

/* ============================================================================
   14. CREDENTIALS BAR
   ============================================================================ */

.credentials-bar {
  background: var(--navy-primary);
  padding: var(--space-lg);
  border-top: 5px solid var(--gold-accent);
  text-align: center;
}

.credentials-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.credential {
  color: var(--white);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.credential strong {
  color: var(--gold-accent);
  font-weight: 700;
}

.footer-divider {
  color: var(--gold-accent);
  margin: 0 var(--space-lg);
  font-size: 12px;
}

/* ============================================================================
   15. FOOTER
   ============================================================================ */

.app-footer {
  background: var(--navy-primary);
  color: var(--white);
  padding: var(--space-3xl) var(--space-lg);
  margin-top: auto;
  border-top: 1px solid var(--navy-dark);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-header {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--gold-accent);
  margin-bottom: var(--space-lg);
}

.footer-section {
  margin-bottom: var(--space-2xl);
}

.footer-section h3 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold-accent);
  margin-bottom: var(--space-md);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-link {
  color: var(--gold-light);
  text-decoration: none;
  transition: color var(--transition-base);
  font-size: var(--text-sm);
}

.footer-link:hover {
  color: var(--gold-accent);
}

.footer-divider-line {
  height: 1px;
  background: var(--navy-dark);
  margin: var(--space-2xl) 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--gold-light);
}

.footer-license {
  font-size: var(--text-xs);
  color: var(--gold-light);
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
  }
}

/* ============================================================================
   16. NAVIGATION BAR (Sticky Bottom Tab Bar)
   ============================================================================ */

.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.nav-items {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-around;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-sm);
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--gray-500);
  text-decoration: none;
  border: none;
  background: none;
  font-family: var(--font-body);
}

.nav-item:focus-visible {
  outline: 3px solid var(--gold-accent);
  outline-offset: -1px;
}

.nav-item.active {
  color: var(--gold-accent);
}

.nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-indicator {
  position: absolute;
  bottom: 0;
  height: 3px;
  background: var(--gold-accent);
  transition: all var(--transition-base);
}

/* Hide nav bar on print */
@media print {
  .nav-bar {
    display: none !important;
  }
}

/* ============================================================================
   17. MODALS & OVERLAYS
   ============================================================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-lg);
  animation: fadeIn var(--transition-base);
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideInUp var(--transition-base);
}

.modal-header {
  padding: var(--space-2xl) var(--space-2xl) 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--navy-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--navy-primary);
}

.modal-body {
  padding: var(--space-2xl);
}

.modal-footer {
  padding: var(--space-2xl);
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: var(--space-lg);
  justify-content: flex-end;
}

.modal-actions {
  display: flex;
  gap: var(--space-lg);
  justify-content: flex-end;
}

.modal-confirm {
  background: var(--gradient-gold);
  color: var(--navy-primary);
  padding: var(--space-md) var(--space-2xl);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
}

.modal-confirm:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.modal-confirm:active {
  transform: scale(0.97);
}

.modal-cancel {
  background: transparent;
  color: var(--navy-primary);
  padding: var(--space-md) var(--space-2xl);
  border: 2px solid var(--navy-primary);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.modal-cancel:hover {
  background: var(--navy-primary);
  color: var(--white);
}

/* ============================================================================
   18. PROGRESS INDICATORS
   ============================================================================ */

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gray-200);
  z-index: 99;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-gold);
  transition: width var(--transition-slow) ease-out;
  box-shadow: 0 0 10px rgba(212, 168, 83, 0.5);
}

.progress-text {
  font-size: var(--text-xs);
  color: var(--gray-500);
  text-align: center;
  padding: var(--space-sm) 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Stepper Progress */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--space-2xl) 0;
}

.stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.stepper-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
  transition: all var(--transition-base);
}

.stepper-item.completed .stepper-number {
  background: var(--success-green);
  color: var(--white);
}

.stepper-item.active .stepper-number {
  background: var(--gold-accent);
  color: var(--navy-primary);
  box-shadow: 0 0 0 4px rgba(212, 168, 83, 0.2);
}

.stepper-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-500);
  text-align: center;
}

.stepper-item.active .stepper-label {
  color: var(--gold-accent);
}

.stepper-item.completed .stepper-label {
  color: var(--success-green);
}

.stepper-line {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--gray-200);
  z-index: -1;
}

.stepper-line.completed {
  background: var(--success-green);
}

.stepper-line.active {
  background: var(--gold-accent);
}

/* ============================================================================
   19. TOAST NOTIFICATIONS
   ============================================================================ */

.toast-container {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 2000;
  pointer-events: none;
}

.toast {
  background: var(--white);
  border-left: 5px solid var(--navy-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  min-width: 300px;
  pointer-events: auto;
  animation: slideInRight var(--transition-base);
}

.toast.success {
  border-left-color: var(--success-green);
}

.toast.error {
  border-left-color: var(--error-red);
}

.toast.warning {
  border-left-color: var(--warning-amber);
}

.toast.info {
  border-left-color: #3b82f6;
}

.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.toast-message {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--gray-800);
}

.toast-close {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .toast-container {
    left: var(--space-lg);
    right: var(--space-lg);
  }

  .toast {
    min-width: auto;
  }
}

/* ============================================================================
   20. ANIMATIONS & TRANSITIONS
   ============================================================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes checkmark {
  0% {
    stroke-dashoffset: 100;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

/* Success checkmark animation */
.success-checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.success-checkmark svg {
  width: 48px;
  height: 48px;
  stroke: var(--success-green);
  stroke-width: 2;
  fill: none;
}

.success-checkmark circle {
  animation: checkmark 0.5s ease-in-out;
  stroke-dasharray: 100;
}

.success-checkmark path {
  animation: checkmark 0.5s ease-in-out 0.2s both;
  stroke-dasharray: 50;
}

/* Skeleton loading shimmer */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 0%, var(--gray-200) 50%, var(--gray-100) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--radius-md);
}

.skeleton.text {
  height: 16px;
  margin-bottom: var(--space-sm);
}

.skeleton.text.title {
  height: 24px;
  margin-bottom: var(--space-lg);
}

/* ============================================================================
   21. ESTIMATE SPECIFIC STYLES
   ============================================================================ */

.estimate-section {
  margin-bottom: var(--space-3xl);
}

.estimate-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.scope-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--gray-200);
}

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

.scope-bullet {
  color: var(--gold-accent);
  font-size: var(--text-lg);
  flex-shrink: 0;
  margin-top: 2px;
}

.scope-content {
  flex: 1;
}

.scope-title {
  font-weight: 600;
  color: var(--navy-primary);
  margin-bottom: var(--space-xs);
}

.scope-description {
  font-size: var(--text-sm);
  color: var(--gray-600);
}

.scope-price {
  font-weight: 700;
  color: var(--navy-primary);
  font-size: var(--text-lg);
}

/* Estimate line items */
.line-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--gray-200);
}

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

.line-item-label {
  font-size: var(--text-sm);
  color: var(--gray-600);
}

.line-item-value {
  font-weight: 600;
  color: var(--navy-primary);
  font-size: var(--text-base);
}

.line-item.total {
  border-top: 2px solid var(--navy-primary);
  border-bottom: none;
  font-weight: 700;
  font-size: var(--text-lg);
}

.line-item.total .line-item-value {
  color: var(--gold-accent);
  font-size: var(--text-xl);
}

/* ============================================================================
   22. BLUEPRINT SECTION STYLES
   ============================================================================ */

.blueprint-section {
  margin-bottom: var(--space-3xl);
}

.blueprint-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-lg) 0;
}

.blueprint-item {
  background: var(--gray-50);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.blueprint-item:hover {
  border-color: var(--gold-accent);
  background: var(--gold-callout-light);
}

.blueprint-item-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
}

.blueprint-item-name {
  font-weight: 600;
  color: var(--navy-primary);
  margin-bottom: var(--space-xs);
}

.blueprint-item-description {
  font-size: var(--text-sm);
  color: var(--gray-600);
}

/* ============================================================================
   23. TAX & CHANGE ORDER STYLES
   ============================================================================ */

.tax-section {
  background: var(--warning-bg);
  border-left: var(--border-left-accent);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  margin: var(--space-lg) 0;
}

.tax-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--gray-300);
}

.tax-row:last-child {
  border-bottom: none;
}

.change-order-list {
  list-style: none;
}

.change-order-item {
  padding: var(--space-lg);
  background: var(--gray-50);
  border-left: 5px solid var(--gold-accent);
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-md);
}

.change-order-title {
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: var(--space-sm);
}

.change-order-amount {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--gold-accent);
}

/* ============================================================================
   24. COMPLIANCE STYLES
   ============================================================================ */

.compliance-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.compliance-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border-left: 5px solid var(--navy-primary);
}

.compliance-item.completed {
  background: var(--success-bg);
  border-left-color: var(--success-green);
}

.compliance-checkbox {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  cursor: pointer;
  accent-color: var(--navy-primary);
  margin-top: 2px;
}

.compliance-content {
  flex: 1;
}

.compliance-title {
  font-weight: 600;
  color: var(--navy-primary);
  margin-bottom: var(--space-xs);
}

.compliance-description {
  font-size: var(--text-sm);
  color: var(--gray-600);
}

/* ============================================================================
   25. DASHBOARD STYLES
   ============================================================================ */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-2xl) 0;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  transition: all var(--transition-base);
  border-left: 5px solid var(--navy-primary);
}

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

.stat-card.success {
  border-left-color: var(--success-green);
}

.stat-card.warning {
  border-left-color: var(--warning-amber);
}

.stat-card.error {
  border-left-color: var(--error-red);
}

.stat-label {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-500);
  margin-bottom: var(--space-md);
  font-weight: 600;
}

.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: var(--space-md);
}

.stat-change {
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.stat-change.positive {
  color: var(--success-green);
}

.stat-change.negative {
  color: var(--error-red);
}

/* ============================================================================
   26. SHARE/EXPORT STYLES
   ============================================================================ */

.share-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-lg) 0;
}

.share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  text-decoration: none;
  color: var(--navy-primary);
}

.share-option:hover {
  border-color: var(--gold-accent);
  background: var(--gold-callout-light);
  transform: translateY(-4px);
}

.share-icon {
  width: 40px;
  height: 40px;
  color: var(--navy-primary);
}

.share-label {
  font-weight: 600;
  font-size: var(--text-sm);
}

/* ============================================================================
   27. PRINT STYLES
   ============================================================================ */

@media print {
  * {
    box-shadow: none !important;
  }

  body {
    padding-bottom: 0;
  }

  .nav-bar,
  .modal-overlay,
  .toast-container,
  .btn-primary,
  .btn-accent,
  .btn-secondary,
  .btn-outline,
  button:not(.no-print),
  .no-print {
    display: none !important;
  }

  .card.collapsed .card-body {
    max-height: none !important;
    overflow: visible !important;
    padding: var(--space-lg) !important;
  }

  .card-header {
    page-break-inside: avoid;
    background: var(--gray-100) !important;
    color: var(--navy-primary) !important;
  }

  .card {
    page-break-inside: avoid;
    border: 1px solid var(--black) !important;
    box-shadow: none !important;
    margin-bottom: var(--space-2xl);
  }

  table {
    border-collapse: collapse;
    width: 100%;
  }

  thead {
    background: var(--gray-100) !important;
    color: var(--black) !important;
  }

  thead th {
    border: 1px solid var(--black);
    padding: var(--space-md);
  }

  tbody td {
    border: 1px solid var(--black);
    padding: var(--space-md);
  }

  a {
    color: var(--black);
    text-decoration: underline;
  }

  .credentials-bar {
    border: 1px solid var(--black);
    background: var(--white) !important;
    color: var(--black);
  }

  .credential {
    color: var(--black);
  }

  .credential strong {
    font-weight: 700;
  }

  h1, h2, h3, h4, h5, h6 {
    color: var(--black);
    page-break-after: avoid;
  }

  p, ul, ol {
    page-break-inside: avoid;
  }
}

/* ============================================================================
   28. RESPONSIVE DESIGN
   ============================================================================ */

/* Tablets (768px) */
@media (max-width: 768px) {
  :root {
    --text-4xl: 32px;
    --text-3xl: 28px;
  }

  .page-content {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }

  h1 {
    font-size: var(--text-3xl);
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

  .credentials-content {
    flex-direction: column;
    gap: var(--space-md);
  }

  .footer-divider {
    display: none;
  }

  .modal-content {
    max-height: 95vh;
  }

  .stepper {
    flex-wrap: wrap;
  }
}

/* Mobile (480px) */
@media (max-width: 480px) {
  :root {
    --text-3xl: 24px;
    --text-2xl: 20px;
  }

  body {
    font-size: 14px;
  }

  .page-content {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
  }

  h1 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-lg);
  }

  h2 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-md);
  }

  .card-header {
    padding: var(--space-lg);
  }

  .card-body {
    padding: var(--space-lg);
  }

  .table-wrapper {
    font-size: 12px;
  }

  table {
    font-size: 12px;
  }

  thead th {
    padding: var(--space-md);
  }

  tbody td {
    padding: var(--space-md);
  }

  .modal-content {
    margin: 0 auto;
    max-height: 95vh;
    width: 100%;
    border-radius: var(--radius-xl);
  }

  .modal-overlay {
    padding: var(--space-md);
  }

  .btn {
    padding: var(--space-md) var(--space-lg);
  }

  .btn-lg {
    padding: var(--space-lg) var(--space-lg);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
  }

  .estimate-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .blueprint-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .share-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Extra small (320px) */
@media (max-width: 320px) {
  .nav-label {
    font-size: 8px;
  }

  .toast {
    min-width: 250px;
  }

  .share-options {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   29. DARK MODE SUPPORT (Optional)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
  /* Can add dark mode support if needed */
  /* For now, keeping light mode as primary for White Glove brand */
}

/* ============================================================================
   30. UTILITY CLASSES
   ============================================================================ */

.margin-0 { margin: 0; }
.margin-auto { margin: auto; }
.margin-top-auto { margin-top: auto; }
.margin-bottom-auto { margin-bottom: auto; }

.padding-0 { padding: 0; }
.padding-lg { padding: var(--space-lg); }
.padding-2xl { padding: var(--space-2xl); }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.border-top { border-top: 1px solid var(--gray-200); }
.border-bottom { border-bottom: 1px solid var(--gray-200); }
.border-left { border-left: 5px solid var(--navy-primary); }

.bg-navy { background: var(--navy-primary); }
.bg-gold { background: var(--gold-accent); }
.bg-success { background: var(--success-green); }
.bg-warning { background: var(--warning-bg); }
.bg-gray { background: var(--gray-100); }
.bg-white { background: var(--white); }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }

.line-through { text-decoration: line-through; }

/* ============================================================================
   V3.5 ADDITIONS - Radio Groups, Tabs, Signatures, Approvals
   ============================================================================ */

/* Radio Groups */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  background: var(--white);
}

.radio-label:hover {
  border-color: var(--navy-primary);
  background: #f0f0ff;
}

.radio-label input[type="radio"] {
  accent-color: var(--navy-primary);
}

.radio-label input[type="radio"]:checked + span,
.radio-label:has(input:checked) {
  color: var(--navy-primary);
  border-color: var(--navy-primary);
  background: rgba(25, 18, 101, 0.05);
}

/* Checkbox Labels */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--navy-primary);
  width: 16px;
  height: 16px;
}

/* Tab Container */
.tab-container {
  margin-top: 12px;
}

.tab-buttons {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 16px;
}

.tab-button {
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.tab-button:hover {
  color: var(--navy-primary);
}

.tab-button.active {
  color: var(--navy-primary);
  border-bottom-color: var(--navy-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

/* Results Box */
.results-box {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 12px;
}

.results-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.results-row + .results-row {
  border-top: 1px solid #eef2f7;
}

.results-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.results-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.results-total {
  font-size: 18px;
  color: var(--navy-primary);
  font-weight: 700;
}

/* List Section */
.list-section {
  margin-top: 16px;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.list-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.item-count {
  font-size: 12px;
  color: var(--text-tertiary);
}

.list-items {
  min-height: 40px;
}

/* Signature Components */
.signature-wrapper {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 8px;
  background: white;
}

.signature-canvas {
  display: block;
  width: 100%;
  height: 120px;
  cursor: crosshair;
  touch-action: none;
}

.signature-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ccc;
  font-size: 14px;
  font-style: italic;
  pointer-events: none;
}

.signature-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.signature-date-text {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Approval Components */
.approval-status {
  margin-bottom: 16px;
}

.approval-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}

.approval-badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.approval-badge.approved {
  background: #dcfce7;
  color: #166534;
}

.approval-history {
  margin-top: 16px;
}

/* Stats Grid (Dashboard) */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy-primary);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Voice Status */
.voice-status {
  font-size: 12px;
  color: var(--text-tertiary);
  font-style: italic;
}

.voice-status.recording {
  color: #ef4444;
  font-weight: 600;
}

/* Offline Indicator */
.offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px;
  background: #f59e0b;
  color: white;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  color: var(--text-tertiary);
  transition: all 0.2s ease;
}

.drop-zone.drag-over {
  border-color: var(--navy-primary);
  background: rgba(25, 18, 101, 0.05);
}

/* Canvas Container */
.canvas-container {
  position: relative;
  width: 100%;
  margin: 12px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f8fafc;
  min-height: 200px;
}

.canvas-container canvas {
  display: block;
  width: 100%;
}

/* Bottom Buttons */
.bottom-buttons {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: white;
  border-top: 1px solid var(--color-border);
  position: sticky;
  bottom: 64px;
  z-index: 90;
}

.bottom-buttons .btn-primary,
.bottom-buttons .btn-secondary {
  flex: 1;
}

/* Button Small */
.btn-small {
  padding: 6px 12px !important;
  font-size: 12px !important;
}

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 400px;
  width: 90%;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 12px;
}

.modal-message {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.modal-cancel {
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font-body);
}

.modal-confirm {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--navy-primary);
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font-body);
}

.modal-cancel:hover { background: #f3f4f6; }
.modal-confirm:hover { opacity: 0.9; }

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .radio-group {
    flex-direction: column;
  }
  .bottom-buttons {
    bottom: 56px;
  }
}

/* ============================================================================
   JOB SITE READABLE — Minimum 14px text, most 16px+
   Construction workers need to read prices, quantities, and labels
   at arm's length, outdoors, in bright sun or low light.
   ============================================================================ */

/* ── Base Font Size Bump ── */
:root {
  --text-xs: 14px;   /* was 12px — nothing below 14px */
  --text-sm: 15px;   /* was 14px */
  --text-base: 17px; /* was 16px */
  --text-lg: 19px;   /* was 18px */
  --text-xl: 22px;   /* was 20px */
  --text-2xl: 26px;  /* was 24px */
}

/* ── Body text baseline ── */
body {
  font-size: 17px;
}

/* ── Nav Labels — were 10px! ── */
.nav-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── Card Content — everything readable ── */
.card-body {
  font-size: 16px;
  line-height: 1.6;
}

.card-body label,
.card-body .form-label {
  font-size: 15px;
  font-weight: 600;
}

/* ── Results / Prices — Must be crystal clear ── */
.results-label {
  font-size: 15px;
}

.results-value {
  font-size: 17px;
  font-weight: 700;
}

.results-total {
  font-size: 22px;
  font-weight: 800;
}

/* ── Stats Grid (Dashboard) ── */
.stat-value {
  font-size: 24px;
  font-weight: 800;
}

.stat-label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Item Rows — prices and quantities ── */
.item-name {
  font-size: 16px;
  font-weight: 600;
}

.item-price,
.item-qty,
.item-total,
.item-cost,
.line-total {
  font-size: 17px;
  font-weight: 700;
}

.item-detail,
.item-category,
.item-unit {
  font-size: 14px;
}

/* ── Search Results ── */
.search-result,
.search-item {
  font-size: 16px;
  padding: 14px 16px;
  min-height: 48px;
}

.search-result .price,
.search-item .price {
  font-size: 17px;
  font-weight: 700;
}

/* ── Template List ── */
.template-name {
  font-size: 16px;
  font-weight: 600;
}

/* ── Recent Items ── */
.recent-item {
  font-size: 15px;
  padding: 10px 14px;
  min-height: 44px;
}

/* ── Tab Buttons ── */
.tab-button {
  font-size: 15px;
}

/* ── Radio/Checkbox text ── */
.radio-label {
  font-size: 16px;
}

.checkbox-label {
  font-size: 15px;
}

/* ── Card Header Titles ── */
.card-title {
  font-size: 18px;
}

.card-subtitle,
.card-description {
  font-size: 15px;
}

/* ── Signature Section ── */
.signature-label {
  font-size: 15px;
}

/* ── Estimate Number / Version ── */
.estimate-number,
.version-tag {
  font-size: 15px;
}

/* ── Permit Costs ── */
.permit-total,
.permit-fee {
  font-size: 17px;
  font-weight: 700;
}

/* ── History Items ── */
.history-item {
  font-size: 15px;
}

.history-total {
  font-size: 17px;
  font-weight: 700;
}

/* ── Toast Notifications ── */
.toast {
  font-size: 16px;
}

/* ── Modal Text ── */
.modal-title {
  font-size: 20px;
}

.modal-message {
  font-size: 16px;
}

/* ── Catch-all: kill any remaining tiny text ── */
small,
.text-xs,
.text-sm,
.text-muted,
.helper-text,
.hint,
.caption,
.footnote {
  font-size: 14px;
  line-height: 1.5;
}

/* ── Mobile: even larger for outdoor reading ── */
@media (max-width: 480px) {
  body {
    font-size: 18px;
  }

  .card-body {
    font-size: 17px;
  }

  .results-value {
    font-size: 18px;
  }

  .results-total {
    font-size: 24px;
  }

  .item-price,
  .item-total,
  .line-total {
    font-size: 18px;
  }

  .stat-value {
    font-size: 26px;
  }

  .nav-label {
    font-size: 12px;
  }
}

/* ============================================================================
   FAT-FINGER FRIENDLY — Enlarged Touch Targets (min 48px)
   WCAG 2.2 Target Size (Level AAA) = 44px minimum
   Construction job site standard = 48-56px for gloved hands
   ============================================================================ */

/* ── Base Buttons — Bigger padding + min-height ── */
.btn {
  padding: 16px 28px;
  font-size: 16px;
  min-height: 52px;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 14px 22px;
  font-size: 15px;
  min-height: 48px;
}

.btn-lg {
  padding: 20px 36px;
  font-size: 18px;
  min-height: 56px;
}

.btn-small {
  padding: 12px 20px !important;
  font-size: 14px !important;
  min-height: 44px !important;
}

.btn-block {
  min-height: 52px;
}

/* ── Bottom Action Buttons (Reset / Calculate) ── */
.bottom-buttons {
  padding: 16px;
  gap: 12px;
}

.bottom-buttons .btn-primary,
.bottom-buttons .btn-secondary {
  min-height: 56px;
  font-size: 17px;
  font-weight: 700;
  border-radius: var(--radius-lg);
}

/* ── Radio Labels — Bigger touch targets ── */
.radio-label {
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  min-height: 48px;
  gap: 10px;
}

.radio-label input[type="radio"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
}

/* ── Checkbox Labels ── */
.checkbox-label {
  padding: 12px 16px;
  font-size: 15px;
  min-height: 48px;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
}

/* ── Form Inputs, Selects, Textareas ── */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="url"],
input[type="date"],
select,
textarea {
  min-height: 52px;
  padding: 14px 16px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

/* Prevent iOS zoom on focus (font-size >= 16px) */
input, select, textarea {
  font-size: 16px;
}

/* ── Bottom Navigation Bar ── */
.nav-item {
  padding: 12px 8px;
  min-height: 64px;
  gap: 6px;
}

.nav-icon {
  width: 28px;
  height: 28px;
}

.nav-label {
  font-size: 12px;
  font-weight: 600;
}

.bottom-nav {
  min-height: 68px;
}

/* ── Tab Buttons (MI Tax, etc.) ── */
.tab-button {
  padding: 14px 20px;
  font-size: 15px;
  min-height: 48px;
}

/* ── Card Headers (tap to collapse) ── */
.card-header {
  padding: 18px 20px;
  min-height: 60px;
  cursor: pointer;
}

.card-chevron {
  width: 28px;
  height: 28px;
  min-width: 28px;
}

/* ── Icon Buttons ── */
.btn-icon {
  padding: 14px;
  min-width: 48px;
  min-height: 48px;
}

.btn-icon-nav {
  min-width: 48px;
  min-height: 48px;
}

/* ── Search Input ── */
#searchInput {
  min-height: 52px;
  padding: 14px 16px;
  font-size: 16px;
}

/* ── Template Load/Delete Buttons ── */
.template-item button,
.template-actions button {
  padding: 12px 20px;
  min-height: 44px;
  font-size: 14px;
}

/* ── Item Row Actions (remove, quantity +/-) ── */
.item-actions button,
.qty-btn,
.remove-btn,
.delete-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  font-size: 18px;
}

/* ── Modal Buttons ── */
.modal-cancel,
.modal-confirm {
  padding: 14px 24px;
  min-height: 48px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

/* ── File Inputs ── */
input[type="file"] {
  padding: 14px;
  min-height: 48px;
}

/* ── Links inside cards (make tappable) ── */
.card-body a {
  display: inline-block;
  padding: 4px 2px;
  min-height: 44px;
  line-height: 36px;
}

/* ── Signature Clear/Submit Buttons ── */
#clearSignatureBtn,
#clearApprovalSigBtn,
#submitApprovalBtn {
  padding: 14px 24px !important;
  min-height: 48px !important;
  font-size: 15px !important;
}

/* ── Mobile-specific: even larger on small screens ── */
@media (max-width: 480px) {
  .btn {
    padding: 18px 24px;
    min-height: 56px;
    font-size: 17px;
  }

  .btn-small {
    padding: 14px 20px !important;
    min-height: 48px !important;
    font-size: 15px !important;
  }

  .radio-label {
    padding: 16px 20px;
    min-height: 52px;
    font-size: 16px;
  }

  .nav-item {
    min-height: 68px;
    padding: 14px 6px;
  }

  .nav-icon {
    width: 30px;
    height: 30px;
  }

  .bottom-buttons .btn-primary,
  .bottom-buttons .btn-secondary {
    min-height: 60px;
    font-size: 18px;
  }

  .card-header {
    padding: 20px;
    min-height: 64px;
  }

  .tab-button {
    padding: 16px 18px;
    min-height: 52px;
  }

  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  input[type="search"],
  select {
    min-height: 56px;
    font-size: 17px;
  }
}

/* ============================================================================
   FAT-FINGER FRIENDLY v2 — Catch ALL buttons missed in first pass
   Targets btn-primary / btn-secondary / btn-small directly (many buttons
   don't use a base .btn class so the earlier rules didn't apply)
   ============================================================================ */

/* ── Primary & Secondary buttons — universal minimum 52px ── */
.btn-primary,
.btn-secondary,
.btn-accent,
.btn-outline,
button[type="button"],
button[type="submit"] {
  min-height: 52px !important;
  padding: 14px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  border-radius: var(--radius-lg) !important;
  cursor: pointer;
}

/* ── btn-small — bump from 44px to 48px minimum ── */
.btn-small,
.btn-sm {
  min-height: 48px !important;
  padding: 12px 20px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

/* ── Camera, Voice, AI buttons — extra large (these are primary actions) ── */
#openCameraBtn,
#takePhotoBtn,
#analyzePhotoBtn,
#voiceButton,
#stopRecordingBtn {
  min-height: 56px !important;
  padding: 16px 28px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  width: 100%;
}

/* ── Blueprint tool buttons (Calibrate, Measure, Reset) ── */
#startCalibrationBtn,
#blueprintCalibrateBtn,
#blueprintMeasureBtn,
#blueprintModeToggle,
#resetBlueprintBtn,
#addBlueprintToEstimateBtn {
  min-height: 52px !important;
  padding: 14px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  margin: 4px !important;
}

/* ── Change Order buttons ── */
#createChangeOrderBtn,
#finalizeChangeOrderBtn,
#cancelChangeOrderBtn {
  min-height: 52px !important;
  padding: 14px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* ── Share/Export buttons ── */
#generateShareLinkBtn,
#copyShareLinkBtn,
#shareViaEmailBtn,
#shareViaTextBtn,
#generatePdfBtn,
#emailEstimateBtn {
  min-height: 52px !important;
  padding: 14px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* ── Signature Clear buttons ── */
#clearSignatureBtn,
#clearApprovalSigBtn {
  min-height: 48px !important;
  padding: 12px 24px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

/* ── Submit Approval button — extra prominent ── */
#submitApprovalBtn {
  min-height: 56px !important;
  padding: 16px 32px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  width: 100%;
}

/* ── Template, History, Search result action buttons ── */
.template-item button,
.template-actions button,
.history-item button,
.search-result button,
.search-results button {
  min-height: 48px !important;
  padding: 12px 20px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

/* ── Remove / Delete inline buttons (×) ── */
.btn-remove,
button[onclick*="removeProjectItem"],
button[onclick*="deleteRoom"],
button[onclick*="deleteTemplate"] {
  min-width: 48px !important;
  min-height: 48px !important;
  padding: 10px !important;
  font-size: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ── Compliance tab buttons ── */
#generateLienWaiverBtn,
#showMIOSHABtn {
  min-height: 52px !important;
  padding: 14px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* ── Dashboard refresh ── */
#refreshDashboardBtn {
  min-height: 52px !important;
  padding: 14px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* ── Save Template ── */
#saveTemplateBtn {
  min-height: 52px !important;
  padding: 14px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

/* ── Add Item submit button ── */
button[type="submit"] {
  min-height: 52px !important;
  padding: 14px 24px !important;
  font-size: 16px !important;
}

/* ── File input (Choose File) — can't style easily but bump container ── */
input[type="file"] {
  min-height: 52px !important;
  padding: 14px !important;
  font-size: 16px !important;
}

/* ── Mobile: Make everything even bigger ── */
@media (max-width: 768px) {
  .btn-primary,
  .btn-secondary,
  .btn-accent,
  .btn-outline,
  button[type="button"],
  button[type="submit"] {
    min-height: 56px !important;
    padding: 16px 24px !important;
    font-size: 17px !important;
  }

  .btn-small,
  .btn-sm {
    min-height: 52px !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
  }

  #openCameraBtn,
  #takePhotoBtn,
  #analyzePhotoBtn,
  #voiceButton,
  #stopRecordingBtn,
  #submitApprovalBtn {
    min-height: 60px !important;
    padding: 18px 28px !important;
    font-size: 18px !important;
  }

  .btn-remove,
  button[onclick*="removeProjectItem"],
  button[onclick*="deleteRoom"] {
    min-width: 52px !important;
    min-height: 52px !important;
    font-size: 22px !important;
  }
}

/* ============================================================================
   203K SOR IMPORT STYLES
   ============================================================================ */

/* Drop zone */
.sor-dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--gray-50);
}
.sor-dropzone:hover,
.sor-dropzone.drag-over {
  border-color: var(--gold-accent);
  background: var(--gold-callout-light);
}
.sor-dropzone svg {
  margin-bottom: var(--space-md);
}
.sor-dropzone p {
  margin: var(--space-xs) 0 0;
  font-size: var(--text-sm);
  color: var(--gray-600);
}

/* Status area */
.sor-status {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  margin: var(--space-lg) 0;
  text-align: center;
}

/* Results container */
.sor-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: 2px solid var(--navy-primary);
  margin-bottom: var(--space-lg);
}
.sor-results-header label {
  font-weight: 600;
  color: var(--navy-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* SOR category group */
.sor-category-group {
  margin-bottom: var(--space-xl);
}
.sor-category-header {
  background: linear-gradient(135deg, var(--navy-primary) 0%, #0d0a3e 100%);
  color: #fff;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font-weight: 700;
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.sor-category-header .sor-cat-num {
  background: var(--gold-accent);
  color: var(--navy-primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 800;
  flex-shrink: 0;
}

/* Individual SOR item row */
.sor-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--gray-200);
  background: #fff;
  transition: background var(--transition-base);
}
.sor-item:last-child {
  border-bottom: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.sor-item:hover {
  background: var(--gray-50);
}
.sor-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--navy-primary);
  flex-shrink: 0;
}
.sor-item-info {
  flex: 1;
  min-width: 0;
}
.sor-item-name {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sor-item-match {
  font-size: var(--text-xs);
  color: var(--gray-500);
  margin-top: 2px;
}
.sor-item-match.matched {
  color: var(--success-green);
}
.sor-item-match.unmatched {
  color: #d97706;
}
.sor-item-qty {
  width: 64px;
  text-align: center;
  padding: var(--space-sm);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-weight: 600;
}
.sor-item-price {
  min-width: 80px;
  text-align: right;
  font-weight: 600;
  color: var(--navy-primary);
}

/* Total bar */
.sor-total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  margin-top: var(--space-lg);
  border: 2px solid var(--navy-primary);
}
.sor-total-bar .sor-total-label {
  font-weight: 700;
  color: var(--navy-primary);
  font-size: var(--text-lg);
}
.sor-total-bar .sor-total-amount {
  font-weight: 800;
  color: var(--navy-primary);
  font-size: var(--text-xl);
}

/* Add to Estimate button */
#sor203kAddBtn {
  min-height: 56px !important;
  padding: 16px 28px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  width: 100%;
  margin-top: var(--space-lg);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .sor-item {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
  .sor-item-info {
    flex-basis: calc(100% - 36px);
  }
  .sor-item-qty {
    width: 56px;
  }
  .sor-item-price {
    min-width: 70px;
  }
  .sor-total-bar {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

/* ============================================================================
   END OF STYLESHEET
   ============================================================================ */
