/**
 * Estimates tab visual language, matched to Home / Schedule / Jobs / Clients / Requests.
 * Scoped to #tab-estimates.estimates-2026. Create, send, and detail behavior stay as-is.
 */

#app-shell .app-main:has(#tab-estimates.estimates-2026:not(.is-hidden)) {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
  background: #eceef1;
}

#app-shell #tab-estimates.estimates-2026 {
  --est-ink: #1c1f26;
  --est-panel: #ffffff;
  --est-mist: #eceef1;
  --est-paper: #f4f5f7;
  --est-accent: #0369a1;
  --est-accent-hover: #025887;
  --est-line: color-mix(in srgb, var(--est-ink) 10%, transparent);
  --fd-blue: #0369a1;
  --fd-bg: #ffffff;
  --fd-bg-subtle: #ffffff;
  --fd-row-hover: #ffffff;
  --fd-row-selected: #ffffff;
  --font-est-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-est-body: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  font-family: var(--font-est-body);
  color: var(--est-ink);
  background: var(--est-mist);
  min-height: 100%;
}

#app-shell #tab-estimates.estimates-2026 .estimates-2026-page {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  background: var(--est-mist);
}

#app-shell #tab-estimates.estimates-2026 .estimates-hero {
  background: var(--est-paper);
  color: var(--est-ink);
  margin: 0;
  padding: 1.5rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--est-line);
  flex-shrink: 0;
}

@media (min-width: 900px) {
  #app-shell #tab-estimates.estimates-2026 .estimates-hero {
    padding: 1.85rem 2.25rem 1.4rem;
  }
}

@media (max-width: 767px) {
  #app-shell #tab-estimates.estimates-2026 .estimates-hero {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
}

#app-shell #tab-estimates.estimates-2026 .estimates-kicker {
  margin: 0 0 0.65rem;
  font-family: var(--font-est-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--est-ink) 45%, transparent);
}

#app-shell #tab-estimates.estimates-2026 .estimates-hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem 1.25rem;
}

#app-shell #tab-estimates.estimates-2026 .estimates-display {
  margin: 0;
  font-family: var(--font-est-display);
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--est-ink);
}

#app-shell #tab-estimates.estimates-2026 .estimates-hero-lead {
  margin: 0.75rem 0 0;
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--est-ink) 62%, transparent);
}

#app-shell #tab-estimates.estimates-2026 .estimates-hero-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem 0.85rem;
  margin-top: 1.15rem;
}

#app-shell #tab-estimates.estimates-2026 .estimates-view-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  background: var(--est-mist);
  border: 1px solid var(--est-line);
  border-radius: 1.15rem;
  flex: 1 1 100%;
  min-width: 0;
  max-width: 100%;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter {
  border: none;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-family: var(--font-est-display);
  font-size: 0.8125rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--est-ink) 50%, transparent);
  background: transparent;
  cursor: pointer;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="all"]:hover {
  color: var(--est-ink);
  background: rgba(3, 105, 161, 0.08);
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="all"].is-active,
#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="all"][aria-selected="true"] {
  background: rgba(3, 105, 161, 0.12);
  color: var(--est-accent);
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="draft"] {
  color: #475569;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="draft"]:hover {
  background: rgba(71, 85, 105, 0.1);
  color: #334155;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="draft"].is-active,
#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="draft"][aria-selected="true"] {
  background: #e2e8f0;
  color: #334155;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="sent"] {
  color: #0369a1;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="sent"]:hover {
  background: rgba(3, 105, 161, 0.1);
  color: #025887;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="sent"].is-active,
#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="sent"][aria-selected="true"] {
  background: #e0f2fe;
  color: #0369a1;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="accepted"] {
  color: #166534;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="accepted"]:hover {
  background: rgba(22, 101, 52, 0.1);
  color: #14532d;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="accepted"].is-active,
#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="accepted"][aria-selected="true"] {
  background: #dcfce7;
  color: #166534;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="declined"] {
  color: #9f1239;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="declined"]:hover {
  background: rgba(159, 18, 57, 0.1);
  color: #881337;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="declined"].is-active,
#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="declined"][aria-selected="true"] {
  background: #ffe4e6;
  color: #9f1239;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="expired"] {
  color: #c2410c;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="expired"]:hover {
  background: rgba(194, 65, 12, 0.1);
  color: #9a3412;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="expired"].is-active,
#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="expired"][aria-selected="true"] {
  background: #ffedd5;
  color: #9a3412;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="deposit_pending"] {
  color: #b45309;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="deposit_pending"]:hover {
  background: rgba(180, 83, 9, 0.1);
  color: #92400e;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="deposit_pending"].is-active,
#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="deposit_pending"][aria-selected="true"] {
  background: #fef3c7;
  color: #b45309;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="convertedToInvoice"] {
  color: #0f766e;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="convertedToInvoice"]:hover {
  background: rgba(15, 118, 110, 0.1);
  color: #115e59;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="convertedToInvoice"].is-active,
#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="convertedToInvoice"][aria-selected="true"] {
  background: #ccfbf1;
  color: #0f766e;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="voided"] {
  color: #6b7280;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="voided"]:hover {
  background: rgba(107, 114, 128, 0.12);
  color: #4b5563;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="voided"].is-active,
#app-shell #tab-estimates.estimates-2026 .estimates-filter[data-estimates-status="voided"][aria-selected="true"] {
  background: #e5e7eb;
  color: #4b5563;
}

