/* JobQuote — premium mobile-first PWA styles */

:root {
  --green: #22c55e;
  --green-dark: #16a34a;
  --green-darker: #15803d;
  --green-light: #ecfdf5;
  --green-glow: rgba(34, 197, 94, 0.28);
  --navy: #1e293b;
  --navy-mid: #172033;
  --navy-dark: #0f172a;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-700: #334155;
  --white: #ffffff;
  --red: #ef4444;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 8px 20px rgba(15, 23, 42, 0.1), 0 24px 48px rgba(15, 23, 42, 0.1);
  --shadow-green: 0 4px 16px var(--green-glow);
  --nav-height: 80px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: #eef1f6;
  color: var(--navy-dark);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--white);
  position: relative;
  box-shadow: var(--shadow-lg);
}

/* Screens */
.screen {
  display: none;
  padding: 24px 20px calc(var(--nav-height) + var(--safe-bottom) + 24px);
  min-height: 100dvh;
  animation: fadeIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen.active {
  display: block;
}

.screen.no-nav {
  padding-bottom: calc(24px + var(--safe-bottom));
}

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

/* Typography */
.greeting {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 6px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.subtitle {
  font-size: 1.0625rem;
  color: var(--gray-500);
  margin-bottom: 28px;
  line-height: 1.45;
}

.section-title {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-top: 4px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  flex: 1;
  letter-spacing: -0.02em;
}

/* Summary card — premium navy hero */
.summary-card {
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-mid) 45%, var(--navy-dark) 100%);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  color: var(--white);
  margin-bottom: 32px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.summary-card h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  opacity: 0.7;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

.stat {
  text-align: center;
  padding: 0 8px;
  position: relative;
}

.stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.stat-value {
  font-size: 1.625rem;
  font-weight: 800;
  display: block;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.6875rem;
  opacity: 0.65;
  margin-top: 6px;
  line-height: 1.3;
  font-weight: 500;
}

/* Service grid — touch-friendly cards */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 8px;
}

.service-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 14px;
  background: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease, background 0.18s ease;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-dark);
  min-height: 118px;
  text-align: center;
  box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent;
}

.service-btn:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-xs);
  background: var(--green-light);
}

.service-btn .icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-light);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12);
  color: var(--green-dark);
}

