/* MR. GOLFCART V2 — visual consistency sweep
   Presentation-only overrides. No workflow/data behavior. */

/* ------------------------------------------------------------------
   Generic action language on deeper editors/components.
   Deliberately scoped away from Calendar/Schedule and workflow badges.
   ------------------------------------------------------------------ */
.new-lead-actions .primary,
.buyer-picker-foot .primary,
.vendor-form-actions .primary,
.task-form-actions .primary,
.record-task-head .primary,
.messages-screen .message-composer-panel .message-form-actions [data-new-general-send],
.messages-screen .general-thread-panel [data-general-reply-send],
.record-message-panel .primary,
.inventory-editor-actions .primary,
.inventory-interest-actions .primary,
.ad-detail .primary,
.sales-posting-screen .inventory-editor-actions .primary,
.work-detail-shell button.primary,
.inspection-panel-v2 .primary,
.reputation-card .primary,
.transport-v2 .primary,
.inline-editor .primary,
.financial-modal-card .fin-btn.primary {
  min-height:42px;
  border:1px solid var(--green);
  border-radius:9px;
  background:var(--green);
  color:#fff;
  box-shadow:none;
  font-weight:900;
}

.new-lead-actions button:not(.primary),
.buyer-picker-foot .secondary,
.vendor-form-actions .secondary,
.task-form-actions .secondary,
.messages-screen .message-composer-panel .message-form-actions [data-new-general-cancel],
.messages-screen .general-thread-panel [data-general-thread-back],
.record-message-panel .secondary,
.inventory-editor-actions .secondary,
.inventory-interest-actions .secondary,
.ad-detail-toolbar button,
.sales-posting-screen .inventory-editor-actions .secondary,
.work-detail-shell button.secondary,
.inspection-panel-v2 .secondary,
.reputation-card .secondary,
.reputation-card .review-button-link.secondary,
.transport-v2 .secondary,
.attachments-panel .secondary,
.inline-editor button:not(.primary),
.financial-modal-card .fin-btn:not(.primary) {
  min-height:42px;
  border:1px solid #c7d2cc;
  border-radius:9px;
  background:#fff;
  color:var(--green);
  box-shadow:none;
  font-weight:850;
}

/* Normal actions do not use decorative top caps. */
.new-lead-actions .primary,
.vendor-form-actions .primary,
.task-form-actions .primary,
.messages-screen .message-composer-panel .message-form-actions [data-new-general-send],
.messages-screen .general-thread-panel [data-general-reply-send],
.ad-detail .primary,
.ad-detail-toolbar button,
.directory-card-create.account-new-job,
.directory-card-create.vendor-new-vendor {
  border-top-width:1px;
}

/* Directory create actions remain compact/light, but without a decorative cap. */
.directory-card-create.account-new-job,
.directory-card-create.vendor-new-vendor {
  border:1px solid #b9cbc1;
  border-radius:9px;
  background:#eef5f0;
  color:var(--green);
  box-shadow:none;
}

/* ------------------------------------------------------------------
   Filter selection language: filled green = selected.
   Counts inherit the selected foreground instead of adding another state.
   ------------------------------------------------------------------ */
.job-entry-filter-btn.active,
.inventory-view-filter.active,
.ads-filter-btn.active {
  border-color:var(--green);
  background:var(--green);
  color:#fff;
  box-shadow:none;
}
.job-entry-filter-btn.active strong,
.inventory-view-filter.active strong,
.ads-filter-btn.active strong {
  color:#fff;
}

/* ------------------------------------------------------------------
   Buyer picker: keep Buyer identity/selection blue; generic footer actions
   follow the application-wide green action language.
   ------------------------------------------------------------------ */
.buyer-picker-modal {
  width:100%;
  max-width:680px;
  max-height:min(92dvh,760px);
  overflow-y:auto;
  overscroll-behavior:contain;
}
.buyer-picker-foot button {
  border-radius:9px;
}
.buyer-picker-foot .primary {
  background:var(--green);
  border-color:var(--green);
  color:#fff;
}
.buyer-picker-foot .secondary {
  background:#fff;
  border-color:#c7d2cc;
  color:var(--green);
}