#app-shell #tab-estimates.estimates-2026 .estimates-filter-count {
  margin-left: 0.35rem;
  font-size: 0.7rem;
  opacity: 0.7;
}

#app-shell #tab-estimates.estimates-2026 .estimates-add-btn {
  border-radius: 999px;
  font-family: var(--font-est-display);
  font-weight: 700;
  background: var(--est-accent);
  border-color: var(--est-accent);
  transform: none;
}

#app-shell #tab-estimates.estimates-2026 .estimates-add-btn:hover {
  background: var(--est-accent-hover);
  border-color: var(--est-accent-hover);
  transform: none;
}

#app-shell #tab-estimates.estimates-2026 .estimates-2026-body {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem 1.5rem;
}

@media (min-width: 900px) {
  #app-shell #tab-estimates.estimates-2026 .estimates-2026-body {
    padding: 1.15rem 2.25rem 1.75rem;
  }
}

#app-shell #tab-estimates.estimates-2026 .jobs-hub {
  flex: 1 1 0;
  min-height: 0;
  border: 1px solid var(--est-line);
  border-top: 1px solid var(--est-line);
  border-radius: 1.15rem;
  background: var(--est-panel);
  box-shadow: none;
  overflow: hidden;
}

#app-shell #tab-estimates.estimates-2026 .jobs-list-pane {
  background: var(--est-paper);
  border-right-color: var(--est-line);
}

#app-shell #tab-estimates.estimates-2026 .jobs-list-header {
  display: none;
}

#app-shell #tab-estimates.estimates-2026 .jobs-list-tools {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.95rem 0.95rem 0.65rem;
  border-bottom: 1px solid var(--est-line);
  background: var(--est-paper);
}

#app-shell #tab-estimates.estimates-2026 .jobs-list-search,
#app-shell #tab-estimates.estimates-2026 .records-hub-status {
  width: 100%;
  min-height: 2.5rem;
  border-radius: 999px !important;
  border: 1px solid var(--est-line);
  background: var(--est-panel);
  font-family: var(--font-est-body);
}

#app-shell #tab-estimates.estimates-2026 .jobs-list-tools .jobs-list-search-wrap {
  width: 100%;
}

#app-shell #tab-estimates.estimates-2026 .jobs-list-search:focus,
#app-shell #tab-estimates.estimates-2026 .records-hub-status:focus {
  border-color: var(--est-accent);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.14);
}

#app-shell #tab-estimates.estimates-2026 .jobs-list-subtitle {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--est-ink) 42%, transparent);
}

#app-shell #tab-estimates.estimates-2026 .docs-bulk-toolbar {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--est-line);
  border-radius: 0.85rem;
  background: var(--est-panel);
  box-shadow: none;
}

#app-shell #tab-estimates.estimates-2026 .jobs-list {
  padding: 0.45rem 0.5rem 1rem;
  gap: 0.1rem;
  background: var(--est-paper);
}

