/* Filed OPS — workspace design system | All-pages release 2026-09-23
   Follows the customer-provided fieldops-inicio.html: restrained sheet, typography,
   flat divider-led information, accessible controls, lightweight navigation.
   Presentation only. All real data, permissions and writes remain server-owned.
   Loaded LAST after app.css, ui-refinement.css, ui-pro.css and fieldops-inicio.css.
*/
.crm-body {
  --fw-canvas:#eef1f5;
  --fw-sheet:#fff;
  --fw-text:#0e1726;
  --fw-secondary:#3b475a;
  --fw-muted:#64728a;
  --fw-faint:#98a3b5;
  --fw-line:#e1e6ed;
  --fw-line2:#edf0f5;
  --fw-hover:#f3f5f8;
  --fw-focus:color-mix(in srgb, var(--brand) 12%,transparent);
  --fw-soft:color-mix(in srgb,var(--brand) 9%,white);
  --fw-sheet-shadow:0 1px 2px rgba(14,23,38,.035);
  --ui-bg:var(--fw-canvas);
  --ui-card:var(--fw-sheet);
  --ui-ink:var(--fw-text);
  --ui-muted:var(--fw-muted);
  --ui-line:var(--fw-line);
  --pro-bg:var(--fw-canvas);
  --pro-surface:var(--fw-sheet);
  --pro-title:var(--fw-text);
  --pro-body:var(--fw-secondary);
  --pro-subtle:var(--fw-muted);
  --pro-border:var(--fw-line);
  --pro-shadow:none;
  --ux-title:var(--fw-text);
  --ux-text-soft:var(--fw-muted);
  --ux-card-border:var(--fw-line);
  --ux-card-shadow:none;
  --ux-card-shadow-soft:none;
  color:var(--fw-text);
  background:var(--fw-canvas)!important;
  font-size:14px;
  font-weight:400;
  line-height:1.46;
  font-variant-numeric:tabular-nums;
}
/* 01 | Navigation and common page frame. Match the Início reference on ALL modules. */
.crm-body .main {background:var(--fw-canvas)!important;}
.crm-body .main .content {
  background:var(--fw-sheet)!important;
  color:var(--fw-text);
  border:1px solid var(--fw-line)!important;
  box-shadow:none!important;
  border-radius:16px!important;
  padding:clamp(22px,2.6vw,40px) clamp(17px,3vw,42px) 46px!important;
  margin-right:16px!important;
  width:calc(100% - 16px)!important;
  min-height:calc(100dvh - 132px);
  max-width:none!important;
}
.crm-body .main .content > :not(.flash) {min-width:0;}
.crm-body .topbar {height:60px!important;min-height:60px!important;flex-basis:60px!important;background:var(--fw-canvas)!important;border:0!important;box-shadow:none!important;}
.crm-body .sidebar {background:var(--fw-canvas)!important;border-right:0!important;box-shadow:none!important;}
.crm-body .sidebar-top {border:0!important;}
.crm-body .nav.fi-nav > a,
.crm-body .nav.fi-nav .fi-nav-footer > a {min-height:35px;border-radius:8px;font-size:13px;font-weight:500;letter-spacing:0;border:0;box-shadow:none;}
.crm-body .nav.fi-nav > a:hover,
.crm-body .nav.fi-nav .fi-nav-footer > a:hover {background:var(--fw-hover)!important;}
.crm-body .nav.fi-nav > a.active,
.crm-body .nav.fi-nav .fi-nav-footer > a.active {background:var(--fw-sheet)!important;color:var(--fw-text)!important;box-shadow:inset 0 0 0 1px var(--fw-line),var(--fw-sheet-shadow)!important;}
.crm-body .nav.fi-nav .ux-nav-label {font-size:11px;font-weight:500;letter-spacing:0;color:var(--fw-muted);padding:14px 10px 7px;}
.crm-body .nav.fi-nav .nav-create {background:var(--fw-sheet)!important;border:1px solid var(--fw-line)!important;box-shadow:var(--fw-sheet-shadow)!important;height:40px;min-height:40px;border-radius:8px;}
.crm-body .nav.fi-nav .nav-create:hover {background:var(--fw-hover)!important;}
.crm-body .nav .nav-icon .icon-svg svg {width:17px;height:17px;}
.crm-body .sidebar-collapse-control {border-radius:9px!important;box-shadow:var(--fw-sheet-shadow)!important;background:var(--fw-sheet)!important;color:var(--fw-secondary)!important;border:1px solid var(--fw-line)!important;}
.crm-body .global-search input {background:var(--fw-sheet)!important;border:1px solid var(--fw-line)!important;box-shadow:var(--fw-sheet-shadow)!important;border-radius:9px!important;}
.crm-body .user-menu {border-radius:9px;}
.crm-body .crm-footer {background:var(--fw-canvas)!important;color:var(--fw-muted)!important;border:0!important;}

