/* ERP shell + Venda only. Keep runtime visibility, session controls and public
   portals authoritative. No generated actions, labels, metrics or tab state. */
#app {
  --shell-canvas: #071529;
  --shell-surface: #123753;
  --shell-border: rgba(226, 239, 255, 0.42);
  --shell-muted: #dce8f5;
  --shell-focus: #c2e0ff;
  --shell-accent: #e34b5c;
  --shell-nav-gradient: linear-gradient(155deg, #15538a 0%, #10395f 42%, #0b2444 100%);
  --shell-surface-gradient: linear-gradient(118deg, #174678 0%, #1d5185 42%, #173c67 72%, #102b4f 100%);
  --shell-active-gradient: linear-gradient(105deg, #1555bd 0%, #12619a 58%, #144d83 100%);
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) {
  background:
    radial-gradient(ellipse at 32% 0%, rgba(67, 143, 213, 0.22), transparent 45rem),
    radial-gradient(ellipse at 100% 85%, rgba(221, 236, 255, 0.06), transparent 48rem),
    linear-gradient(145deg, #102d4d 0%, var(--shell-canvas) 46%, #0b2340 100%);
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked))::before {
  content: none !important;
}

/* Desktop: reuse the existing header as a compact navigation rail. Its own
   scroll area keeps every authorized module and dedicated shortcut reachable
   in short windows, without an icon-only/collapsed navigation mode. Narrow
   desktops retain the existing header so the rail cannot compress form cells. */
@media (min-width: 1200px) {
  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) > .app-header {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 80;
    width: 224px;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
    margin: 0;
    padding: 20px 14px;
    overflow: auto;
    border: 0 !important;
    border-right: 1px solid var(--shell-border) !important;
    border-radius: 0;
    background: var(--shell-nav-gradient) !important;
    box-shadow: 8px 0 30px rgba(2, 12, 31, 0.2), inset -1px 0 0 rgba(161, 234, 255, 0.08) !important;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) > .app-main {
    width: calc(100% - 224px);
    min-width: 0;
    margin-left: 224px;
    padding: 32px clamp(20px, 3vw, 48px) 48px;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .erp-header-brand-area {
    order: 0;
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
    align-self: stretch;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .erp-header-logo-row {
    flex-direction: column;
    gap: 16px;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .erp-header-logo {
    max-width: 144px;
    max-height: 72px;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .erp-header-user-area .session-access {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-header .erp-header-modules {
    order: 1;
    flex: 0 0 auto;
    width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: none !important;
    grid-auto-rows: 40px !important;
    gap: 4px !important;
    padding: 0;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-header .erp-header-modules .tab {
    min-width: 0;
    min-height: 40px !important;
    height: 40px !important;
    padding: 8px 12px;
    justify-content: flex-start !important;
    border-radius: 8px;
    border-color: transparent !important;
    background: linear-gradient(100deg, rgba(91, 174, 235, 0.18), rgba(60, 133, 169, 0.04)) !important;
    box-shadow: none !important;
    color: #cbdaf0;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: left;
    text-shadow: none !important;
    white-space: normal;
    overflow-wrap: normal;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-header .erp-header-modules .tab:is(:hover, .is-active) {
    color: #fff;
    background: var(--shell-active-gradient) !important;
    border-color: rgba(166, 235, 255, 0.58) !important;
    box-shadow: inset 3px 0 0 var(--shell-accent), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 14px rgba(2, 16, 45, 0.2) !important;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) > .app-header > .erp-display-shortcuts {
    order: 2;
    flex: 0 0 auto;
    justify-content: flex-start;
    margin: 0;
  }
}

/* Existing mobile drawer, open/closed classes and essential-mode visibility
   remain untouched. Only surface and spacing of real controls change. */
@media (max-width: 900px) {
  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) > .app-header {
    background: var(--shell-nav-gradient) !important;
    box-shadow: none !important;
    border-color: var(--shell-border) !important;
  }

  /* Keep session controls in flow: their accessible targets are taller than
     the logo, so absolute vertical centering would clip Sair above the page. */
  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .erp-header-logo-row {
    flex-direction: row;
    gap: 12px;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .erp-header-logo {
    max-width: 100%;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .erp-header-user-area {
    position: static;
    transform: none;
    flex: 0 0 auto;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-header .session-switch-btn {
    min-height: 44px;
    min-width: 44px;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .mobile-bottom-nav {
    background: var(--shell-nav-gradient) !important;
    border-color: var(--shell-border) !important;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18) !important;
  }
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) :is(.session-switch-btn, .session-logout-btn, .mobile-modules-toggle) {
  min-height: 40px;
  min-width: 40px;
  border-radius: 8px;
  background: linear-gradient(145deg, #205e91, #174568 65%, #123357);
  border-color: var(--shell-border);
  box-shadow: none;
}

/* Existing identity controls only: switch user first, logout second. Hidden
   select/badge and module-toggle visibility remain controlled by the runtime. */
#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .erp-header-user-area .session-access {
  display: grid;
  grid-template-columns: 44px minmax(76px, auto);
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-header :is(.session-switch-btn, .session-logout-btn) {
  order: 0;
  min-width: 44px;
  min-height: 44px;
  height: 44px;
  border-radius: 10px;
  padding: 8px;
  font-size: 0.875rem;
  line-height: 1.2;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-header :is(.session-switch-btn, .session-logout-btn):not(:disabled) {
  background: linear-gradient(145deg, #1c5285, #133958) !important;
  color: #fff !important;
  border-color: rgba(234, 244, 255, 0.6) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-header :is(.session-switch-btn, .session-logout-btn):not(:disabled):hover {
  background: linear-gradient(145deg, #255f96, #194975) !important;
  border-color: #fff !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-header :is(.session-switch-btn, .session-logout-btn):disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

/* The switch action keeps its existing accessible name; a two-way arrow reads
   as a user change more clearly than the legacy dropdown chevron. */
#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-header .session-switch-btn::before {
  content: '⇄';
  width: auto;
  height: auto;
  border: 0;
  transform: none;
  font-size: 1.35rem;
  line-height: 1;
}

@media (min-width: 1200px) {
  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .erp-header-user-area,
  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .erp-header-user-area .session-access {
    width: 100%;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .erp-header-user-area .session-access {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-header :is(.session-switch-btn, .session-logout-btn) {
    width: 100%;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-header .session-switch-btn {
    gap: 5px;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-header .session-switch-btn::after {
    content: 'Trocar';
    font-size: 0.82rem;
    line-height: 1;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) > .app-header > .erp-display-shortcuts {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 6px;
    width: 100%;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .erp-display-shortcuts__label {
    padding: 0 4px;
    color: #dce8f5;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .erp-display-shortcuts__button {
    width: 100% !important;
    min-height: 40px !important;
    height: auto !important;
    justify-content: flex-start !important;
    padding: 8px 12px !important;
    border-radius: 8px;
    background: linear-gradient(100deg, rgba(91, 174, 235, 0.18), rgba(60, 133, 169, 0.04)) !important;
    color: #e8f2ff !important;
    text-align: left;
    white-space: normal;
  }

  #app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .erp-display-shortcuts__button:is(:hover, :focus-visible) {
    background: var(--shell-active-gradient) !important;
    border-color: rgba(166, 235, 255, 0.72) !important;
  }
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .session-access .mobile-modules-toggle {
  grid-column: 1 / -1;
}

/* A generic .input rule expanded this already-hidden select to the rail width
   plus its static offset. Restore its original 1px box, not a clipped rail. */
#app .app-header .session-access .session-select-hidden[aria-hidden="true"][tabindex="-1"] {
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-width: 0 !important;
}

/* Scope all content changes to Venda; other modules keep their own styles. */
#app .app-main > [data-tab-panel="venda"] {
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#app [data-tab-panel="venda"] .panel-header {
  margin-bottom: 24px;
}

#app [data-tab-panel="venda"] .panel-header h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
  text-shadow: none;
}

#app [data-tab-panel="venda"] > .card,
#app [data-tab-panel="venda"] .sale-empty-flow-note {
  padding: clamp(18px, 2.2vw, 28px) !important;
  margin-bottom: 20px;
  border: 1px solid var(--shell-border) !important;
  border-radius: 14px !important;
  background: var(--shell-surface-gradient) !important;
  box-shadow: 0 12px 28px rgba(1, 10, 26, 0.22), inset 0 1px 0 rgba(183, 239, 255, 0.12) !important;
  transform: none;
}

#app [data-tab-panel="venda"] .card h3 {
  color: #f0f6ff;
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-shadow: none;
}

#app [data-tab-panel="venda"] :is(.form-note, .panel-header p, .sale-empty-flow-note p) {
  color: var(--shell-muted);
}

/* White is the secondary surface, not a global light theme. Red remains a
   small brand accent on navigation; operational warning/error styles stay own. */
#app [data-tab-panel="venda"] .sale-empty-flow-note {
  background: linear-gradient(115deg, #ffffff, #eaf2fb) !important;
  border-color: rgba(255, 255, 255, 0.8) !important;
  color: #163b61;
}

#app [data-tab-panel="venda"] .sale-empty-flow-note :is(strong, p, .sale-empty-flow-note__icon) {
  color: #254969;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .mobile-bottom-nav .mobile-tab.is-active {
  background: var(--shell-active-gradient) !important;
  box-shadow: inset 3px 0 0 var(--shell-accent) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) > .app-header {
  background: var(--shell-nav-gradient) !important;
}

#app [data-sale-employee-form] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

#app [data-sale-employee-form] > label {
  min-width: 0;
  color: #cbdaf0;
  font-size: 0.85rem;
  line-height: 1.4;
}

#app [data-sale-employee-form] .input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid rgba(160, 199, 238, 0.4);
  background: #0b203b;
  color: #f0f6ff;
  box-shadow: none;
}

/* Replace the legacy bright horizontal gloss only on enabled sale controls.
   Geometry, native affordances and disabled state remain authoritative. */
#app [data-sale-employee-form] .input:not(:disabled) {
  background: linear-gradient(180deg, #173a58, #10253f) !important;
  border-color: rgba(129, 203, 229, 0.5) !important;
  box-shadow: inset 0 1px 0 rgba(192, 238, 249, 0.07), 0 2px 6px rgba(2, 15, 34, 0.12) !important;
}

#app [data-sale-employee-form] .sale-employee-submit {
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 8px !important;
  border: 1px solid #71c7e8 !important;
  background: var(--shell-active-gradient) !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(4, 22, 58, 0.3), inset 0 1px 0 rgba(216, 248, 255, 0.18) !important;
  text-shadow: none;
}

#app :is(.app-header, .mobile-bottom-nav, [data-tab-panel="venda"]) :is(button, a, input, select):focus-visible {
  outline: 3px solid var(--shell-focus) !important;
  outline-offset: 3px;
}

@media (min-width: 1280px) {
  #app [data-sale-employee-form] {
    grid-template-columns: 1fr 1fr minmax(0, 1.3fr) minmax(0, 0.7fr);
  }
}

@media (max-width: 640px) {
  #app [data-tab-panel="venda"] .panel-header {
    margin-bottom: 18px;
  }

  #app [data-sale-employee-form] {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Internal operational panels: reuse the shell's blue depth without changing
   the public portals, dedicated screens, permissions or table geometry. */
#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > .panel:not([data-tab-panel="venda"]) {
  --interior-line: rgba(178, 220, 255, 0.42);
  --interior-shadow: 0 14px 30px rgba(2, 13, 37, 0.25), inset 0 1px 0 rgba(235, 248, 255, 0.13);
  border-color: rgba(177, 218, 255, 0.38) !important;
  background:
    radial-gradient(ellipse at 88% 0%, rgba(91, 163, 233, 0.14), transparent 38%),
    linear-gradient(150deg, #123860 0%, #102e55 38%, #0d2548 72%, #0b1e3d 100%) !important;
  box-shadow: 0 22px 44px rgba(2, 12, 31, 0.25), inset 0 1px 0 rgba(235, 248, 255, 0.13) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > .panel:not([data-tab-panel="venda"])::before {
  background: linear-gradient(90deg, transparent, rgba(145, 206, 255, 0.75) 28%, rgba(225, 243, 255, 0.86) 62%, rgba(227, 75, 92, 0.55) 96%) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > .panel:not([data-tab-panel="venda"]) .card {
  border-color: var(--interior-line) !important;
  background:
    radial-gradient(ellipse at 95% 5%, rgba(106, 177, 243, 0.17), transparent 42%),
    linear-gradient(145deg, #1d4d83 0%, #193f70 36%, #15345d 70%, #102849 100%) !important;
  box-shadow: var(--interior-shadow) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > .panel:not([data-tab-panel="venda"]) .card::before {
  background: linear-gradient(90deg, rgba(139, 199, 248, 0.72), rgba(222, 241, 255, 0.54) 72%, rgba(227, 75, 92, 0.62) 100%) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > .panel:not([data-tab-panel="venda"]) .card::after {
  background: radial-gradient(ellipse at 20% 0%, rgba(206, 234, 255, 0.11), transparent 58%) !important;
  opacity: 0.36 !important;
}

/* Collapsed Cadastro headings keep their existing toggle, active and keyboard
   behavior. Only the large purple highlight becomes a blue gradient. */
#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > [data-tab-panel="cadastro"] .cadastro-grid .card[data-cadastro-collapsible].is-collapsed,
#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > [data-tab-panel="cadastro"] .cadastro-document-config-grid > .card[data-cadastro-collapsible].is-collapsed {
  border-color: rgba(177, 218, 255, 0.48) !important;
  background: linear-gradient(112deg, #245b9a, #1c487f 48%, #15345d 100%) !important;
  box-shadow: 0 10px 24px rgba(2, 13, 37, 0.27), inset 0 1px 0 rgba(235, 248, 255, 0.15) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > [data-tab-panel="cadastro"] .cadastro-grid .card[data-cadastro-collapsible].is-collapsed > h3,
#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > [data-tab-panel="cadastro"] .cadastro-document-config-grid > .card[data-cadastro-collapsible].is-collapsed > h3 {
  background: linear-gradient(105deg, #2866aa 0%, #23558f 48%, #1a4070 100%) !important;
  border-bottom-color: rgba(214, 239, 255, 0.24) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > [data-tab-panel="cadastro"] .card[data-cadastro-collapsible].is-cadastro-active {
  border-color: rgba(205, 232, 255, 0.7) !important;
  box-shadow: 0 0 0 1px rgba(227, 75, 92, 0.32), var(--interior-shadow) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > .panel:not([data-tab-panel="venda"]) :is(.input, select.input, textarea.input, .easy-multi-dropdown summary.input):not(:disabled):not([disabled]):not(.is-disabled):not([aria-disabled="true"]) {
  border-color: rgba(169, 211, 245, 0.48) !important;
  border-top-color: rgba(226, 242, 255, 0.61) !important;
  background: linear-gradient(180deg, #24568b 0%, #183d6b 40%, #102a4b 100%) !important;
  color: #f5faff !important;
  box-shadow: inset 0 1px 0 rgba(232, 247, 255, 0.17), 0 2px 8px rgba(2, 12, 32, 0.11) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > .panel:not([data-tab-panel="venda"]) :is(.input, select.input, textarea.input, .easy-multi-dropdown summary.input):is(:disabled, [disabled], .is-disabled, [aria-disabled="true"]) {
  border-color: rgba(159, 187, 215, 0.35) !important;
  background: linear-gradient(180deg, #263d58, #1a304d) !important;
  color: #c6d3df !important;
  box-shadow: inset 0 1px 0 rgba(232, 247, 255, 0.07) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > .panel:not([data-tab-panel="venda"]) :is(.input, select.input, textarea.input, .easy-multi-dropdown summary.input):not(:disabled):not([disabled]):not(.is-disabled):not([aria-disabled="true"]):focus {
  border-color: #c2e0ff !important;
  box-shadow: 0 0 0 3px rgba(151, 208, 255, 0.26), inset 0 1px 0 rgba(241, 251, 255, 0.2) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > .panel:not([data-tab-panel="venda"]) :is(.btn, button.btn, a.btn, .input, select.input, textarea.input):focus-visible {
  outline: 3px solid #c2e0ff !important;
  outline-offset: 3px;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > .panel:not([data-tab-panel="venda"]) :is(.filter-row, .finance-filter-grid, .cadastro-filter-bar) {
  border-color: rgba(174, 217, 250, 0.35) !important;
  background: linear-gradient(125deg, rgba(59, 120, 188, 0.18), rgba(12, 41, 80, 0.56)) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > .panel:not([data-tab-panel="venda"]) .table-wrapper {
  border-color: rgba(180, 218, 247, 0.38) !important;
  background: linear-gradient(160deg, rgba(22, 63, 111, 0.9), rgba(12, 38, 78, 0.94)) !important;
  box-shadow: inset 0 1px 0 rgba(234, 247, 255, 0.14), 0 10px 22px rgba(3, 16, 42, 0.19) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > .panel:not([data-tab-panel="venda"]) table thead th {
  background: linear-gradient(180deg, #3774ae 0%, #2d69ad 42%, #19477f 100%) !important;
  box-shadow: inset 0 1px 0 rgba(239, 250, 255, 0.24), inset 0 -1px 0 rgba(227, 75, 92, 0.31) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > .panel:not([data-tab-panel="venda"]) table tbody tr:nth-child(even) {
  background: rgba(66, 126, 191, 0.17) !important;
}

#app:not(:is(.is-overview, .is-expedition-panel, .is-crm-portal, .is-quotation-portal, .is-client-order-portal, .is-auth-locked)) .app-main > .panel:not([data-tab-panel="venda"]) table tbody tr:hover {
  background: rgba(87, 153, 220, 0.22) !important;
  box-shadow: inset 3px 0 0 rgba(162, 216, 252, 0.76) !important;
}

@media (max-width: 640px) {
  /* The reference is free text; half a mobile cell clips even its example.
     Preserve the existing two-column form for short controls. */
  #app .app-main > [data-tab-panel="documentos"] [data-documents-form] > label:has([data-documents-reference]) {
    grid-column: 1 / -1 !important;
  }
}