/* ------------------------------------------------------------------
   Forms/editors: keep controls inside their cards and use one field geometry.
   ------------------------------------------------------------------ */
.inventory-editor input,
.inventory-editor select,
.inventory-editor textarea,
.sales-posting-form input,
.sales-posting-form select,
.sales-posting-form textarea,
.work-core-edit-form input,
.work-core-edit-form select,
[data-work-cost-form] input,
[data-work-cost-form] select,
[data-work-cost-form] textarea,
.transport-v2 input,
.transport-v2 select,
.transport-v2 textarea,
.financial-modal-card input,
.financial-modal-card select,
.financial-modal-card textarea {
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  border:1px solid #c7d2cc;
  border-radius:8px;
  box-shadow:none;
}

/* Keep modal/sheet footers and content reachable on mobile. */
.financial-modal-card {
  width:min(100%,460px);
  max-height:calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y:auto;
  overscroll-behavior:contain;
}
.attachment-viewer-card {
  max-height:calc(100dvh - 36px);
}

/* Compact menus should be content-sized but remain inside a phone viewport. */
.job-list-tech-picker,
.mobile-ad-status-menu,
.account-job-menu,
.message-quick-menu {
  max-width:calc(100vw - 24px);
}

/* Ad record status is a control, not a workflow-color badge. */
.mobile-ad-status-btn {
  border-top-width:1px;
  padding-top:7px;
}

/* ------------------------------------------------------------------
   Intentionally NOT normalized here:
   - Buyer blue mode/cart selection and Buyer identity accents
   - Repair/Lithium workflow colors
   - Inventory blue workflow/status identity
   - Task/financial semantic status treatments
   - compact record-type/status badges
   - Calendar/Schedule controls and cards
   - global navigation/brand accents
   ------------------------------------------------------------------ */

/* Quick note composer on dedicated Repair/Lithium lists. */
.job-note-composer .primary {
  min-height:40px;
  border:1px solid var(--green);
  border-radius:9px;
  background:var(--green);
  color:#fff;
  box-shadow:none;
  font-size:11.5px;
  font-weight:900;
}
.job-note-composer .secondary {
  min-height:40px;
  border:1px solid #c7d2cc;
  border-radius:9px;
  background:#fff;
  color:var(--green);
  box-shadow:none;
  font-size:11.5px;
  font-weight:850;
}

/* Inventory destructive editor action keeps semantic danger treatment. */
.inventory-editor-actions .danger {
  min-height:42px;
  border:1px solid #dfc2c0;
  border-radius:9px;
  background:#fffafa;
  color:var(--danger);
  box-shadow:none;
  font-weight:850;
}

/* Financial state badges stay semantic; generic open-card chrome loses the old cap. */
.financial-v1-open-deal {
  border-top-width:1px;
}


/* ------------------------------------------------------------------
   Final deep-screen navigation consolidation.
   Ordinary Back controls are compact inline navigation, not full actions.
   Calendar/Schedule is intentionally excluded from this normalization.
   ------------------------------------------------------------------ */
.new-lead-toolbar [data-new-lead-back],
.global-search-toolbar [data-search-back],
.lead-detail-back,
.work-detail-back,
.inventory-detail-toolbar [data-inventory-back],
.inventory-detail-toolbar [data-back],
.inventory-detail-toolbar [data-ads-back],
.financial-v1-back,
.financial-toolbar [data-fin-action="back"],
.messages-screen .general-thread-panel [data-general-thread-back] {
  min-height:34px;
  padding:5px 2px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:var(--green);
  box-shadow:none;
  font-size:12px;
  font-weight:900;
}

/* Native Posted state uses MR. GOLFCART green instead of browser blue. */
.ad-detail .checkbox-label input[type="checkbox"] {
  accent-color:var(--green);
}

/* Vendor Text is a contact action, not a semantic blue workflow state. */
.vendor-text {
  background:#f4f7f5;
  color:var(--green);
  border-color:#c7d2cc;
}

/* 2026-10-01 list parity: Inventory and Ads use the same two-column desktop directory density as Repair/Lithium. */
@media (min-width:1000px) {
  .inventory-cards,
  .ads-cards {
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:start;
  }
}