#app-shell #tab-estimates.estimates-2026 .docs-list-card,
#app-shell #tab-estimates.estimates-2026 .docs-list-card:hover,
#app-shell #tab-estimates.estimates-2026 .docs-list-card:active,
#app-shell #tab-estimates.estimates-2026 .docs-list-card:focus,
#app-shell #tab-estimates.estimates-2026 .docs-list-card:focus-visible,
#app-shell #tab-estimates.estimates-2026 .docs-list-card.is-selected,
#app-shell #tab-estimates.estimates-2026 .docs-list-card.is-selected:hover,
#app-shell #tab-estimates.estimates-2026 .docs-list-card.is-checked,
#app-shell #tab-estimates.estimates-2026 .docs-list-card.is-active {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.4rem;
  flex: 0 0 auto;
  position: relative;
  border-radius: 0.85rem !important;
  padding: 0.75rem 0.8rem 0.75rem 0.65rem;
  background: var(--est-panel) !important;
  -webkit-tap-highlight-color: transparent;
}

#app-shell #tab-estimates.estimates-2026 .docs-list-card.is-selected,
#app-shell #tab-estimates.estimates-2026 .docs-list-card.is-active {
  border-left-color: transparent !important;
  box-shadow: 0 0 0 1px var(--est-line) !important;
}

#app-shell #tab-estimates.estimates-2026 .docs-list-card.is-selected::before,
#app-shell #tab-estimates.estimates-2026 .docs-list-card.is-active::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  top: 0.55rem;
  bottom: 0.55rem;
  left: 0.2rem;
  width: 3px !important;
  border-radius: 999px;
  background: var(--est-accent) !important;
}

#app-shell #tab-estimates.estimates-2026 .docs-list-card-body {
  gap: 0.12rem;
}

#app-shell #tab-estimates.estimates-2026 .jobs-list-card-title {
  font-family: var(--font-est-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

#app-shell #tab-estimates.estimates-2026 .jobs-list-card-client,
#app-shell #tab-estimates.estimates-2026 .jobs-list-card-amount {
  display: block;
  color: color-mix(in srgb, var(--est-ink) 58%, transparent);
  font-size: 0.8125rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app-shell #tab-estimates.estimates-2026 .jobs-list-card-meta {
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--est-ink) 55%, transparent);
}

#app-shell #tab-estimates.estimates-2026 .estimates-list-flag {
  display: inline-flex;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #e8eef3;
  color: color-mix(in srgb, var(--est-ink) 62%, transparent);
  font-family: var(--font-est-display);
  font-size: 0.68rem;
  font-weight: 700;
}

#app-shell #tab-estimates.estimates-2026 .estimates-list-flag--draft {
  background: #e2e8f0;
  color: #334155;
}

#app-shell #tab-estimates.estimates-2026 .estimates-list-flag--sent {
  background: #e0f2fe;
  color: #0369a1;
}

#app-shell #tab-estimates.estimates-2026 .estimates-list-flag--approved {
  background: #dcfce7;
  color: #166534;
}

#app-shell #tab-estimates.estimates-2026 .estimates-list-flag--converted {
  background: #ccfbf1;
  color: #0f766e;
}

#app-shell #tab-estimates.estimates-2026 .estimates-list-flag--deposit {
  background: #fef3c7;
  color: #b45309;
}

#app-shell #tab-estimates.estimates-2026 .estimates-list-flag--declined {
  background: #ffe4e6;
  color: #9f1239;
}

#app-shell #tab-estimates.estimates-2026 .estimates-list-flag--expired {
  background: #ffedd5;
  color: #9a3412;
}

#app-shell #tab-estimates.estimates-2026 .estimates-list-flag--voided,
#app-shell #tab-estimates.estimates-2026 .estimates-list-flag--closed {
  background: #e5e7eb;
  color: #4b5563;
}

#app-shell #tab-estimates.estimates-2026 .jobs-list-empty {
  margin: 1rem 0.75rem;
  color: color-mix(in srgb, var(--est-ink) 55%, transparent);
}

#app-shell #tab-estimates.estimates-2026 .jobs-detail-pane {
  background: var(--est-panel);
  padding: 1.1rem 1.25rem 1.6rem;
}

#app-shell #tab-estimates.estimates-2026 .jobs-detail-empty {
  border: 1px dashed var(--est-line);
  border-radius: 1rem;
  background: var(--est-paper);
  box-shadow: none;
}