/* 02 | Heading scale shared by every page — no noisy uppercase micro-headings. */
.crm-body .main .content :is(h1,h2,h3,.section-title) {letter-spacing:-.015em;color:var(--fw-text);}
.crm-body :is(.page-head,.modern-page-head,.form-page-head,.detail-page-head,.settings-tabs-page-head,.schedule-toolbar,.finance-head) {margin-bottom:26px;gap:16px;}
.crm-body :is(.page-head,.modern-page-head,.settings-tabs-page-head,.finance-head) :is(h1,h2),
.crm-body .schedule-title h1 {font-size:clamp(25px,2.5vw,32px)!important;font-weight:620!important;line-height:1.14;letter-spacing:-.027em;margin:5px 0 8px;}
.crm-body :is(.page-head,.modern-page-head,.settings-tabs-page-head,.finance-head) p {font-size:13.5px!important;color:var(--fw-muted)!important;line-height:1.6;max-width:75ch;}
.crm-body .eyebrow {font-size:11px;letter-spacing:.018em;color:var(--fw-muted);font-weight:650;}
.crm-body :is(.section-title,.settings-section-title,.finance-panel-head h2) {font-size:15.5px!important;font-weight:650!important;letter-spacing:-.01em;color:var(--fw-text)!important;}
.crm-body .section-title-row {align-items:center;gap:12px;}
.crm-body :is(.muted,.table-sub,.page-description,.helper-text,.form-help) {color:var(--fw-muted)!important;}

/* 03 | Cards are quiet, compact groups. A thin divider carries hierarchy. */
.crm-body .main .content :is(.card,.data-card,.modern-card,.settings-card,.panel,.document-card,.finance-panel,.subscription-overview-card,.billing-mini-card,.settings-branding-card,.settings-preference-card,.team-plan-usage,.marketing-source-card,.time-clock-card) {
  background:var(--fw-sheet)!important;
  border:1px solid var(--fw-line)!important;
  border-radius:12px!important;
  box-shadow:none!important;
}
.crm-body .main .content :is(.card-pad,.integration-card,.finance-panel) {padding:clamp(15px,2vw,22px);}
.crm-body .grid {gap:16px;}
.crm-body :is(.stat,.finance-metric,.lead-summary-card) {min-height:0;box-shadow:none!important;}
.crm-body :is(.stat,.finance-metric) .label {color:var(--fw-muted);font-size:12.5px;font-weight:500;letter-spacing:0;}
.crm-body :is(.stat,.finance-metric) .value {color:var(--fw-text);font-size:27px;font-weight:570;letter-spacing:-.03em;}
.crm-body .main .content :is(.badge,.status-filter b,.source-filter-chip b) {font-weight:600;border-radius:999px;}
.crm-body :is(.mini-empty,.rich-empty-state,.empty-state,.finance-empty) {background:transparent;border-color:var(--fw-line2);}

/* 04 | Buttons, inputs, data safety. Keep visible keyboard focus but no thick rings. */
.crm-body :is(.btn,.icon-btn,.sidebar-collapse-control,.top-icon,.status-filter,.source-filter-chip,.settings-tab) {transition:background-color .14s,border-color .14s,color .14s;box-shadow:none;}
.crm-body .btn {font-size:13px;font-weight:580;border-radius:8px;min-height:38px;padding:8px 13px;}
.crm-body .btn-primary {background:var(--brand);box-shadow:none!important;color:white;}
.crm-body .btn-secondary {background:var(--fw-sheet);border:1px solid var(--fw-line);color:var(--fw-secondary);box-shadow:none!important;}
.crm-body .btn-secondary:hover {background:var(--fw-hover);border-color:color-mix(in srgb,var(--fw-muted) 30%,var(--fw-line));}
.crm-body .icon-btn {width:35px;min-width:35px;height:35px;border-radius:8px;border:1px solid var(--fw-line);background:var(--fw-sheet);box-shadow:none;}
.crm-body :is(.input,.select,.textarea,input[type="search"],input[type="email"],input[type="text"],input[type="tel"],input[type="number"],input[type="date"],input[type="datetime-local"]) {
  min-width:0;min-height:38px;max-width:100%;border:1px solid var(--fw-line);border-radius:8px;background:var(--fw-sheet);color:var(--fw-text);box-shadow:var(--fw-sheet-shadow);
}
.crm-body :is(.input,.select,.textarea,input,select,textarea):focus,
.crm-body :is(.input,.select,.textarea,input,select,textarea):focus-visible {
  outline:none!important;
  border-color:color-mix(in srgb,var(--brand) 52%,var(--fw-line))!important;
  box-shadow:0 0 0 2px var(--fw-focus)!important;
}
.crm-body :is(a,button,[tabindex]):focus-visible {outline:2px solid color-mix(in srgb,var(--brand) 52%,white)!important;outline-offset:2px!important;}
.crm-body .form-group {gap:7px;min-width:0;}
.crm-body .form-group>label {font-size:12px;font-weight:580;color:var(--fw-secondary);}
.crm-body .form-group>small {font-size:11.5px;line-height:1.6;color:var(--fw-muted);}
.crm-body :is(.input,.select,.textarea)::placeholder {color:var(--fw-faint);}
.crm-body .input-with-icon {min-width:0;}
.crm-body .input-with-icon :is(.icon-svg,svg) {color:var(--fw-muted);}
.crm-body :is(.custom-file-picker,.color-input-row) {min-width:0;}
.crm-body .form-page-actions {border-top:1px solid var(--fw-line2);padding-top:16px;}
.crm-body .check-row {background:var(--fw-sheet);border:1px solid var(--fw-line);padding:12px 14px;border-radius:9px;}
.crm-body :is(input[type="checkbox"],input[type="radio"]) {accent-color:var(--brand);}