.service-btn .icon svg {
  display: block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 17px 24px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  width: 100%;
  min-height: 56px;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: linear-gradient(180deg, #2dd46a 0%, var(--green) 50%, var(--green-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow-green);
}

.btn-primary:active {
  background: var(--green-darker);
  transform: scale(0.98);
  box-shadow: 0 2px 8px var(--green-glow);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--navy-dark);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:active {
  background: var(--gray-200);
  transform: scale(0.98);
}

.btn-outline {
  background: var(--white);
  border: 2px solid var(--gray-200);
  color: var(--navy-dark);
  box-shadow: var(--shadow-xs);
}

.btn-danger {
  color: #dc2626;
  border-color: #fecaca;
}

.btn-danger:active {
  background: #fef2f2;
}

.btn-sm {
  padding: 11px 18px;
  min-height: 42px;
  font-size: 0.875rem;
  width: auto;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 14px;
  background: var(--gray-100);
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-icon:active {
  transform: scale(0.94);
  background: var(--gray-200);
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
}

/* Cards */
.card {
  background: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy-dark);
  letter-spacing: -0.01em;
}

.card-meta {
  font-size: 0.8125rem;
  color: var(--gray-500);
  line-height: 1.5;
}

.card-price {
  font-size: 1.1875rem;
  font-weight: 800;
  color: var(--green-dark);
  letter-spacing: -0.02em;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.badge-quoted { background: #dbeafe; color: #1d4ed8; }
.badge-accepted { background: #fef3c7; color: #b45309; }
.badge-in-progress { background: #ede9fe; color: #6d28d9; }
.badge-completed { background: var(--green-light); color: var(--green-dark); }
.badge-paid { background: #d1fae5; color: #047857; }
.badge-lost { background: #fee2e2; color: #b91c1c; }

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 15px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  color: var(--navy-dark);
  background: var(--gray-50);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.form-group textarea {
  min-height: 108px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-top: 6px;
}

/* Price display */
.price-result {
  background: linear-gradient(180deg, var(--green-light) 0%, #d1fae5 100%);
  border: none;
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  text-align: center;
  margin: 28px 0;
  box-shadow: var(--shadow-green);
}

.price-result .recommended {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.price-result .range {
  font-size: 0.9375rem;
  color: var(--gray-700);
  margin-top: 10px;
  font-weight: 500;
}

.price-breakdown {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 18px;
  margin: 18px 0;
  font-size: 0.875rem;
  box-shadow: var(--shadow-xs);
}

.price-breakdown .line {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
}

.price-breakdown .line.total {
  border-top: 2px solid var(--gray-200);
  margin-top: 10px;
  padding-top: 12px;
  font-weight: 700;
}

/* Quote result summary */
.quote-result-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 24px;
}

.quote-result-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 20px 20px 18px;
}

.quote-result-header__service {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.quote-result-header__date {
  font-size: 0.875rem;
  opacity: 0.85;
  margin-top: 4px;
}

.quote-result-meta,
.quote-result-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
}

.quote-result-section:last-of-type {
  border-bottom: none;
}

.quote-result-section__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin: 0 0 12px;
}

.quote-result-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 0.9375rem;
  color: var(--gray-800);
}

.quote-result-row span:last-child {
  text-align: right;
  font-weight: 500;
  color: var(--gray-700);
}

.quote-result-row--highlight span:first-child {
  font-weight: 600;
  color: var(--navy);
}

.quote-result-row--highlight span:last-child {
  font-weight: 700;
  color: var(--navy);
}

.quote-result-card .price-result {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Quote preview */
.quote-preview {
  background: var(--gray-50);
  border: none;
  border-radius: var(--radius-lg);
  padding: 22px;
  font-size: 0.875rem;
  white-space: pre-wrap;
  line-height: 1.65;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: var(--shadow-xs);
}

/* Bottom nav — polished floating bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding: 8px 12px calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--gray-400);
  transition: color 0.2s ease, transform 0.15s ease;
  min-width: 60px;
  border-radius: 14px;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.nav-item .nav-icon {
  width: 44px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
  color: var(--gray-400);
}

.nav-item .nav-icon svg {
  display: block;
}

.nav-item.active {
  color: var(--green-dark);
}

.nav-item.active .nav-icon {
  background: var(--green-light);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.15);
  color: var(--green-dark);
}

.nav-item:active {
  transform: scale(0.92);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 56px 28px;
  color: var(--gray-500);
}

.empty-state .icon {
  font-size: 3.25rem;
  margin-bottom: 16px;
  opacity: 0.45;
}

.empty-state p {
  margin-bottom: 24px;
  line-height: 1.55;
  font-size: 0.9375rem;
}

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.photo-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--gray-100);
  position: relative;
  box-shadow: var(--shadow-xs);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-thumb .remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  border: none;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.photo-add {
  aspect-ratio: 1;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 0.75rem;
  gap: 6px;
  background: var(--gray-50);
  transition: border-color 0.15s, background 0.15s;
}

.photo-add:active {
  border-color: var(--green);
  background: var(--green-light);
}

.photo-add input {
  display: none;
}

/* Portfolio */
.portfolio-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 14px;
  margin-bottom: 18px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.portfolio-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: var(--gray-100);
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-700);
  box-shadow: var(--shadow-xs);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

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

.portfolio-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
}

.portfolio-item .ba-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.portfolio-item .ba-col {
  position: relative;
}

.portfolio-item .ba-col img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.portfolio-item .ba-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portfolio-item .info {
  padding: 14px 18px;
  background: var(--white);
}

/* Share templates */
.share-card {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
}

.share-card h4 {
  font-size: 0.875rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.share-card pre {
  font-family: var(--font);
  font-size: 0.8125rem;
  white-space: pre-wrap;
  color: var(--gray-700);
  line-height: 1.55;
}

/* Search */
.search-bar {
  margin-bottom: 18px;
}

.search-bar input {
  width: 100%;
  padding: 15px 16px 15px 46px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--gray-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") 16px center no-repeat;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--green);
  background-color: var(--white);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--navy-dark);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 150;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 12px 24px calc(28px + var(--safe-bottom));
  width: 100%;
  max-width: 430px;
  max-height: 90dvh;
  overflow-y: auto;
  animation: slideUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-lg);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-handle {
  width: 36px;
  height: 5px;
  background: var(--gray-300);
  border-radius: 999px;
  margin: 0 auto 20px;
}

/* Steps indicator */
.steps {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
}

.step-dot {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--gray-200);
  transition: background 0.2s ease;
}

.step-dot.active {
  background: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
}

.step-dot.done {
  background: var(--green-dark);
}

/* List item clickable */
.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent;
}

.list-item:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-xs);
}