#app-shell #tab-estimates.estimates-2026 .jobs-detail-empty-title,
#app-shell #tab-estimates.estimates-2026 .hub-form-section-title,
#app-shell #tab-estimates.estimates-2026 .portal-title,
#app-shell #tab-estimates.estimates-2026 .detail-panel-title {
  font-family: var(--font-est-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--est-ink);
}

#app-shell #tab-estimates.estimates-2026 .portal-header--detail {
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--est-line);
}

#app-shell #tab-estimates.estimates-2026 .portal-title {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

#app-shell #tab-estimates.estimates-2026 .portal-edit-btn {
  border-radius: 999px;
}

#app-shell #tab-estimates.estimates-2026 .hub-form--embedded,
#app-shell #tab-estimates.estimates-2026 .portal-detail {
  border: none;
  box-shadow: none;
  background: transparent;
}

#app-shell #tab-estimates.estimates-2026 .detail-layout {
  gap: 0.85rem;
}

#app-shell #tab-estimates.estimates-2026 .detail-card,
#app-shell #tab-estimates.estimates-2026 .detail-panel {
  border: 1px solid var(--est-line);
  border-radius: 1.05rem;
  background: var(--est-panel);
  box-shadow: none;
  padding: 1rem 1.1rem 1.05rem;
}

#app-shell #tab-estimates.estimates-2026 .detail-card--summary {
  background: var(--est-paper);
}

#app-shell #tab-estimates.estimates-2026 .detail-doc-amount-label {
  font-family: var(--font-est-display);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--est-ink) 45%, transparent);
}

#app-shell #tab-estimates.estimates-2026 .detail-doc-amount-value {
  font-family: var(--font-est-display);
  font-size: clamp(1.7rem, 2.6vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--est-ink);
}

#app-shell #tab-estimates.estimates-2026 .detail-doc-meta,
#app-shell #tab-estimates.estimates-2026 .detail-hero-date {
  color: color-mix(in srgb, var(--est-ink) 55%, transparent);
}

#app-shell #tab-estimates.estimates-2026 .badge {
  border-radius: 999px;
  font-family: var(--font-est-display);
  font-weight: 700;
}

#app-shell #tab-estimates.estimates-2026 .workflow-progress-label,
#app-shell #tab-estimates.estimates-2026 .detail-actions-label,
#app-shell #tab-estimates.estimates-2026 .detail-panel-title {
  font-family: var(--font-est-display);
  letter-spacing: 0.08em;
}

#app-shell #tab-estimates.estimates-2026 .workflow-step-marker {
  border-radius: 999px;
}

#app-shell #tab-estimates.estimates-2026 .detail-actions-group--records {
  border-top-color: var(--est-line);
}

#app-shell #tab-estimates.estimates-2026 .detail-card--lines .portal-empty {
  margin: 0.35rem 0 0.75rem;
  padding: 0.85rem 0.9rem;
  border: 1px dashed var(--est-line);
  border-radius: 0.85rem;
  background: var(--est-paper);
}

#app-shell #tab-estimates.estimates-2026 .detail-totals {
  background: var(--est-paper);
  border-radius: 0.85rem;
  padding: 0.75rem 0.9rem;
}

#app-shell #tab-estimates.estimates-2026 .workflow-related-link,
#app-shell #tab-estimates.estimates-2026 .detail-value-link {
  color: var(--est-accent);
  font-weight: 600;
}

#app-shell #tab-estimates.estimates-2026 .jobs-hub .btn-primary,
#app-shell #tab-estimates.estimates-2026 .jobs-hub .btn-secondary,
#app-shell #tab-estimates.estimates-2026 .jobs-hub .btn-danger {
  border-radius: 999px;
  font-family: var(--font-est-display);
  font-weight: 600;
  transform: none;
}

#app-shell #tab-estimates.estimates-2026 .jobs-hub .btn-primary {
  background: var(--est-accent);
  border-color: var(--est-accent);
}

@media (max-width: 767px) {
  #app-shell #tab-estimates.estimates-2026 .estimates-2026-body {
    padding: 0.85rem 1.15rem 1.25rem;
  }

  #app-shell #tab-estimates.estimates-2026 .estimates-2026-page,
  #app-shell #tab-estimates.estimates-2026 .estimates-2026-body,
  #app-shell #tab-estimates.estimates-2026 .jobs-hub {
    flex: none;
    min-height: auto;
    overflow: visible;
  }
}