/* 05 | Search and list views: edge-to-edge quiet tabular data. */
.crm-body :is(.list-toolbar,.lead-filter-card,.inbox-filter-card,.expense-filter-card,.notification-center-toolbar) {background:var(--fw-sheet)!important;border:1px solid var(--fw-line)!important;border-radius:10px!important;box-shadow:none!important;gap:12px;padding:14px 16px;}
.crm-body :is(.status-filter,.source-filter-chip,.source-chip,.notification-filter-tab) {box-shadow:none!important;min-height:34px;padding:6px 11px;border:1px solid var(--fw-line);border-radius:999px;background:var(--fw-sheet);font-size:12px;font-weight:520;color:var(--fw-secondary);}
.crm-body :is(.status-filter,.source-filter-chip,.source-chip,.notification-filter-tab):hover {background:var(--fw-hover);}
.crm-body :is(.status-filter.active,.source-filter-chip.active,.notification-filter-tab.active) {background:var(--fw-soft);border-color:color-mix(in srgb,var(--brand) 26%,var(--fw-line));color:var(--brand-dark);}
.crm-body :is(.modern-table,.table) {border-spacing:0;border-collapse:collapse;table-layout:auto;min-width:0;}
.crm-body :is(.modern-table,.table) thead th {position:static;background:var(--fw-sheet)!important;border-bottom:1px solid var(--fw-line)!important;color:var(--fw-muted);text-transform:none;letter-spacing:0;font-size:12px;font-weight:600;padding:12px 14px;}
.crm-body :is(.modern-table,.table) tbody td {background:transparent;padding:13px 14px;border-bottom:1px solid var(--fw-line2)!important;font-size:13px;color:var(--fw-secondary);}
.crm-body :is(.modern-table,.table) tbody tr:last-child td {border-bottom:0!important;}
.crm-body :is(.modern-table,.table) tbody tr:hover td {background:var(--fw-hover)!important;}
.crm-body .entity-cell strong {font-size:13.5px;font-weight:620;color:var(--fw-text);}
.crm-body .entity-avatar {background:var(--fw-soft);color:var(--brand-dark);border-radius:9px;width:37px;height:37px;}
.crm-body .contact-stack {line-height:1.5;overflow-wrap:anywhere;}
.crm-body .row-actions {gap:5px;}
.crm-body .pagination {margin-top:18px;}

/* 06 | Edit/create forms, detail pages, real customer history. */
.crm-body .main .content .entity-form {gap:0;padding:0!important;border:0!important;box-shadow:none!important;background:transparent!important;}
.crm-body .entity-form > .form-section,
.crm-body .entity-form > .appointment-danger-zone {margin-bottom:18px;}
.crm-body :is(.form-section,.detail-list-card,.side-record-list,.summary-sidebar,.inventory-form-card) {border:1px solid var(--fw-line)!important;background:var(--fw-sheet)!important;border-radius:10px!important;box-shadow:none!important;padding:18px;}
.crm-body .form-section-head {border-bottom:1px solid var(--fw-line2);padding-bottom:13px;gap:12px;align-items:center;}
.crm-body .form-section-head :is(h2,h3) {font-size:15.5px;font-weight:620;}
.crm-body .form-section-head p {font-size:12px;line-height:1.5;color:var(--fw-muted);}
.crm-body .form-section-head > .icon-svg {width:30px;height:30px;background:var(--fw-soft);border-radius:8px;color:var(--brand);display:grid;place-items:center;}
.crm-body .form-section-head > .icon-svg svg {width:17px;height:17px;}
.crm-body .form-grid {gap:14px;grid-template-columns:repeat(2,minmax(0,1fr));}
.crm-body .form-grid .full {grid-column:1/-1;}
.crm-body .detail-grid {grid-template-columns:minmax(0,1.65fr) minmax(270px,.9fr);gap:18px;align-items:start;}
.crm-body .detail-grid :is(.card,.document-card) {box-shadow:none!important;}
.crm-body .detail-kv {gap:9px 12px;}
.crm-body .detail-kv dt {color:var(--fw-muted);font-weight:500;}
.crm-body .detail-kv dd {color:var(--fw-text);}
.crm-body .document-head,.crm-body .document-summary {border-top:1px solid var(--fw-line2);}
.crm-body .document-total {font-weight:550;}
.crm-body .document-summary > div {background:var(--fw-sheet);border-radius:7px;}
.crm-body .document-summary .grand-total {background:var(--fw-soft);}
.crm-body .mini-record-list > :not(:last-child) {border-bottom:1px solid var(--fw-line2);}