.list-item .avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--green-light) 0%, #d1fae5 100%);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.15);
}

.list-item .info {
  flex: 1;
  min-width: 0;
}

.list-item .info h3 {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.list-item .info p {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-top: 2px;
}

.list-item .chevron {
  color: var(--gray-300);
  font-size: 1.375rem;
  font-weight: 300;
}

/* Install banner */
.install-banner {
  display: none;
  background: var(--green-light);
  border: none;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-green);
}

.install-banner.show {
  display: flex;
}

.install-banner p {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green-dark);
  line-height: 1.4;
}

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--navy-dark);
  cursor: pointer;
  padding: 10px 14px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  transition: background 0.15s, border-color 0.15s;
}

.checkbox-item:has(input:checked) {
  background: var(--green-light);
  border-color: rgba(34, 197, 94, 0.3);
}

.checkbox-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Dashboard Home ── */
#screen-home {
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 280px);
}

.welcome-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 22px 22px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.welcome-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.welcome-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-light) 0%, #d1fae5 100%);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.welcome-card__badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 5px 12px;
  border-radius: 999px;
}

.welcome-card__greeting {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy-dark);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 4px;
}

.welcome-card__business {
  font-size: 0.9375rem;
  color: var(--gray-500);
  font-weight: 500;
}

.revenue-card {
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-mid) 50%, var(--navy-dark) 100%);
  border-radius: var(--radius-xl);
  padding: 24px 22px;
  color: var(--white);
  margin-bottom: 16px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.revenue-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -15%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.18) 0%, transparent 68%);
  pointer-events: none;
}

.revenue-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.revenue-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  position: relative;
}