/* 07 | Agenda/calendar: flat timeline, horizontally safe mobile controls. */
.crm-body.fo-module-schedule .schedule-page {display:grid;gap:18px;min-width:0;}
.crm-body.fo-module-schedule .schedule-toolbar {align-items:center;gap:12px;margin-bottom:0;}
.crm-body.fo-module-schedule :is(.schedule-filters,.schedule-sync-state,.schedule-google-state,.schedule-list-view,.month-calendar,.week-calendar) {background:var(--fw-sheet)!important;border:1px solid var(--fw-line)!important;border-radius:11px!important;box-shadow:none!important;min-width:0;}
.crm-body.fo-module-schedule .schedule-toolbar :is(.icon-btn,.btn) {box-shadow:none;}
.crm-body.fo-module-schedule :is(.schedule-list-item,.calendar-chip,.schedule-event) {border-radius:8px;}
.crm-body.fo-module-schedule .schedule-list-item + .schedule-list-item {border-top:1px solid var(--fw-line2);}
.crm-body.fo-module-schedule .schedule-display-switch,.crm-body.fo-module-schedule .schedule-view-switch {border:1px solid var(--fw-line);border-radius:8px;background:var(--fw-sheet);}
.crm-body.fo-module-schedule .week-scroll {max-width:100%;overflow:auto;overscroll-behavior:contain;}

/* 08 | Billing/Settings: native tabs and actions remain functional; no misleading choices. */
.crm-body.fo-module-settings .settings-tabs-page-head {display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;}
.crm-body.fo-module-settings .settings-tabs-nav {display:flex;flex-wrap:wrap;gap:2px;background:transparent;border-bottom:1px solid var(--fw-line);border-radius:0;padding:0;margin-bottom:26px;overflow-x:auto;scrollbar-width:thin;}
.crm-body.fo-module-settings .settings-tab {display:inline-flex;align-items:center;gap:8px;background:transparent;border:0;border-bottom:2px solid transparent;border-radius:0;padding:12px 16px;color:var(--fw-muted);font-size:13px;font-weight:540;min-height:43px;white-space:nowrap;}
.crm-body.fo-module-settings .settings-tab[aria-selected="true"],
.crm-body.fo-module-settings .settings-tab.is-active,
.crm-body.fo-module-settings .settings-tab.active {border-bottom-color:var(--brand);background:transparent;color:var(--fw-text);box-shadow:none;}
.crm-body.fo-module-settings .settings-tab-panel {min-width:0;}
.crm-body.fo-module-settings .settings-tabs-content .card {margin-bottom:18px;}
.crm-body.fo-module-settings .settings-branding-card,.crm-body.fo-module-settings .settings-preference-card {padding:20px;}
.crm-body.fo-module-settings .settings-section-intro {margin-block:28px 15px;padding-top:12px;border-top:1px solid var(--fw-line);}
.crm-body.fo-module-settings .branding-logo-preview {border:1px dashed var(--fw-line);border-radius:10px;}
.crm-body.fo-module-settings .branding-fields {min-width:0;}
.crm-body.fo-module-billing :is(.subscription-overview-card,.subscription-plan-card,.billing-mini-card,.subscription-action-banner,.trial-subscribe-banner,.billing-courtesy-banner,.billing-history-card) {border:1px solid var(--fw-line)!important;border-radius:11px!important;background:var(--fw-sheet)!important;box-shadow:none!important;}
.crm-body.fo-module-billing :is(.subscription-plan-grid,.billing-mini-grid) {gap:14px;}
.crm-body.fo-module-billing .subscription-plan-card.is-current {border-color:color-mix(in srgb,var(--brand) 40%,var(--fw-line))!important;box-shadow:inset 0 3px 0 0 var(--brand)!important;}
.crm-body.fo-module-billing .subscription-plan-price strong {font-size:25px;font-weight:600;}
.crm-body.fo-module-billing .subscription-plan-form {margin-top:auto;}

/* 09 | Conversations: reference spacing, more legible messages, no clipped composer. */
.crm-body.fo-module-inbox .inbox {background:var(--fw-sheet);border:1px solid var(--fw-line);border-radius:12px;box-shadow:none;min-width:0;}
.crm-body.fo-module-inbox :is(.inbox-list,.inbox-thread,.inbox-detail) {min-width:0;background:var(--fw-sheet);}
.crm-body.fo-module-inbox .conv {border-bottom:1px solid var(--fw-line2);padding:13px 14px;}
.crm-body.fo-module-inbox .conv.active {background:var(--fw-soft);border-left:2px solid var(--brand);}
.crm-body.fo-module-inbox .message.inbound {background:var(--fw-hover);border:1px solid var(--fw-line);color:var(--fw-text);}
.crm-body.fo-module-inbox .message.outbound {background:var(--brand);color:white;}
.crm-body.fo-module-inbox .composer {background:var(--fw-sheet);border-top:1px solid var(--fw-line);min-width:0;}
.crm-body.fo-module-inbox .messages {background:var(--fw-sheet);}
.crm-body.fo-module-inbox :is(.inbox-overview-card,.side-detail-block) {background:var(--fw-sheet);border:1px solid var(--fw-line);box-shadow:none;border-radius:10px;}

/* 10 | Pipeline, inventory, finances, analytics, integrations & operational modules. */
.crm-body.fo-module-pipeline .pipeline-board {gap:13px;min-width:0;}
.crm-body.fo-module-pipeline .pipeline-col {background:var(--fw-hover);border:1px solid var(--fw-line);border-radius:11px;min-width:0;box-shadow:none;}
.crm-body.fo-module-pipeline .pipeline-col-head {background:transparent;border-bottom:1px solid var(--fw-line);font-weight:620;}
.crm-body.fo-module-pipeline .pipeline-card {background:var(--fw-sheet);border:1px solid var(--fw-line);box-shadow:none;border-radius:9px;}
.crm-body.fo-module-inventory :is(.inventory-tabs,.inventory-filter-toolbar) {border-bottom:1px solid var(--fw-line);}
.crm-body.fo-module-inventory .inventory-kpis {grid-template-columns:repeat(5,minmax(0,1fr));}
.crm-body.fo-module-inventory :is(.inventory-stat,.inventory-card,.inventory-form-card) {background:var(--fw-sheet);border:1px solid var(--fw-line);box-shadow:none;border-radius:10px;}
.crm-body.fo-module-finance .finance-panel,.crm-body.fo-module-finance .finance-metric {box-shadow:none!important;border:1px solid var(--fw-line)!important;background:var(--fw-sheet);border-radius:10px;}
.crm-body.fo-module-finance .finance-row {border-bottom:1px solid var(--fw-line2);}
.crm-body.fo-module-finance .finance-row:last-child {border-bottom:0;}
.crm-body.fo-module-insights :is(.stat,.report-grid .card) {background:var(--fw-sheet);box-shadow:none;border:1px solid var(--fw-line);}
.crm-body.fo-module-marketing .marketing-source-grid {gap:14px;}
.crm-body.fo-module-marketing .marketing-source-card {background:var(--fw-sheet);border:1px solid var(--fw-line);box-shadow:none;}
.crm-body.fo-module-apps :is(.app-card,.setup-card,.guided-card) {background:var(--fw-sheet);border:1px solid var(--fw-line);border-radius:10px;box-shadow:none;}
.crm-body.fo-module-community .community-grid .card {box-shadow:none;border:1px solid var(--fw-line);}
.crm-body.fo-module-team .team-plan-usage {box-shadow:none;border:1px solid var(--fw-line);}
.crm-body.fo-module-timesheets .time-clock-card,.crm-body.fo-module-timesheets .timesheet-history {box-shadow:none;border:1px solid var(--fw-line);}
.crm-body.fo-module-notifications .notification-center-card {box-shadow:none;border:1px solid var(--fw-line);}
.crm-body.fo-module-notifications .notification-full-item {border-bottom:1px solid var(--fw-line2);}

/* 11 | Popovers/modals: match reference sheet, stay inside handset viewport. */
.crm-body :is(.modal-panel,.notif-pop,.create-menu,.search-results,.user-dropdown) {background:var(--fw-sheet)!important;border:1px solid var(--fw-line)!important;border-radius:12px!important;box-shadow:0 14px 32px rgba(14,23,38,.12)!important;}
.crm-body .modal-panel {width:min(860px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 22px)!important;overflow:hidden;}
.crm-body .modal-head {border-bottom:1px solid var(--fw-line);}
.crm-body .modal-body {overflow:auto;overscroll-behavior:contain;min-width:0;}
.crm-body .modal-footer {background:var(--fw-sheet);border-top:1px solid var(--fw-line);}
.crm-body .notif-pop {max-height:min(75dvh,550px);overflow:auto;}