.revenue-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.revenue-card__label {
  font-size: 0.8125rem;
  font-weight: 600;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.revenue-card__amount {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 6px;
  position: relative;
}

.revenue-card__period {
  font-size: 0.8125rem;
  opacity: 0.55;
  font-weight: 500;
  position: relative;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

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

.dash-stat-card {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  color: var(--white);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.dash-stat-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.dash-stat-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.dash-stat-card__icon--green {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
}

.dash-stat-card__icon--blue {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
}

.dash-stat-card__icon--gold {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.dash-stat-card__icon--purple {
  background: rgba(139, 92, 246, 0.18);
  color: #a78bfa;
}

.dash-stat-card__value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
}

.dash-stat-card__label {
  font-size: 0.6875rem;
  opacity: 0.65;
  font-weight: 500;
  line-height: 1.3;
}

.activity-section {
  margin-bottom: 32px;
}

.activity-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.activity-section__header .section-title {
  margin-bottom: 0;
}

.activity-section__link {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--green-dark);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.activity-section__link:active {
  background: var(--green-light);
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid rgba(226, 232, 240, 0.5);
  -webkit-tap-highlight-color: transparent;
}

.activity-item:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-xs);
}

.activity-item__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-item__icon--quoted { background: #dbeafe; color: #1d4ed8; }
.activity-item__icon--accepted { background: #fef3c7; color: #b45309; }
.activity-item__icon--in-progress { background: #ede9fe; color: #6d28d9; }
.activity-item__icon--completed { background: var(--green-light); color: var(--green-dark); }
.activity-item__icon--paid { background: #d1fae5; color: #047857; }
.activity-item__icon--lost { background: #fee2e2; color: #b91c1c; }

.activity-item__body {
  flex: 1;
  min-width: 0;
}

.activity-item__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.activity-item__meta {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 2px;
}

.activity-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.activity-item__price {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--green-dark);
  letter-spacing: -0.02em;
}

.activity-empty {
  text-align: center;
  padding: 36px 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  border: 1px dashed var(--gray-200);
}

.activity-empty__icon {
  color: var(--gray-300);
  margin-bottom: 12px;
}

.activity-empty p {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.5;
}

.services-section {
  padding-top: 4px;
}

.services-section .subtitle {
  margin-bottom: 20px;
  margin-top: -6px;
  font-size: 0.9375rem;
}

/* Home screen spacing */
#screen-home .install-banner {
  margin-bottom: 20px;
}

/* ── Clients Module ── */
.client-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.client-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-xs);
}

.client-card__header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.client-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--green-light) 0%, #d1fae5 100%);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.15);
}

.client-card__title-block {
  flex: 1;
  min-width: 0;
}

.client-card__name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--navy-dark);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.client-card__chevron {
  color: var(--gray-300);
  font-size: 1.375rem;
  font-weight: 300;
  flex-shrink: 0;
}

.client-card__details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  padding-left: 62px;
}

.client-card__detail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.client-card__detail svg {
  flex-shrink: 0;
  color: var(--gray-400);
}

.client-card__footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
}

.client-card__stat-label {
  display: block;
  font-size: 0.6875rem;
  color: var(--gray-400);
  font-weight: 500;
  margin-bottom: 2px;
}

.client-card__stat-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy-dark);
}

.follow-up-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.follow-up-badge--ok {
  background: var(--green-light);
  color: var(--green-dark);
}

.follow-up-badge--soon {
  background: #fef3c7;
  color: #b45309;
}

.follow-up-badge--overdue {
  background: #fee2e2;
  color: #b91c1c;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.profile-section {
  margin-bottom: 28px;
}

.profile-section__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.profile-info-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 4px 0;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.6);
  overflow: hidden;
}

.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.875rem;
}

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

.profile-info-row span:first-child {
  color: var(--gray-500);
  font-weight: 500;
  flex-shrink: 0;
}

.profile-info-row span:last-child {
  color: var(--navy-dark);
  font-weight: 600;
  text-align: right;
}

.profile-info-row--name span:last-child {
  font-size: 1rem;
  font-weight: 700;
}

.profile-notes {
  padding: 14px 18px;
  border-top: 1px solid var(--gray-100);
}

.profile-notes span {
  display: block;
  font-size: 0.8125rem;
  color: var(--gray-500);
  font-weight: 500;
  margin-bottom: 6px;
}

.profile-notes p {
  font-size: 0.875rem;
  color: var(--navy-dark);
  line-height: 1.55;
}

.profile-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.profile-summary-card {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  color: var(--white);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.22);
}

.profile-summary-card--wide {
  grid-column: 1 / -1;
}

.profile-summary-card__value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 4px;
}

.profile-summary-card__label {
  font-size: 0.6875rem;
  opacity: 0.65;
  font-weight: 500;
}

.profile-empty {
  font-size: 0.875rem;
  color: var(--gray-500);
  padding: 16px;
  text-align: center;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
}