/* 12 | master admin, auth/onboarding: visual family without mixing business layouts. */
.master-body {
  --fw-canvas:#eef1f5;--fw-sheet:#fff;--fw-line:#e1e6ed;--fw-line2:#edf0f5;--fw-muted:#64728a;--fw-text:#0e1726;
}
.master-body .master-main {background:var(--fw-canvas)!important;}
.master-body .master-sidebar {background:var(--fw-canvas)!important;border-right:1px solid var(--fw-line)!important;box-shadow:none!important;}
.master-body .master-nav a {font-size:13px;border-radius:8px;font-weight:520;}
.master-body .master-nav a.active {background:var(--fw-sheet);box-shadow:inset 0 0 0 1px var(--fw-line);}
.master-body :is(.master-card,.master-kpi,.master-detail-card,.master-finance-card) {background:var(--fw-sheet);border:1px solid var(--fw-line)!important;border-radius:11px;box-shadow:none!important;}
.master-body .master-page-head-clean h1 {font-size:30px;font-weight:630;letter-spacing:-.02em;}
.master-body :is(.btn,.master-nav a) {transition:background-color .12s;}
.master-body :is(input,select,textarea):focus-visible {outline:none!important;box-shadow:0 0 0 2px rgba(31,85,229,.12);border-color:#7c9aee;}
.onboarding-body {background:#eef1f5;}
.onboarding-body :is(.onboarding-main,.onboarding-card) {box-shadow:none;}
.onboarding-body :is(.input,.select,.textarea):focus-visible {outline:none!important;box-shadow:0 0 0 2px rgba(31,85,229,.12);}
body:has(.login-shell) .login-card {border-color:#e1e6ed;border-radius:14px;box-shadow:0 4px 18px rgba(14,23,38,.04);}
body:has(.portal-shell) .portal-card {border-color:#e1e6ed;border-radius:12px;box-shadow:0 4px 20px rgba(14,23,38,.04);}

/* 13 | True dark mode across every CRM view; original demo only themed Início. */
html[data-fi-theme="dark"] .crm-body {
  --fw-canvas:#0a101c;--fw-sheet:#111a2b;--fw-text:#e9eef7;--fw-secondary:#bac5d6;--fw-muted:#8b98ae;--fw-faint:#5e6b82;--fw-line:#22304a;--fw-line2:#1a2740;--fw-hover:#182338;--fw-soft:#1a2a50;--fw-sheet-shadow:none;
  --ui-bg:var(--fw-canvas);--ui-card:var(--fw-sheet);--ui-ink:var(--fw-text);--ui-muted:var(--fw-muted);--ui-line:var(--fw-line);
  --pro-bg:var(--fw-canvas);--pro-surface:var(--fw-sheet);--pro-title:var(--fw-text);--pro-body:var(--fw-secondary);--pro-subtle:var(--fw-muted);--pro-border:var(--fw-line);
  --ux-title:var(--fw-text);--ux-text-soft:var(--fw-muted);--ux-card-border:var(--fw-line);
  color-scheme:dark;
}
html[data-fi-theme="dark"] .crm-body .main .content :is(.card,.data-card,.modern-card,.settings-card,.panel,.document-card,.form-section,.detail-list-card,.status-filter,.source-filter-chip,.source-chip,.notification-filter-tab,.subscription-plan-card,.billing-mini-card,.subscription-overview-card,.finance-panel,.finance-metric,.marketing-source-card,.app-card,.setup-card,.community-grid .card,.pipeline-card,.pipeline-col,.inventory-card,.table thead th,.table tbody td,.modern-table thead th,.modern-table tbody td,.notif-pop,.modal-panel,.modal-body,.modal-footer,.settings-tab-panel,.settings-tabs-nav,.inbox-list,.inbox-thread,.inbox-detail,.composer,.messages) {background-color:var(--fw-sheet)!important;color:var(--fw-text)!important;border-color:var(--fw-line)!important;box-shadow:none!important;}
html[data-fi-theme="dark"] .crm-body .main .content :is(.empty-state,.rich-empty-state,.mini-empty,.settings-section-intro,.table-sub,.form-group label,.form-section-head p,.page-head p) {color:var(--fw-muted)!important;}
html[data-fi-theme="dark"] .crm-body :is(.btn-secondary,.icon-btn,.sidebar-collapse-control,.nav.fi-nav .nav-create) {background:var(--fw-sheet)!important;color:var(--fw-secondary)!important;border-color:var(--fw-line)!important;}
html[data-fi-theme="dark"] .crm-body :is(.btn-secondary,.icon-btn,.status-filter,.source-filter-chip):hover {background:var(--fw-hover)!important;}
html[data-fi-theme="dark"] .crm-body .main .content :is(h1,h2,h3,.section-title,strong:not(.badge)) {color:var(--fw-text);}
html[data-fi-theme="dark"] .crm-body .main .content :is(.input,.select,.textarea,input,select,textarea) {background-color:var(--fw-sheet)!important;color:var(--fw-text)!important;border-color:var(--fw-line)!important;}
html[data-fi-theme="dark"] .crm-body .nav.fi-nav a.active {background:var(--fw-sheet)!important;color:var(--fw-text)!important;}
html[data-fi-theme="dark"] .crm-body .main .content :is(.table tbody tr:hover td,.modern-table tbody tr:hover td) {background:var(--fw-hover)!important;}

/* 14 | Mobile/tablet/PWA: full-width sheet and fixed overlay safety. */
@media(max-width:1260px){
  .crm-body.fo-module-inventory .inventory-kpis {grid-template-columns:repeat(3,minmax(0,1fr));}
  .crm-body.fo-module-billing .subscription-plan-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:1040px){
  .crm-body .detail-grid {grid-template-columns:1fr;}
  .crm-body.fo-module-pipeline .pipeline-board {overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;padding-bottom:8px;}
  .crm-body.fo-module-pipeline .pipeline-col {min-width:255px;scroll-snap-align:start;}
  .crm-body.fo-module-inventory .inventory-kpis {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:900px){
  .crm-body .main .content {width:calc(100% - 20px)!important;margin:0 10px!important;padding:23px 17px calc(96px + env(safe-area-inset-bottom))!important;border-radius:12px!important;min-height:calc(100dvh - 72px);}
  .crm-body .sidebar {background:var(--fw-canvas)!important;}
  .crm-body .form-grid {grid-template-columns:1fr;}
  .crm-body .detail-grid {grid-template-columns:1fr;}
  .crm-body :is(.modern-page-head,.page-head,.form-page-head,.settings-tabs-page-head) {align-items:stretch;flex-wrap:wrap;gap:14px;}
  .crm-body .page-actions {justify-content:flex-start;}
  .crm-body .lead-summary-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  .crm-body .table-wrap {max-width:100%;min-width:0;}
  .crm-body .settings-tabs-nav {flex-wrap:nowrap;overflow-x:auto;}
  .crm-body .settings-tab {flex:0 0 auto;}
  .crm-body .notif-pop {position:fixed!important;top:var(--notif-offset,64px)!important;left:10px!important;right:10px!important;width:auto!important;max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - var(--notif-offset,64px) - 15px)!important;}
}
@media(max-width:650px){
  .crm-body .main .content {width:100%!important;margin:0!important;border-radius:0!important;border-inline:0!important;padding:22px 14px calc(94px + env(safe-area-inset-bottom))!important;}
  .crm-body :is(.page-head,.modern-page-head,.settings-tabs-page-head) :is(h1,h2) {font-size:26px!important;}
  .crm-body :is(.modern-page-head,.page-head,.form-page-head,.settings-tabs-page-head,.finance-head) {flex-direction:column;align-items:stretch;}
  .crm-body .page-actions {display:flex;gap:8px;}
  .crm-body .page-actions .btn {flex:1 1 130px;}
  .crm-body .lead-summary-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  .crm-body .lead-summary-card {padding:12px;min-width:0;}
  .crm-body .lead-summary-card strong {font-size:22px;}
  .crm-body .list-toolbar,.crm-body .lead-filter-card,.crm-body .inbox-filter-card {padding:12px;}
  .crm-body .modern-searchbar,.crm-body .searchbar {width:100%;flex:1 1 100%;}
  .crm-body .searchbar > .btn {min-width:80px;}
  .crm-body .status-filters,.crm-body .source-filter-list {flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;}
  .crm-body .status-filter {flex:0 0 auto;}
  /* Important: app.css already restructures mobile-card-table rows into cards.
     We only override presentation and keep the action row below content. */
  .crm-body .data-card:has(.mobile-card-table) {background:transparent!important;border:0!important;box-shadow:none!important;}
  .crm-body table.mobile-card-table tbody tr {background:var(--fw-sheet)!important;border:1px solid var(--fw-line)!important;border-radius:10px!important;box-shadow:none!important;overflow:hidden;}
  .crm-body table.mobile-card-table tbody td {border-color:var(--fw-line2)!important;min-width:0;overflow-wrap:anywhere;}
  .crm-body table.mobile-card-table tbody td.row-actions {display:flex!important;flex-wrap:wrap;justify-content:flex-end;gap:6px;position:static!important;transform:none!important;}
  .crm-body table.mobile-card-table tbody td.row-actions > :is(form,a,button) {position:static!important;}
  .crm-body.fo-module-inventory .inventory-kpis {grid-template-columns:repeat(2,minmax(0,1fr));}
  .crm-body.fo-module-billing .subscription-plan-grid {grid-template-columns:1fr;}
  .crm-body.fo-module-inbox .inbox {max-width:100%;min-width:0;}
  .crm-body.fo-module-inbox :is(.inbox-list,.inbox-thread,.composer) {min-width:0;}
  .crm-body .form-section,.crm-body .card-pad {padding:15px;}
  .crm-body .modal-panel {max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;border-radius:12px;}
}
@media(max-width:370px){
  .crm-body .lead-summary-grid,.crm-body.fo-module-inventory .inventory-kpis {grid-template-columns:1fr;}
  .crm-body :is(.page-actions,.form-page-actions) .btn {width:100%;}
}
@media(prefers-reduced-motion:reduce){
  .crm-body :is(.btn,.icon-btn,.status-filter,.source-filter-chip,.nav a) {transition:none!important;}
}

/* 15 | Screen-by-screen finishing: respect each module's existing semantics. */
.crm-body.fo-module-customers :is(.customer-meta,.detail-list-card,.customer-overview-card),
.crm-body.fo-module-leads :is(.lead-qualification-card,.lead-conversation-card),
.crm-body.fo-module-jobs :is(.job-field-workflow,.job-proof-item),
.crm-body.fo-module-quotes :is(.estimate-summary,.document-card),
.crm-body.fo-module-invoices :is(.invoice-summary,.document-card) {
  background:var(--fw-sheet)!important;border:1px solid var(--fw-line)!important;
  box-shadow:none!important;border-radius:10px!important;
}
.crm-body.fo-module-customers .detail-list-card .section-title,
.crm-body.fo-module-leads .lead-qualification-card .section-title,
.crm-body.fo-module-jobs .job-field-workflow .section-title {
  border-bottom:1px solid var(--fw-line2);padding-bottom:13px;
}
.crm-body.fo-module-leads .lead-summary-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
.crm-body.fo-module-leads .lead-summary-card {border-top:2px solid var(--fw-line)!important;min-width:0;}
.crm-body.fo-module-leads .lead-summary-card strong {font-size:27px;font-weight:550;color:var(--fw-text);}
.crm-body.fo-module-leads .lead-priority {font-weight:550;}
.crm-body.fo-module-leads .lead-source-chips {display:flex;flex-wrap:wrap;gap:7px;}
.crm-body.fo-module-jobs .job-proof-gallery {display:grid;grid-template-columns:repeat(auto-fill,minmax(144px,1fr));gap:12px;}
.crm-body.fo-module-jobs .job-proof-item {overflow:hidden;min-width:0;}
.crm-body.fo-module-jobs .job-proof-item :is(img,video) {max-width:100%;object-fit:contain;}
.crm-body.fo-module-jobs .job-field-workflow :is(button,.btn) {min-height:39px;}
.crm-body.fo-module-quotes .document-tenant-brand,
.crm-body.fo-module-invoices .document-tenant-brand {border-bottom:1px solid var(--fw-line);}
.crm-body.fo-module-quotes .document-head,
.crm-body.fo-module-invoices .document-head {border-top:0;}
.crm-body.fo-module-finance .finance-metrics {gap:12px;}
.crm-body.fo-module-finance .finance-metric .finance-metric-icon {width:35px;height:35px;flex:0 0 35px;}
.crm-body.fo-module-finance .finance-metric :is(strong,.money-value) {font-weight:560;letter-spacing:-.03em;}
.crm-body.fo-module-finance .finance-primary-grid,
.crm-body.fo-module-finance .finance-secondary-grid {gap:16px;}
.crm-body.fo-module-inventory .inventory-shell {background:transparent!important;border:0!important;padding:0;}
.crm-body.fo-module-inventory .inventory-tabs {display:flex;flex-wrap:wrap;padding:0;gap:2px;border-bottom:1px solid var(--fw-line);background:transparent;}
.crm-body.fo-module-inventory .inventory-tabs .tab {border-radius:0;border:0;border-bottom:2px solid transparent;font-size:13px;font-weight:550;color:var(--fw-muted);}
.crm-body.fo-module-inventory .inventory-tabs .tab.active {color:var(--fw-text);border-bottom-color:var(--brand);background:transparent;box-shadow:none;}
.crm-body.fo-module-inventory .inventory-filterbar {display:flex;flex-wrap:wrap;align-items:center;gap:10px;background:var(--fw-sheet);border:1px solid var(--fw-line);border-radius:9px;padding:12px;}
.crm-body.fo-module-inventory .inventory-mini-list > * + * {border-top:1px solid var(--fw-line2);}
.crm-body.fo-module-pipeline .pipeline-stack {gap:9px;}
.crm-body.fo-module-pipeline .pipeline-card:hover {border-color:color-mix(in srgb,var(--brand) 28%,var(--fw-line));}
.crm-body.fo-module-marketing .marketing-source-card {border-top:2px solid var(--fw-line)!important;}
.crm-body.fo-module-apps .app-card-v2 {transition:border-color .12s;}
.crm-body.fo-module-apps .app-card-v2:hover {border-color:color-mix(in srgb,var(--brand) 25%,var(--fw-line))!important;}
.crm-body.fo-module-expenses .expense-layout {gap:18px;}
.crm-body.fo-module-expenses .expense-history-head {border-bottom:1px solid var(--fw-line2);}
.crm-body.fo-module-team .team-plan-usage {padding:16px;}
.crm-body.fo-module-team .check-grid {gap:9px;}
.crm-body.fo-module-timesheets .time-clock-card {padding:19px;}
.crm-body.fo-module-notifications .notification-status-tabs {display:flex;align-items:center;gap:3px;overflow-x:auto;scrollbar-width:none;}
.crm-body.fo-module-notifications .notification-full-item {padding:15px 13px;}
.crm-body.fo-module-community .community-grid {gap:15px;}
.crm-body.fo-module-community .community-grid .card:hover {border-color:color-mix(in srgb,var(--brand) 24%,var(--fw-line))!important;}
.crm-body.fo-module-billing .subscription-plan-card {display:flex;flex-direction:column;min-width:0;padding:18px;}
.crm-body.fo-module-billing .subscription-plan-price {margin-top:8px;}
.crm-body.fo-module-billing .subscription-feature-preview {margin-block:14px;}
.crm-body.fo-module-billing .subscription-plan-form {padding-top:12px;border-top:1px solid var(--fw-line2);}
.crm-body.fo-module-settings .settings-tab-panel .settings-grid {gap:15px;}
.crm-body.fo-module-settings :is(.settings-branding-card,.settings-preference-card) > .form-section-head {border-bottom:0;}
.crm-body.fo-module-settings .settings-tab-panel .form-group {min-width:0;}
@media(max-width:1150px){
  .crm-body.fo-module-leads .lead-summary-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:700px){
  .crm-body.fo-module-leads .lead-summary-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  .crm-body.fo-module-finance :is(.finance-primary-grid,.finance-secondary-grid) {grid-template-columns:1fr;}
  .crm-body.fo-module-inventory .inventory-tabs {overflow-x:auto;flex-wrap:nowrap;}
  .crm-body.fo-module-inventory .inventory-tabs .tab {flex:0 0 auto;white-space:nowrap;}
  .crm-body.fo-module-jobs .job-proof-gallery {grid-template-columns:repeat(2,minmax(0,1fr));}
}
/* Master sidebar is no longer dark: reset legacy inverse text together with its background. */
.master-body .master-sidebar :is(.master-brand strong,.master-user-info strong) {color:#0e1726!important;}
.master-body .master-sidebar :is(.master-brand small,.master-user-info small) {color:#64728a!important;}
.master-body .master-sidebar .master-nav a {color:#3b475a!important;background:transparent;}
.master-body .master-sidebar .master-nav a .icon-svg {color:#64728a;}
.master-body .master-sidebar .master-nav a:hover {background:#f3f5f8!important;color:#0e1726!important;}
.master-body .master-sidebar .master-nav a.active {background:#fff!important;color:#0e1726!important;border:1px solid #e1e6ed!important;box-shadow:0 1px 2px rgba(14,23,38,.04)!important;}
.master-body .master-sidebar .master-nav a.active .icon-svg {color:#1f55e5;}
.master-body .master-sidebar .master-user-info .avatar {background:#e7edfe!important;color:#1f55e5!important;}
.master-body .master-sidebar :is(.master-profile-link,.master-signout) {color:#3b475a!important;background:transparent!important;}
.master-body .master-sidebar :is(.master-profile-link,.master-signout):hover {background:#f3f5f8!important;}
@media(max-width:1000px){
  .master-body .master-sidebar-head {background:#eef1f5!important;}
  .master-body .master-sidebar-close {color:#3b475a!important;}
}