.job-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.job-history-item:active {
  transform: scale(0.98);
}

.job-history-item__service {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 2px;
}

.job-history-item__date {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.job-history-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.job-history-item__price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--green-dark);
  letter-spacing: -0.02em;
}

/* Jobs mode tabs */
.jobs-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: var(--gray-100);
  padding: 4px;
  border-radius: var(--radius);
}

.jobs-mode-tabs .tab-btn {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.jobs-mode-tabs .tab-btn.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-xs);
}

.pipeline-bar-wrap { margin-bottom: 20px; }

.pipeline-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--gray-100);
  gap: 2px;
}

.pipeline-bar__segment { min-width: 4px; }
.pipeline-bar__segment--quoted { background: #3b82f6; }
.pipeline-bar__segment--accepted { background: #f59e0b; }
.pipeline-bar__segment--in-progress { background: #8b5cf6; }
.pipeline-bar__segment--completed { background: var(--green); }
.pipeline-bar__segment--paid { background: #059669; }
.pipeline-bar__segment--lost { background: #ef4444; }

.pipeline-bar__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
}

.pipeline-bar__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gray-600);
}

.pipeline-bar__dot { width: 8px; height: 8px; border-radius: 50%; }
.pipeline-bar__dot--quoted { background: #3b82f6; }
.pipeline-bar__dot--accepted { background: #f59e0b; }
.pipeline-bar__dot--in-progress { background: #8b5cf6; }
.pipeline-bar__dot--completed { background: var(--green); }
.pipeline-bar__dot--paid { background: #059669; }
.pipeline-bar__dot--lost { background: #ef4444; }

.quote-history-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.6);
  cursor: pointer;
}

.quote-history-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.quote-id {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
  font-family: ui-monospace, monospace;
}

.quote-history-card__row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.875rem;
}

.quote-history-card__label { color: var(--gray-500); font-weight: 500; }
.quote-history-card__value { color: var(--gray-800); font-weight: 600; text-align: right; }

.quote-history-card__row--total {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--gray-100);
}

.quote-history-card__price {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--green-dark);
}

.quote-actions {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}

.quote-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  color: var(--gray-700);
  cursor: pointer;
}

.quote-action-btn--primary {
  background: var(--green-light);
  border-color: var(--green);
  color: var(--green-dark);
}

.quote-action-btn--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.pipeline-board { display: flex; flex-direction: column; gap: 20px; }

.pipeline-column__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.pipeline-column__dot { width: 10px; height: 10px; border-radius: 50%; }
.pipeline-column__dot--accepted { background: #f59e0b; }
.pipeline-column__dot--in-progress { background: #8b5cf6; }
.pipeline-column__dot--completed { background: var(--green); }
.pipeline-column__dot--paid { background: #059669; }

.pipeline-column__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
}

.pipeline-column__count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 999px;
}

.pipeline-column__cards { display: flex; flex-direction: column; gap: 8px; }

.pipeline-column__empty {
  font-size: 0.8125rem;
  color: var(--gray-400);
  font-style: italic;
}

.pipeline-job-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--gray-100);
  cursor: pointer;
}

.pipeline-job-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.pipeline-job-card__service {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--navy);
}

.pipeline-job-card__meta {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.pipeline-job-card__footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
  margin-top: 0;
  border-top: 1px solid var(--gray-100);
}

.pipeline-job-card__price { font-weight: 800; color: var(--green-dark); }

.pipeline-job-card__btn {
  padding: 6px 12px;
  min-height: 32px;
  font-size: 0.75rem;
}

.quote-detail-id {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
}

#screen-clients {
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 120px);
}

#screen-client-detail,
#screen-client-form {
  background: var(--gray-50);
}

@media (min-width: 431px) {
  body {
    background: #e2e8f0;
    padding: 24px 0;
  }

  #app {
    border-radius: var(--radius-xl);
    overflow: hidden;
  }
}
