:root {
  --red: #cc0000;
  --red-dark: #a90000;
  --red-soft: #fff2f2;
  --ink: #1c1d21;
  --muted: #6c7079;
  --line: #e4e6ea;
  --line-strong: #d4d7dc;
  --surface: #ffffff;
  --background: #f4f5f7;
  --success: #137a4b;
  --warning: #9a6410;
  --danger: #b42318;
  --sidebar-width: 252px;
  --sidebar-collapsed: 78px;
  --radius: 16px;
  --shadow: 0 12px 35px rgba(24, 26, 31, .07);
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--background); }
body { margin: 0; min-height: 100vh; background: var(--background); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Estrutura administrativa */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); transition: grid-template-columns .22s ease; }
.app-shell.sidebar-collapsed { grid-template-columns: var(--sidebar-collapsed) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; min-height: 0; z-index: 40; display: flex; flex-direction: column; overflow: hidden; background: #fff; border-right: 1px solid var(--line); box-shadow: 8px 0 24px rgba(24,26,31,.025); }
.sidebar-head { position: relative; flex: 0 0 auto; min-height: 126px; padding: 20px 18px 14px; display: flex; align-items: center; }
.sidebar-brand { min-width: 0; width: 100%; display: flex; align-items: center; gap: 12px; }
.sidebar-brand .brand-full { width: 76px; height: 64px; flex: 0 0 auto; object-fit: contain; }
.sidebar-brand .brand-wing { display: none; width: 46px; height: 38px; object-fit: contain; }
.brand-copy { min-width: 0; display: grid; gap: 4px; }
.brand-copy strong { font-size: 15px; letter-spacing: -.025em; white-space: nowrap; }
.brand-copy small { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.sidebar-toggle { position: absolute; right: -14px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: #fff; color: #555963; box-shadow: 0 4px 12px rgba(24,26,31,.1); z-index: 2; }
.sidebar-toggle:hover { color: var(--red); border-color: #e0a5a5; }
.sidebar-toggle svg { width: 16px; height: 16px; transition: transform .22s ease; }
.sidebar-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 2px 12px 16px; scrollbar-width: thin; scrollbar-color: #cfd2d8 transparent; }
.nav-list { display: flex; flex-direction: column; gap: 4px; }
.nav-section { margin: 18px 11px 7px; color: #9a9da4; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.nav-item { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 11px; color: #50535b; font-size: 13px; font-weight: 600; transition: background .16s ease, color .16s ease; }
.nav-item:hover { background: #f5f5f7; color: var(--ink); }
.nav-item.active { background: var(--red); color: #fff; box-shadow: 0 8px 18px rgba(204,0,0,.16); }
.nav-icon { width: 20px; flex: 0 0 20px; display: grid; place-items: center; font-size: 19px; }
.nav-icon svg { width: 19px; height: 19px; }
.nav-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-footer { flex: 0 0 auto; padding: 14px 15px 18px; border-top: 1px solid var(--line); background: #fff; }
.user-mini { min-width: 0; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--red-soft); color: var(--red); font-size: 13px; font-weight: 700; }
.avatar.large { width: 42px; height: 42px; }
.user-copy { min-width: 0; display: grid; gap: 2px; }
.user-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.user-copy small { color: var(--muted); font-size: 9px; }
.link-button { width: 100%; min-height: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 700; }
.link-button:hover { background: #f5f5f7; color: var(--red); }
.app-shell.sidebar-collapsed .sidebar-head { padding-left: 10px; padding-right: 10px; }
.app-shell.sidebar-collapsed .sidebar-brand { justify-content: center; }
.app-shell.sidebar-collapsed .brand-full, .app-shell.sidebar-collapsed .brand-copy, .app-shell.sidebar-collapsed .nav-label, .app-shell.sidebar-collapsed .nav-section, .app-shell.sidebar-collapsed .user-copy { display: none; }
.app-shell.sidebar-collapsed .brand-wing { display: block; }
.app-shell.sidebar-collapsed .sidebar-scroll { padding-left: 9px; padding-right: 9px; }
.app-shell.sidebar-collapsed .nav-item { justify-content: center; padding: 0; }
.app-shell.sidebar-collapsed .sidebar-footer { padding-left: 10px; padding-right: 10px; }
.app-shell.sidebar-collapsed .user-mini { justify-content: center; }
.app-shell.sidebar-collapsed .link-button { justify-content: center; padding: 0; }
.app-shell.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.sidebar-backdrop { display: none; }

.main-content { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; height: 86px; padding: 0 36px; display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar h1 { margin: 4px 0 0; font-size: clamp(22px, 2.3vw, 29px); line-height: 1; letter-spacing: -.04em; }
.eyebrow { color: var(--red); font-size: 9px; line-height: 1; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.topbar-profile { margin-left: auto; padding: 9px 11px; border-radius: 9px; color: var(--muted); font-size: 12px; font-weight: 700; }
.topbar-profile:hover { background: #f4f5f7; color: var(--ink); }
.mobile-menu-button { display: none; width: 40px; height: 40px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.mobile-menu-button svg { width: 21px; height: 21px; }
.content-wrap { width: min(100%, 1480px); margin: 0 auto; padding: 28px 36px 56px; }

/* Elementos gerais */
.alert { margin-bottom: 16px; padding: 13px 15px; border-radius: 11px; font-size: 13px; transition: opacity .3s, transform .3s; }
.alert-success { background: #eaf8f1; color: #12663f; border: 1px solid #c8ebd9; }
.alert-danger { background: #fff0ef; color: #a52a20; border: 1px solid #f4cfcb; }
.alert-warning { background: #fff7e9; color: #87580e; border: 1px solid #f0deb8; }
.alert.fade-out { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 26px rgba(24,26,31,.035); overflow: hidden; }
.card-header { min-height: 68px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.card-header > div { min-width: 0; }
.card-header h2 { margin: 5px 0 0; font-size: 17px; letter-spacing: -.025em; }
.card-header p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.card-header.split { align-items: flex-start; }
.button { min-height: 41px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 700; transition: transform .16s, background .16s, border-color .16s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--red); color: #fff; box-shadow: 0 7px 16px rgba(204,0,0,.16); }
.button-primary:hover { background: var(--red-dark); }
.button-secondary { background: #f1f2f4; color: #33363d; border-color: #e3e5e8; }
.button-secondary:hover { background: #e8e9ec; }
.button-outline { background: #fff; color: #34373e; border-color: var(--line-strong); }
.button-outline:hover { border-color: #aeb2b9; }
.button-light { background: #fff; color: var(--red); }
.button-block { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.text-link { color: var(--red); font-size: 11px; font-weight: 700; }
.back-link { display: inline-flex; margin-bottom: 16px; color: var(--muted); font-size: 11px; font-weight: 700; }
.back-link:hover { color: var(--red); }
.toolbar { min-width: 0; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toolbar-title { margin: 0; font-size: 17px; }
.toolbar-copy { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.result-line { margin: 12px 0 14px; color: var(--muted); font-size: 11px; }
.result-line strong { color: var(--ink); }
.status, .status-badge { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: 999px; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.status-active, .status-badge.active { background: #e8f6ef; color: var(--success); }
.status-inactive, .status-badge.inactive { background: #eff0f2; color: #777b83; }
.restricted-badge { padding: 5px 8px; border-radius: 999px; background: #25272c; color: #fff; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.hidden { display: none !important; }

/* Formul?rios */
.stack-form { display: grid; gap: 18px; }
.form-grid { padding: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.form-grid.one-column { grid-template-columns: 1fr; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { min-width: 0; display: grid; gap: 7px; }
.field > span { color: #40434a; font-size: 10px; font-weight: 700; }
.field input, .field select, .field textarea, .search-box input, .filter-bar select { width: 100%; min-width: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); outline: none; transition: border-color .16s, box-shadow .16s; }
.field input, .field select { height: 43px; padding: 0 12px; }
.field textarea { padding: 11px 12px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-bar select:focus { border-color: #d46f6f; box-shadow: 0 0 0 3px rgba(204,0,0,.08); }
.field small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.field-span { grid-column: 1 / -1; }
.check-row { min-width: 0; display: flex; align-items: center; gap: 10px; color: #44474f; font-size: 11px; font-weight: 700; }
.check-row input { width: 17px; height: 17px; accent-color: var(--red); }
.panel-check { min-height: 43px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fafafb; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.calculated-field input, .money-input[readonly] { background: #f1f2f4; color: #43464d; font-weight: 700; cursor: not-allowed; }
.image-preview-box { min-height: 150px; padding: 10px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.image-preview-box img { width: 100%; height: 140px; object-fit: contain; }
.multi-select { min-height: 270px !important; padding: 8px !important; background-image: none !important; }
.multi-select option { padding: 8px; border-radius: 7px; }
.field.is-disabled { opacity: .45; }
.internal-panel { border-color: #d9dce1; }
.calculated-margins { padding: 0 22px 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.calculated-margins > div { min-width: 0; padding: 15px; display: grid; gap: 5px; border-radius: 11px; background: #24262b; color: #fff; }
.calculated-margins span { color: #aeb2ba; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.calculated-margins strong { font-size: 18px; }
.technical-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Filtros */
.filter-bar { min-width: 0; display: flex; align-items: center; gap: 10px; }
.catalog-filter { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) auto auto; }
.filter-bar select { height: 43px; padding: 0 38px 0 12px; }
.search-box { min-width: 0; height: var(--control-height, 44px); min-height: var(--control-height, 44px); display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; overflow: visible; }
.search-box .search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex: 0 0 auto;
  line-height: 0;
}
.search-box .search-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.7;
}
.search-box input { flex: 1 1 auto; width: 100%; min-width: 0; height: auto; min-height: 0; align-self: center; padding: 0; border: 0; background: transparent; box-shadow: none !important; outline: none !important; }
.search-box input:focus,
.search-box input:focus-visible {
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}
.search-box:focus-within {
  border-color: var(--line-strong);
  box-shadow: none;
}
.wide-search { width: min(520px, 100%); }
.compact-filter { margin: 0; }

/* Cat?logo */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 380px)); gap: 18px; align-items: start; }
.motorcycle-card { min-width: 0; width: 100%; max-width: 380px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 26px rgba(24,26,31,.045); transition: transform .18s, box-shadow .18s; }
.motorcycle-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.motorcycle-image { position: relative; height: 225px; padding: 18px; display: grid; place-items: center; background: #fff; border-bottom: 1px solid #f0f1f3; overflow: hidden; }
.motorcycle-image > img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.category-pill, .promotion-pill, .benefit-pill { position: absolute; z-index: 1; display: inline-flex; width: fit-content; padding: 6px 9px; border-radius: 999px; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.category-pill { left: 12px; top: 12px; background: #25272c; color: #fff; }
.category-pill.static { position: static; }
.promotion-pill { right: 12px; bottom: 12px; background: var(--success); color: #fff; }
.benefit-pill { right: 12px; bottom: 12px; background: var(--red); color: #fff; }
.motorcycle-card-body { padding: 17px; }
.motorcycle-card-body h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.catalog-price-grid, .detail-price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.catalog-price-grid { margin: 14px 0 10px; }
.refined-price-box { min-width: 0; min-height: 105px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; border: 1px solid #e3e5e8; border-radius: 12px; background: #fafafb; }
.refined-price-box.has-discount { background: #f3faf6; border-color: #bde1cd; }
.price-box-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.price-box-heading span { color: #656972; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .045em; }
.price-box-heading b { padding: 4px 6px; border-radius: 999px; background: var(--success); color: #fff; font-size: 7px; text-transform: uppercase; }
.refined-price-box > strong { overflow-wrap: anywhere; color: var(--ink); font-size: clamp(16px, 1.5vw, 20px); line-height: 1.05; letter-spacing: -.025em; }
.refined-price-box.has-discount > strong { color: var(--success); }
.price-original { color: #8c9098; font-size: 9px; text-decoration: line-through; }
.refined-price-box > em { color: #5e7b6c; font-size: 8px; font-style: normal; font-weight: 700; }
.catalog-freight-row { margin-bottom: 14px; padding: 9px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #f0f1f3; border-bottom: 1px solid #f0f1f3; color: var(--muted); font-size: 10px; }
.catalog-freight-row strong { color: var(--ink); }

/* Detalhe da moto */
.detail-layout { display: grid; gap: 18px; }
.detail-hero { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(360px, 1.1fr); }
.detail-image { min-height: 390px; padding: 28px; display: grid; place-items: center; background: #fff; border-right: 1px solid var(--line); overflow: hidden; }
.detail-image img { width: 100%; height: 100%; max-height: 420px; object-fit: contain; }
.detail-main { min-width: 0; padding: 30px; }
.detail-main h2 { margin: 16px 0 7px; font-size: clamp(25px, 3vw, 36px); letter-spacing: -.045em; }
.detail-main .description { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.detail-price-grid { margin: 24px 0 16px; }
.detail-price-box { min-height: 126px; padding: 16px; }
.detail-price-box > strong { font-size: clamp(21px, 2.6vw, 30px); }
.data-grid { padding: 20px 22px 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.data-item { min-width: 0; min-height: 82px; padding: 14px; display: grid; align-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 11px; background: #fafafb; }
.data-item span { color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .045em; }
.data-item strong { overflow-wrap: anywhere; font-size: 14px; }
.data-item small { color: var(--muted); font-size: 9px; }
.data-item.emphasis { background: var(--red-soft); border-color: #efc6c6; }
.data-item.emphasis strong { color: var(--red); font-size: 18px; }
.data-item.emphasis-dark { background: #24262b; border-color: #24262b; color: #fff; }
.seller-commercial-data { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.commercial-item-grid { padding: 0 22px 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.commercial-item-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fafafb; }
.commercial-item-card.voucher-card { background: var(--red-soft); border-color: #efc9c9; }
.item-kind { display: inline-flex; width: fit-content; padding: 5px 7px; border-radius: 999px; background: #25272c; color: #fff; font-size: 7px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.commercial-item-card h3, .commercial-admin-card h2 { margin: 11px 0 6px; font-size: 15px; }
.commercial-item-card p, .commercial-admin-card p { margin: 6px 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.commercial-item-card small { color: var(--muted); font-size: 8px; }
.item-value { display: block; color: var(--red); font-size: 21px; }
.technical-spec-grid { padding: 0 22px 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.technical-spec-grid > div { min-width: 0; min-height: 90px; padding: 17px; display: grid; align-content: center; gap: 6px; background: #fff; }
.technical-spec-grid span { color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.technical-spec-grid strong { font-size: 12px; line-height: 1.5; }
.technical-spec-wide { grid-column: 1 / -1; }
.available-aggregates { padding: 0 22px 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.available-aggregate { min-width: 0; padding: 14px; display: flex; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fafafb; }
.available-aggregate > div { min-width: 0; display: grid; gap: 4px; }
.available-aggregate strong { font-size: 11px; }
.available-aggregate span { color: var(--muted); font-size: 9px; line-height: 1.4; }
.available-aggregate b { color: var(--red); font-size: 13px; white-space: nowrap; }

/* Dashboard */
.dashboard-stat-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dashboard-stat-card { min-width: 0; min-height: 112px; padding: 19px; display: grid; align-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(24,26,31,.03); }
.dashboard-stat-card span { color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.35; }
.dashboard-stat-card strong { font-size: clamp(27px, 3vw, 35px); line-height: 1; letter-spacing: -.045em; }
.dashboard-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 8px 26px rgba(24,26,31,.035); }
.dashboard-panel-header { min-height: 62px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.dashboard-panel-header h2 { margin: 0; font-size: 16px; }
.dashboard-model-list { display: grid; }
.dashboard-model-item { min-width: 0; min-height: 92px; padding: 13px 17px; display: grid; grid-template-columns: 66px minmax(140px, 1fr) minmax(310px, .95fr) 18px; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); transition: background .15s; }
.dashboard-model-item:last-child { border-bottom: 0; }
.dashboard-model-item:hover { background: #fafafb; }
.dashboard-model-thumb { width: 66px; height: 56px; padding: 5px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); font-size: 9px; font-weight: 700; }
.dashboard-model-thumb img { width: 100%; height: 100%; object-fit: contain; }
.dashboard-model-info { min-width: 0; display: grid; gap: 4px; }
.dashboard-model-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.dashboard-model-info span { color: var(--muted); font-size: 9px; }
.dashboard-model-commercial { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dashboard-model-price { min-width: 0; padding: 10px 12px; display: grid; gap: 3px; border: 1px solid var(--line); border-radius: 10px; background: #fafafb; }
.dashboard-model-price span { color: var(--muted); font-size: 7px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.dashboard-model-price strong { overflow-wrap: anywhere; font-size: 13px; }
.dashboard-model-price em { color: var(--muted); font-size: 8px; font-style: normal; }
.dashboard-model-arrow { color: #a4a7ae; font-size: 22px; }
.dashboard-empty { min-height: 100px; display: grid; place-items: center; color: var(--muted); font-size: 11px; }

/* Simulador */
.simulator-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 20px; align-items: start; }
.simulator-form-card { padding-bottom: 22px; }
.selected-bike-box { padding: 15px; display: grid; gap: 4px; border: 1px solid #efcaca; border-radius: 11px; background: var(--red-soft); }
.selected-bike-box span { color: #91464b; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.selected-bike-box strong { color: var(--red); font-size: 15px; }
.aggregate-selector { margin: 0 22px 20px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fafafb; }
.aggregate-selector-head { margin-bottom: 11px; display: grid; gap: 3px; }
.aggregate-selector-head > span { font-size: 12px; font-weight: 700; }
.aggregate-selector-head small { color: var(--muted); font-size: 9px; }
.aggregate-options { display: grid; gap: 8px; }
.aggregate-option { min-width: 0; padding: 11px 12px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.aggregate-option:hover { border-color: #d4a6a6; }
.aggregate-option input { width: 17px; height: 17px; accent-color: var(--red); }
.aggregate-option-copy { min-width: 0; display: grid; gap: 2px; }
.aggregate-option-copy strong { font-size: 11px; }
.aggregate-option-copy small { color: var(--muted); font-size: 8px; line-height: 1.35; }
.aggregate-option b { color: var(--red); font-size: 12px; white-space: nowrap; }
.aggregate-empty { color: var(--muted); font-size: 10px; }
.simulator-rules { margin: 0 22px; padding: 15px; display: grid; gap: 9px; border-radius: 11px; background: #f1f2f4; }
.simulator-rules > strong { font-size: 10px; }
.simulator-rules div { display: grid; gap: 3px; }
.simulator-rules b { font-size: 9px; }
.simulator-rules span { color: var(--muted); font-size: 9px; }
.proposal-card { position: sticky; top: 106px; min-width: 0; padding: 25px; border-radius: 16px; background: #202226; color: #fff; box-shadow: 0 16px 40px rgba(24,26,31,.16); }
.proposal-label { color: #aeb1b8; font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.proposal-card h2 { margin: 12px 0 20px; font-size: 20px; letter-spacing: -.03em; }
.proposal-total { margin-bottom: 18px; padding-bottom: 18px; display: grid; gap: 5px; border-bottom: 1px solid rgba(255,255,255,.11); }
.proposal-total span { color: #aeb1b8; font-size: 9px; }
.proposal-total strong { overflow-wrap: anywhere; font-size: 31px; letter-spacing: -.045em; }
.proposal-lines { display: grid; gap: 10px; }
.proposal-lines > div, .proposal-aggregate-summary > div { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; }
.proposal-lines span { color: #aeb1b8; }
.proposal-aggregate-summary { display: grid !important; gap: 10px; }
.proposal-note { margin: 18px 0; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.08); color: #c5c7cd; font-size: 9px; line-height: 1.5; }
.eligibility-dialog { width: min(550px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 18px; background: transparent; }
.eligibility-dialog::backdrop { background: rgba(12,13,15,.72); backdrop-filter: blur(4px); }
.dialog-card { max-height: calc(100vh - 28px); overflow-y: auto; padding: 22px; border-radius: 18px; background: #fff; box-shadow: 0 25px 80px rgba(0,0,0,.28); }
.dialog-header { display: flex; justify-content: space-between; gap: 14px; }
.dialog-header h2 { margin: 6px 0 0; }
.dialog-close { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: #f1f2f4; font-size: 22px; }
.dialog-fields { padding: 20px 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.eligibility-message { margin-bottom: 14px; padding: 11px; border-radius: 9px; font-size: 10px; }
.eligibility-message.success { background: #eaf8f1; color: var(--success); }
.eligibility-message.danger { background: #fff0ef; color: var(--danger); }

/* Listas administrativas */
.commercial-toolbar { justify-content: space-between; }
.commercial-admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.commercial-admin-card { padding: 18px; }
.commercial-admin-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.application-summary { margin-top: 15px; padding-top: 13px; display: grid; gap: 4px; border-top: 1px solid var(--line); }
.application-summary strong { font-size: 10px; }
.application-summary span { color: var(--muted); font-size: 8px; }
.card-actions { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.card-actions form { display: contents; margin: 0; }
.card-actions .button { flex: 1 1 calc(33.333% - 6px); width: auto; min-width: min(100%, 7.5rem); white-space: nowrap; }
.discount-admin-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.discount-admin-prices > div { padding: 11px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fafafb; }
.discount-admin-prices span { color: var(--muted); font-size: 8px; }
.discount-admin-prices strong { font-size: 13px; }
.discount-admin-promotional { background: #f0f9f4 !important; border-color: #c1e2cf !important; }
.discount-admin-promotional strong { color: var(--success); }
.section-card { margin-bottom: 18px; }
.table-card { overflow: visible; }
.table-responsive, .responsive-table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th { padding: 12px 16px; background: #f8f8fa; color: #777b84; border-bottom: 1px solid var(--line); font-size: 8px; text-align: left; text-transform: uppercase; letter-spacing: .07em; }
td { padding: 13px 16px; border-bottom: 1px solid #eceef1; color: #484b53; font-size: 11px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfcfd; }
.table-product { min-width: 220px; display: flex; align-items: center; gap: 10px; }
.table-thumb { width: 50px; height: 42px; flex: 0 0 auto; padding: 4px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.table-thumb img { width: 100%; height: 100%; object-fit: contain; }
.table-product > div:last-child { min-width: 0; display: grid; gap: 3px; }
.table-product strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.table-product small { color: var(--muted); font-size: 8px; }
.actions-cell, .table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; white-space: nowrap; }
.actions-cell form, .table-actions form { margin: 0; }
.table-action { padding: 0; border: 0; background: transparent; color: #363940; font-size: 10px; font-weight: 700; }
.table-action.danger { color: var(--danger); }
.empty-table { padding: 36px; text-align: center; color: var(--muted); }
.admin-two-column { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(500px, 1.4fr); gap: 18px; align-items: start; }
.user-list { padding: 0 15px 15px; display: grid; gap: 6px; }
.user-row { min-width: 0; padding: 11px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; }
.user-row .grow { min-width: 0; display: grid; gap: 3px; }
.user-row .grow strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.user-row .grow small { color: var(--muted); font-size: 8px; }
.row-menu { position: relative; }
.row-menu summary { list-style: none; cursor: pointer; color: var(--red); font-size: 10px; font-weight: 700; }
.row-menu summary::-webkit-details-marker { display: none; }
.menu-popover { position: absolute; right: 0; top: 28px; z-index: 10; width: 210px; padding: 10px; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.menu-popover form { display: grid; gap: 6px; }
.menu-popover input { width: 100%; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; }
.menu-popover button { padding: 8px; border: 0; border-radius: 8px; background: #f1f2f4; font-size: 9px; font-weight: 700; }
.audit-action { padding: 5px 7px; border-radius: 7px; background: #f0f1f3; font-size: 8px; font-weight: 700; }

/* Vendedor */
.seller-mode { background: #f4f5f7; }
.seller-shell { min-height: 100vh; }
.seller-topbar { position: sticky; top: 0; z-index: 30; height: 70px; padding: 0 max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; gap: 14px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.seller-brand { min-width: 0; display: flex; align-items: center; gap: 10px; }
.seller-brand img { width: 58px; height: 50px; object-fit: contain; }
.seller-brand span { min-width: 0; display: grid; gap: 2px; }
.seller-brand strong { font-size: 13px; }
.seller-brand small { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }
.seller-account { position: relative; }
.seller-account summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; }
.seller-account summary::-webkit-details-marker { display: none; }
.seller-account-menu { position: absolute; right: 0; top: 46px; width: 185px; padding: 7px; display: grid; gap: 3px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.seller-account-menu a, .seller-account-menu button { width: 100%; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; font-size: 10px; font-weight: 700; }
.seller-account-menu a:hover, .seller-account-menu button:hover { background: #f3f4f6; }
.seller-page-heading { width: min(100%, 1240px); margin: 0 auto; padding: 26px 24px 0; }
.seller-page-heading h1 { margin: 0; font-size: 27px; letter-spacing: -.04em; }
.seller-content-wrap { width: min(100%, 1240px); padding-top: 18px; }

/* Login */
.auth-page { background: #fff; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(420px, .95fr); }
.login-visual { position: relative; overflow: hidden; padding: 60px; display: flex; align-items: flex-end; background: linear-gradient(145deg, #940000, #cc0000 65%, #ed2a2a); color: #fff; }
.login-visual::before { content: ""; position: absolute; width: 430px; height: 430px; right: -160px; top: -160px; border: 65px solid rgba(255,255,255,.09); border-radius: 50%; }
.login-visual-content { position: relative; z-index: 1; }
.login-kicker { color: rgba(255,255,255,.72); font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.login-visual h1 { margin: 16px 0 8px; font-size: clamp(42px, 5vw, 68px); line-height: .96; letter-spacing: -.055em; }
.login-visual p { margin: 0; color: rgba(255,255,255,.8); font-size: 14px; }
.login-panel { padding: 46px; display: grid; place-items: center; }
.login-card { width: min(380px, 100%); }
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand img { width: 100px; height: 80px; object-fit: contain; }
.login-brand span { display: grid; gap: 3px; }
.login-brand strong { font-size: 16px; }
.login-brand small { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.login-heading { margin: 34px 0 22px; }
.login-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.login-card .field { margin-bottom: 14px; }

/* Estados */
.empty-state { grid-column: 1 / -1; min-height: 220px; padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px dashed #d5d8dd; border-radius: 14px; background: #fff; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); font-size: var(--text-md, 15px); font-weight: 600; }
.empty-state span { font-size: var(--text-sm, 13px); font-weight: 400; }
.error-state > strong { color: var(--red); font-size: 54px; }
.error-state h2 { margin: 0 0 15px; font-size: 17px; }
.narrow-panel { max-width: 650px; }

/* Responsividade */
@media (max-width: 1180px) {
  .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commercial-admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-model-item { grid-template-columns: 62px minmax(130px, .8fr) minmax(300px, 1.2fr) 18px; }
}

@media (max-width: 980px) {
  .app-shell, .app-shell.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar, .app-shell.sidebar-collapsed .sidebar { position: fixed; left: -270px; width: 252px; height: 100dvh; transition: left .22s ease; box-shadow: 20px 0 50px rgba(0,0,0,.2); }
  .sidebar.open, .app-shell.sidebar-collapsed .sidebar.open { left: 0; }
  .app-shell.sidebar-collapsed .brand-full, .app-shell.sidebar-collapsed .brand-copy, .app-shell.sidebar-collapsed .nav-label, .app-shell.sidebar-collapsed .nav-section, .app-shell.sidebar-collapsed .user-copy { display: initial; }
  .app-shell.sidebar-collapsed .brand-wing { display: none; }
  .app-shell.sidebar-collapsed .sidebar-brand { justify-content: flex-start; }
  .app-shell.sidebar-collapsed .nav-item { justify-content: flex-start; padding: 0 12px; }
  .app-shell.sidebar-collapsed .user-mini { justify-content: flex-start; }
  .app-shell.sidebar-collapsed .link-button { justify-content: flex-start; padding: 0 8px; }
  .sidebar-toggle { display: none; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 35; display: block; background: rgba(14,15,18,.48); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .app-shell.mobile-menu-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
  .mobile-menu-button { display: grid; }
  .topbar { height: 76px; padding: 0 22px; }
  .content-wrap { padding: 24px 22px 48px; }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-image { min-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .simulator-layout { grid-template-columns: 1fr; }
  .proposal-card { position: static; }
  .admin-two-column { grid-template-columns: 1fr; }
  .dashboard-model-item { grid-template-columns: 58px minmax(0, 1fr) 18px; grid-template-areas: "thumb info arrow" "thumb commercial arrow"; gap: 8px 12px; }
  .dashboard-model-thumb { grid-area: thumb; }
  .dashboard-model-info { grid-area: info; }
  .dashboard-model-commercial { grid-area: commercial; }
  .dashboard-model-arrow { grid-area: arrow; }
}

@media (max-width: 700px) {
  .topbar { padding: 0 14px; }
  .topbar-profile { display: none; }
  .topbar h1 { font-size: 22px; }
  .content-wrap { padding: 16px 12px 36px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar .button { width: 100%; }
  .catalog-filter { grid-template-columns: 1fr; }
  .catalog-filter .button { width: 100%; }
  .catalog-grid { grid-template-columns: 1fr; width: 100%; }
  .motorcycle-card { max-width: none; width: 100%; }
  .motorcycle-image { height: 220px; }
  .form-grid, .form-grid.two-columns, .form-grid.three-columns, .technical-form-grid { grid-template-columns: 1fr; padding: 17px; }
  .field-span { grid-column: auto; }
  .calculated-margins { grid-template-columns: 1fr; padding: 0 17px 17px; }
  .form-actions { position: sticky; bottom: 0; z-index: 10; padding: 11px; background: rgba(255,255,255,.95); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
  .form-actions .button { flex: 1; }
  .dashboard-stat-grid { gap: 10px; }
  .dashboard-stat-card { min-height: 96px; padding: 15px; }
  .dashboard-stat-card span { font-size: 9px; }
  .dashboard-stat-card strong { font-size: 27px; }
  .dashboard-panel-header { padding: 0 15px; }
  .dashboard-model-item { padding: 12px; }
  .dashboard-model-commercial { grid-template-columns: 1fr; }
  .dashboard-model-price { padding: 8px 10px; }
  .commercial-admin-grid { grid-template-columns: 1fr; }
  .data-grid, .seller-commercial-data { grid-template-columns: 1fr; padding: 16px; }
  .commercial-item-grid, .available-aggregates { grid-template-columns: 1fr; padding: 0 16px 16px; }
  .technical-spec-grid { grid-template-columns: 1fr; padding: 0 16px 16px; }
  .technical-spec-wide { grid-column: auto; }
  .detail-main { padding: 22px; }
  .detail-price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .refined-price-box { padding: 10px; }
  .refined-price-box > strong { font-size: 16px; }
  .seller-topbar { height: 64px; padding-left: 12px; padding-right: 12px; }
  .seller-brand img { width: 50px; height: 43px; }
  .seller-brand small, .account-name { display: none; }
  .seller-page-heading { padding: 21px 14px 0; }
  .seller-page-heading h1 { font-size: 23px; }
  .seller-content-wrap { padding: 15px 14px calc(32px + env(safe-area-inset-bottom)); }
  .aggregate-selector { margin: 0 17px 17px; }
  .simulator-rules { margin: 0 17px; }
  .proposal-card { padding: 21px; }
  .proposal-total strong { font-size: 27px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .button { width: 100%; }
  .user-row { flex-wrap: wrap; }
}

@media (max-width: 430px) {
  .dashboard-stat-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-stat-card { min-height: 90px; }
  .detail-price-grid, .catalog-price-grid { grid-template-columns: 1fr; }
  .motorcycle-image { height: 205px; }
  .aggregate-option { grid-template-columns: 18px minmax(0,1fr); }
  .aggregate-option > b { grid-column: 2; }
  .login-panel { padding: 26px 18px; }
}

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; }
}

@media print {
  body { background: #fff; }
  .sidebar, .sidebar-backdrop, .topbar, .simulator-form-card, .alert { display: none !important; }
  .app-shell { display: block; }
  .content-wrap { padding: 0; }
  .simulator-layout { display: block; }
  .proposal-card { position: static; max-width: 620px; margin: 0 auto; box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .proposal-card .button { display: none; }
}

/* Ajustes profissionais ? proposta, vouchers e enquadramento */
.sidebar-head { min-height: 112px; padding-top: 14px; padding-bottom: 12px; }
.sidebar-brand.logo-only { justify-content: center; }
.sidebar-brand.logo-only .brand-full { width: 102px; height: 82px; object-fit: contain; object-position: center; }
.app-shell.sidebar-collapsed .sidebar-brand.logo-only .brand-full { display: none; }
.seller-brand.logo-only { width: 82px; height: 56px; display: grid; place-items: center; }
.seller-brand.logo-only img { width: 72px; height: 54px; object-fit: contain; object-position: center; }

.motorcycle-image { height: auto; min-height: 228px; aspect-ratio: 16 / 10; padding: 14px; }
.motorcycle-image-stage { width: 100%; height: 100%; min-height: 196px; display: grid; place-items: center; overflow: hidden; }
.motorcycle-image-stage img { width: 88%; height: 88%; max-width: 330px; max-height: 195px; object-fit: contain; object-position: center center; }
.detail-image { min-height: 360px; }
.detail-image-stage { width: 100%; height: 100%; min-height: 300px; display: grid; place-items: center; overflow: hidden; }
.detail-image-stage img { width: 88%; height: 88%; max-width: 560px; max-height: 390px; object-fit: contain; object-position: center; }
.detail-freight { margin: 0 0 16px; padding: 11px 0; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.detail-freight strong { color: var(--ink); font-size: 12px; }

.price-box-heading b { min-width: 44px; justify-content: center; background: var(--red); font-size: 8px; }
.refined-price-box.has-discount { border-color: #e2b8b8; background: #fff7f7; }
.refined-price-box.has-discount > strong { color: var(--red); }
.refined-price-box > em { color: #8a5858; }

.dashboard-price-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.dashboard-price-heading b { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 7px; font-weight: 700; }
.dashboard-model-price.has-discount { background: #fff7f7; border-color: #e5bcbc; }
.dashboard-model-price > small { color: #92959c; font-size: 8px; text-decoration: line-through; }
.dashboard-model-price.has-discount > strong { color: var(--red); }

.proposal-option-section { margin: 0 22px 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fafafb; }
.proposal-option-head { margin-bottom: 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.proposal-option-head > div { display: grid; gap: 3px; }
.proposal-option-head span { font-size: 12px; font-weight: 700; }
.proposal-option-head small { color: var(--muted); font-size: 9px; }
.voucher-options { display: grid; gap: 8px; }
.voucher-option { min-width: 0; padding: 11px 12px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.voucher-option:hover { border-color: #d4a6a6; }
.voucher-option input { width: 17px; height: 17px; accent-color: var(--red); }
.voucher-option-copy { min-width: 0; display: grid; gap: 3px; }
.voucher-option-copy strong { font-size: 11px; }
.voucher-option-copy small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.voucher-option-copy em { color: #8b5c5c; font-size: 8px; font-style: normal; }
.voucher-option > b { color: var(--red); font-size: 12px; white-space: nowrap; }
.proposal-voucher-summary { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.proposal-voucher-title { width: 100%; color: #aeb1b8; font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.proposal-voucher-summary strong { padding: 6px 8px; border-radius: 999px; background: rgba(255,255,255,.09); color: #fff; font-size: 8px; font-weight: 700; }
.proposal-card .button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.proposal-client-dialog { width: min(590px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 18px; background: transparent; }
.proposal-client-dialog::backdrop { background: rgba(12,13,15,.72); backdrop-filter: blur(4px); }
.proposal-client-form { max-height: calc(100vh - 28px); }
.proposal-dialog-summary { margin: 0 0 18px; padding: 13px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; border: 1px solid var(--line); border-radius: 11px; background: #fafafb; }
.proposal-dialog-summary > div { min-width: 0; display: grid; gap: 4px; }
.proposal-dialog-summary span { color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.proposal-dialog-summary strong { overflow-wrap: anywhere; font-size: 11px; }

/* Documento da proposta comercial */
.proposal-document-page { min-height: 100vh; padding: 24px; background: #e9ebef; }
.proposal-document-actions { width: min(900px, 100%); margin: 0 auto 14px; display: flex; justify-content: flex-end; gap: 9px; }
.proposal-document { width: min(900px, 100%); margin: 0 auto; padding: 34px 38px 28px; background: #fff; color: #202126; box-shadow: 0 18px 60px rgba(20,22,26,.14); }
.proposal-document-header { display: grid; grid-template-columns: 105px minmax(0,1fr) auto; align-items: center; gap: 22px; padding-bottom: 22px; border-bottom: 2px solid var(--red); }
.proposal-document-header img { width: 92px; height: 74px; object-fit: contain; }
.proposal-document-title { min-width: 0; }
.proposal-document-title span { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.proposal-document-title h1 { margin: 5px 0 0; font-size: 29px; letter-spacing: -.04em; }
.proposal-document-number { display: grid; gap: 5px; text-align: right; }
.proposal-document-number span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.proposal-document-number strong { font-size: 11px; }
.proposal-validity-strip { margin: 16px 0 22px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.proposal-validity-strip > div { min-width: 0; padding: 11px 13px; display: grid; gap: 4px; border-right: 1px solid var(--line); }
.proposal-validity-strip > div:last-child { border-right: 0; }
.proposal-validity-strip span, .proposal-client-grid span, .proposal-spec-inline span { color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.proposal-validity-strip strong { font-size: 11px; }
.proposal-document-section { margin-top: 22px; break-inside: avoid; }
.proposal-document-section > header { margin-bottom: 12px; display: flex; align-items: center; gap: 9px; }
.proposal-document-section > header > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--red); color: #fff; font-size: 8px; font-weight: 700; }
.proposal-document-section > header h2 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.proposal-client-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--line); }
.proposal-client-grid > div { min-width: 0; min-height: 62px; padding: 11px 13px; display: grid; align-content: center; gap: 5px; background: #fff; }
.proposal-client-grid .wide { grid-column: 1 / -1; }
.proposal-client-grid strong { overflow-wrap: anywhere; font-size: 11px; }
.proposal-bike-block { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 20px; align-items: center; padding: 17px; border: 1px solid var(--line); border-radius: 11px; }
.proposal-bike-image { height: 125px; display: grid; place-items: center; overflow: hidden; }
.proposal-bike-image img { width: 92%; height: 92%; object-fit: contain; }
.proposal-bike-copy > span { color: var(--red); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.proposal-bike-copy h2 { margin: 5px 0 13px; font-size: 21px; }
.proposal-spec-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.proposal-spec-inline > div { padding: 9px 10px; display: grid; gap: 4px; border-radius: 8px; background: #f5f6f8; }
.proposal-spec-inline strong { font-size: 9px; line-height: 1.4; }
.proposal-price-table { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.proposal-price-row { min-height: 55px; padding: 10px 14px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); }
.proposal-price-row.main-row { grid-template-columns: minmax(0,1fr) auto auto; background: #fafafb; }
.proposal-price-row > div { min-width: 0; display: grid; gap: 3px; }
.proposal-price-row strong { font-size: 11px; }
.proposal-price-row small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.proposal-old-price { color: #94979e; font-size: 9px; text-decoration: line-through; }
.proposal-discount-row { padding: 8px 14px; display: flex; justify-content: space-between; gap: 12px; background: #fff3f3; color: var(--red); border-bottom: 1px solid #efcccc; font-size: 9px; }
.proposal-discount-row strong { font-size: 9px; }
.proposal-total-row { padding: 15px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #222429; color: #fff; }
.proposal-total-row span { font-size: 10px; font-weight: 700; }
.proposal-total-row strong { font-size: 21px; }
.muted-row { color: var(--muted); }
.proposal-voucher-list { display: grid; gap: 8px; }
.proposal-voucher-list article { padding: 13px 14px; display: flex; justify-content: space-between; gap: 16px; border: 1px solid #efcaca; border-radius: 10px; background: #fff7f7; }
.proposal-voucher-list article > div { min-width: 0; }
.proposal-voucher-list article strong { font-size: 11px; }
.proposal-voucher-list p { margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; white-space: pre-line; }
.proposal-voucher-list aside { flex: 0 0 auto; display: grid; justify-items: end; gap: 4px; }
.proposal-voucher-list aside strong { color: var(--red); font-size: 13px; }
.proposal-voucher-list aside span { color: var(--muted); font-size: 8px; }
.proposal-terms { padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; }
.proposal-terms p { margin: 0 0 7px; color: #5d6068; font-size: 8px; line-height: 1.5; }
.proposal-terms p:last-child { margin-bottom: 0; }
.proposal-terms .proposal-custom-note { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 9px; white-space: pre-line; }
.proposal-signatures { margin-top: 50px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.proposal-signatures > div { display: grid; justify-items: center; text-align: center; }
.proposal-signatures span { width: 100%; border-top: 1px solid #5c5f66; }
.proposal-signatures strong { margin-top: 7px; font-size: 9px; }
.proposal-signatures small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.proposal-document-footer { margin-top: 30px; padding-top: 14px; display: grid; grid-template-columns: auto auto minmax(0,1fr); align-items: center; gap: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 7px; }
.proposal-document-footer strong { color: var(--red); font-size: 8px; }
.proposal-document-footer span:last-child { text-align: right; }

@media (max-width: 700px) {
  .sidebar-brand.logo-only .brand-full { width: 92px; height: 74px; }
  .proposal-option-section { margin: 0 17px 14px; padding: 13px; }
  .voucher-option { grid-template-columns: 18px minmax(0,1fr); }
  .voucher-option > b { grid-column: 2; }
  .proposal-dialog-summary { grid-template-columns: 1fr; }
  .proposal-document-page { padding: 0; background: #fff; }
  .proposal-document-actions { padding: 10px; margin: 0; }
  .proposal-document { padding: 24px 18px; box-shadow: none; }
  .proposal-document-header { grid-template-columns: 75px minmax(0,1fr); gap: 12px; }
  .proposal-document-header img { width: 68px; height: 55px; }
  .proposal-document-number { grid-column: 1 / -1; text-align: left; }
  .proposal-validity-strip { grid-template-columns: 1fr; }
  .proposal-validity-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .proposal-validity-strip > div:last-child { border-bottom: 0; }
  .proposal-bike-block { grid-template-columns: 1fr; }
  .proposal-bike-image { height: 150px; }
  .proposal-client-grid { grid-template-columns: 1fr; }
  .proposal-client-grid .wide { grid-column: auto; }
  .proposal-price-row.main-row { grid-template-columns: minmax(0,1fr) auto; }
  .proposal-old-price { grid-column: 2; }
  .proposal-signatures { gap: 24px; }
  .proposal-document-footer { grid-template-columns: 1fr; }
  .proposal-document-footer span:last-child { text-align: left; }
}

@media print {
  @page { size: A4; margin: 10mm; }
  .proposal-document-page { padding: 0; background: #fff; }
  .proposal-document-actions { display: none !important; }
  .proposal-document { width: 100%; padding: 0; box-shadow: none; }
  .proposal-document-header, .proposal-validity-strip, .proposal-price-table, .proposal-voucher-list article, .proposal-total-row { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .proposal-document-section { break-inside: avoid; }
}

/* Navega??o administrativa em grupos recolh?veis ? v16 */
.nav-accordion {
  gap: 10px;
  padding-bottom: 6px;
}
.nav-group {
  min-width: 0;
  border-radius: 14px;
}
.nav-group-toggle {
  width: 100%;
  min-height: 48px;
  padding: 0 11px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #48505e;
  text-align: left;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.nav-group-toggle:hover {
  background: #f5f6f8;
  color: var(--ink);
}
.nav-group-toggle .nav-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f3f4f6;
  color: #465163;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.nav-group-toggle .nav-icon svg {
  width: 19px;
  height: 19px;
}
.nav-group-toggle .nav-label {
  font-size: 13px;
  font-weight: 700;
}
.nav-chevron {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: #8b919c;
  transition: transform .2s ease;
}
.nav-chevron svg {
  width: 15px;
  height: 15px;
}
.nav-group.open > .nav-group-toggle .nav-chevron {
  transform: rotate(90deg);
}
.nav-group.active-group > .nav-group-toggle,
.nav-group.open > .nav-group-toggle {
  background: #f7f8fa;
}
.nav-group.active-group > .nav-group-toggle .nav-icon {
  background: var(--red-soft);
  color: var(--red);
  box-shadow: 0 6px 15px rgba(204, 0, 0, .08);
}
.nav-submenu {
  max-height: 0;
  margin: 0;
  padding: 0 9px;
  overflow: hidden;
  border-left: 2px solid transparent;
  opacity: 0;
  transition: max-height .24s ease, opacity .18s ease, margin .2s ease, padding .2s ease;
}
.nav-group.open > .nav-submenu {
  max-height: 260px;
  margin: 5px 0 0;
  padding: 6px 7px 7px 12px;
  border-left-color: #efb8bb;
  opacity: 1;
}
.nav-subitem {
  min-height: 40px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-radius: 9px;
  color: #69717f;
  font-size: 12px;
  font-weight: 600;
  transition: background .16s ease, color .16s ease;
}
.nav-subitem:hover {
  background: #fff;
  color: var(--ink);
}
.nav-subitem.active {
  background: var(--red-soft);
  color: var(--red);
  font-weight: 700;
}
.nav-subicon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f1f2f4;
  color: #687181;
}
.nav-subicon svg {
  width: 14px;
  height: 14px;
}
.nav-subitem.active .nav-subicon {
  background: #fff;
  color: var(--red);
  box-shadow: 0 4px 10px rgba(204, 0, 0, .08);
}

/* Bot?o de recolher fica dentro do cabe?alho e n?o invade o conte?do. */
.sidebar-head {
  min-height: 112px;
  padding: 14px 16px 12px;
}
.sidebar-toggle {
  right: 10px;
  top: auto;
  bottom: 10px;
  transform: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: none;
}
.app-shell.sidebar-collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

/* Estado recolhido: somente os ?cones dos grupos principais. */
.app-shell.sidebar-collapsed .sidebar-scroll {
  padding: 4px 9px 14px;
}
.app-shell.sidebar-collapsed .nav-accordion {
  gap: 9px;
}
.app-shell.sidebar-collapsed .nav-group-toggle {
  min-height: 48px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
}
.app-shell.sidebar-collapsed .nav-group-toggle .nav-icon {
  width: 42px;
  height: 42px;
}
.app-shell.sidebar-collapsed .nav-group-toggle .nav-label,
.app-shell.sidebar-collapsed .nav-chevron,
.app-shell.sidebar-collapsed .nav-submenu {
  display: none !important;
}
.app-shell.sidebar-collapsed .nav-group.active-group > .nav-group-toggle {
  position: relative;
  background: transparent;
}
.app-shell.sidebar-collapsed .nav-group.active-group > .nav-group-toggle::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 5px;
  bottom: 5px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--red);
}
.app-shell.sidebar-collapsed .nav-group.active-group > .nav-group-toggle .nav-icon {
  background: var(--red-soft);
  color: var(--red);
}

@media (max-width: 980px) {
  .sidebar-head {
    min-height: 104px;
    padding: 12px 16px;
  }
  .nav-group-toggle {
    min-height: 48px;
  }
  .app-shell.sidebar-collapsed .nav-group-toggle {
    grid-template-columns: 38px minmax(0, 1fr) 20px;
    justify-items: initial;
    padding: 0 11px;
  }
  .app-shell.sidebar-collapsed .nav-group-toggle .nav-label,
  .app-shell.sidebar-collapsed .nav-chevron {
    display: initial !important;
  }
  .app-shell.sidebar-collapsed .nav-submenu {
    display: block !important;
  }
  .app-shell.sidebar-collapsed .nav-group.active-group > .nav-group-toggle::before {
    display: none;
  }
}

/* Posicionamento final do controle lateral */
.sidebar-toggle {
  top: 10px;
  right: 10px;
  bottom: auto;
}
.app-shell.sidebar-collapsed .sidebar-head {
  min-height: 126px;
  padding-top: 15px;
  align-items: flex-start;
}
.app-shell.sidebar-collapsed .sidebar-toggle {
  top: auto;
  right: auto;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}
@media (max-width: 980px) {
  .app-shell.sidebar-collapsed .sidebar-head {
    min-height: 104px;
    padding: 12px 16px;
    align-items: center;
  }
}

/* Gest?o de usu?rios e or?amentos */
.seller-quick-nav { display:flex; align-items:center; gap:8px; margin-left:18px; }
.seller-quick-nav a { padding:9px 12px; border-radius:9px; color:var(--muted); font-size:12px; font-weight:700; }
.seller-quick-nav a:hover,.seller-quick-nav a.active { color:var(--red); background:var(--red-soft); }
.management-stats,.budget-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:20px; }
.management-stats article,.budget-stat-grid article { min-height:104px; padding:18px 20px; border:1px solid var(--line); border-radius:15px; background:#fff; box-shadow:0 8px 24px rgba(20,22,26,.035); display:grid; align-content:center; gap:7px; }
.management-stats span,.budget-stat-grid span { color:var(--muted); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.045em; }
.management-stats strong,.budget-stat-grid strong { font-size:30px; letter-spacing:-.04em; }
.budget-stat-grid article.attention { border-color:#f1d4ae; background:#fff9f0; }
.budget-stat-grid article.attention strong { color:#9a6410; }
.management-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:16px; }
.management-filters { min-width:0; flex:1; display:flex; align-items:center; gap:9px; }
.management-filters .search-box { flex:1 1 360px; max-width:560px; }
.management-filters select { min-width:150px; height:44px; border:1px solid var(--line); border-radius:11px; background:#fff; padding:0 36px 0 12px; color:var(--ink); }
.button-ghost { background:transparent; color:var(--muted); border-color:var(--line); }
.users-table-card,.budget-table-card { overflow:hidden; }
.management-table { min-width:980px; }
.management-table th { position:sticky; top:0; z-index:1; }
.management-table td { height:64px; }
.actions-heading { text-align:right; }
.table-user { display:flex; align-items:center; gap:10px; min-width:190px; }
.table-user .avatar { width:32px; height:32px; background:var(--red-soft); color:var(--red); }
.role-badge { display:inline-flex; padding:6px 9px; border-radius:999px; font-size:9px; font-weight:700; }
.role-seller { background:#edf5ff; color:#2465a8; }
.role-manager { background:#f1edff; color:#6545ad; }
.role-admin { background:var(--red-soft); color:var(--red); }
.table-row-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; white-space:nowrap; }
.table-row-actions form { margin:0; }
.table-action.success { color:var(--success); }
.management-dialog { width:min(520px,calc(100% - 28px)); border:0; padding:0; border-radius:17px; box-shadow:0 28px 90px rgba(0,0,0,.28); }
.management-dialog::backdrop { background:rgba(17,18,21,.55); backdrop-filter:blur(4px); }
.dialog-copy { margin:0 0 18px; color:var(--muted); font-size:12px; line-height:1.6; }
.aggregate-price-badge,.aggregate-confirm-badge { display:inline-flex; width:fit-content; margin-top:8px; padding:6px 9px; border-radius:999px; background:#f1f2f4; color:#525660; font-size:9px; font-weight:700; }
.aggregate-confirm-badge { background:#fff4e4; color:#8d5c12; }
.nbs-budget-warning { margin-top:14px; padding:11px 12px; border:1px solid #f0d2a8; border-radius:10px; background:#fff8ed; color:#7d5313; font-size:10px; line-height:1.45; font-weight:700; }
.nbs-budget-warning.dialog-warning { margin:0 0 14px; }
.budget-nbs-document-warning { margin:18px 0 0; padding:13px 16px; border:1px solid #edc987; border-radius:10px; background:#fff8e9; display:flex; align-items:center; gap:12px; color:#70501a; font-size:11px; }
.budget-nbs-document-warning strong { color:#8f5e10; text-transform:uppercase; letter-spacing:.05em; }
.budget-notification { margin-bottom:16px; padding:14px 16px; border:1px solid #efcf9d; border-radius:13px; background:#fff8eb; display:flex; align-items:center; gap:10px; color:#74501a; }
.budget-notification strong { font-size:12px; }
.budget-notification span { font-size:11px; }
.budget-client { display:grid; gap:3px; min-width:170px; }
.budget-client span { color:var(--muted); font-size:10px; }
.budget-status { display:inline-flex; max-width:170px; padding:6px 9px; border-radius:999px; font-size:9px; line-height:1.25; font-weight:700; }
.budget-status-active { background:#eaf8f1; color:var(--success); }
.budget-status-expired_pending { background:#fff2df; color:#96600c; }
.budget-status-lost { background:#f2f2f4; color:#666b75; }
.budget-status-won { background:#e7f4ff; color:#1d659c; }
.expired-budget-summary { display:grid; gap:4px; margin-bottom:16px; padding:12px 14px; border-radius:11px; background:#f6f7f9; }
.expired-budget-summary strong { font-size:13px; }
.expired-budget-summary span { color:var(--muted); font-size:10px; }

@media (max-width: 1050px) {
  .management-stats,.budget-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .management-toolbar,.management-filters { align-items:stretch; }
  .management-toolbar { flex-direction:column; }
  .management-toolbar > .button { align-self:flex-end; }
  .management-filters { flex-wrap:wrap; }
  .management-filters .search-box { max-width:none; flex-basis:100%; }
}
@media (max-width:650px) {
  .seller-quick-nav { margin-left:auto; gap:2px; }
  .seller-quick-nav a { padding:8px 9px; font-size:10px; }
  .seller-account .account-name { display:none; }
  .management-stats,.budget-stat-grid { gap:9px; }
  .management-stats article,.budget-stat-grid article { min-height:86px; padding:14px; }
  .management-stats strong,.budget-stat-grid strong { font-size:25px; }
  .management-toolbar > .button { width:100%; align-self:stretch; }
  .management-filters { display:grid; grid-template-columns:1fr 1fr; width:100%; }
  .management-filters .search-box { grid-column:1/-1; }
  .management-filters select,
  .management-filters .custom-select,
  .management-filters .custom-select-trigger { width:100%; min-width:0; }
  .management-filters .button { width:100%; }
  .budget-notification { align-items:flex-start; flex-direction:column; }
  .proposal-document .budget-nbs-document-warning { flex-direction:column; align-items:flex-start; }
}


/* Ajustes de or?amento, confirma??o e usu?rios ? v18 */
.aggregate-confirmation-dialog .dialog-card { width: min(460px, calc(100vw - 28px)); }
.aggregate-confirmation-copy { padding: 4px 2px 18px; }
.aggregate-confirmation-copy p { margin: 0; color: #363941; font-size: 14px; line-height: 1.55; }
.proposal-form-error { margin: 0 0 14px; padding: 12px 14px; border: 1px solid #efc4c4; border-radius: 10px; background: #fff2f2; color: #9d2020; font-size: 12px; line-height: 1.45; font-weight: 700; }

.proposal-document { font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 1.45; }
.proposal-validity-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.proposal-data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--line); }
.proposal-data-grid > div { min-width: 0; min-height: 60px; padding: 12px 14px; display: grid; align-content: center; gap: 5px; background: #fff; }
.proposal-data-grid .wide { grid-column: 1 / -1; }
.proposal-data-grid span,
.proposal-validity-strip span,
.proposal-spec-inline span { color: var(--muted); font-size: 9px; line-height: 1.25; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.proposal-data-grid strong,
.proposal-validity-strip strong,
.proposal-spec-inline strong,
.proposal-price-row strong,
.proposal-voucher-list article strong,
.proposal-signatures strong { overflow-wrap: anywhere; font-size: 11px; line-height: 1.4; font-weight: 700; }
.proposal-seller-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.proposal-document-section > header h2 { font-size: 15px; font-weight: 700; }
.proposal-price-row small,
.proposal-voucher-list p,
.proposal-voucher-list aside span,
.proposal-terms p,
.proposal-signatures small { font-size: 9px; line-height: 1.45; }
.proposal-discount-row,
.proposal-discount-row strong { font-size: 10px; }
.proposal-total-row span { font-size: 11px; }
.proposal-total-row strong { font-size: 20px; }
.users-table td:nth-child(2),
.users-table td:nth-child(3),
.users-table td:nth-child(4) { white-space: nowrap; }

@media (max-width: 700px) {
  .proposal-data-grid,
  .proposal-seller-grid { grid-template-columns: 1fr; }
  .proposal-data-grid .wide { grid-column: auto; }
}


/* Or?amentos e filtros ? tipografia alinhada ao restante da UI */
.management-filters .search-box,
.management-filters .search-box input,
.management-filters select,
.management-filters select option,
.management-filters .button { font-size: 12px; font-weight: 600; line-height: 1.2; }
.management-filters .search-box input::placeholder { font-size: 12px; font-weight: 500; }
.management-filters select { appearance: auto; }
.budget-total-cell { display: grid; gap: 5px; white-space: nowrap; }
.budget-total-cell span { width: fit-content; padding: 4px 7px; border-radius: 999px; background: #edf7f1; color: var(--success); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .035em; }
.approval-adjustment-row { background: #f7f8fa; }
.approval-adjustment-row strong:last-child { color: var(--red); }
#confirmationMessageField[hidden] { display: none; }

.management-filters .search-box,
.management-filters select,
.management-filters .button { height: 44px; min-height: 44px; }
.aggregate-confirmation-preview { padding: 9px 10px; border-radius: 9px; background: #fff8eb; color: #6f501d !important; }
.aggregate-confirmation-preview strong { color: #8c5e12; }

/* v20 ? empresas, v?nculos por loja e cidade do cliente */
.user-company-cell { min-width: 190px; max-width: 320px; white-space: normal; line-height: 1.45; }
.user-company-assignment { display: grid; gap: 14px; }
.company-checkbox-field { margin: 0; padding: 0; border: 0; }
.company-checkbox-field legend { margin-bottom: 8px; color: #40434b; font-size: 11px; font-weight: 700; }
.company-checkbox-list { max-height: 210px; overflow-y: auto; display: grid; gap: 7px; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: #fafafb; }
.company-checkbox-list label { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; }
.company-checkbox-list label:hover { border-color: #dddfe4; background: #fff; }
.company-checkbox-list input { width: 17px; height: 17px; accent-color: var(--red); }
.company-checkbox-list label > span { display: grid; gap: 2px; }
.company-checkbox-list strong { font-size: 11px; }
.company-checkbox-list small { color: var(--muted); font-size: 9px; }
.cep-field-grid { display: grid; grid-template-columns: minmax(150px, .65fr) minmax(220px, 1.35fr); gap: 12px; }
.cep-field-grid input[readonly] { color: #343740; background: #f4f5f7; font-weight: 700; }
.cep-lookup-status { margin-top: -6px; padding: 9px 11px; border-radius: 9px; font-size: 10px; font-weight: 700; }
.cep-lookup-status.loading { color: #5f6470; background: #f0f1f3; }
.cep-lookup-status.success { color: #12663f; background: #eaf8f1; }
.cep-lookup-status.danger { color: #a52a20; background: #fff0ef; }
.proposal-document-title small { margin-top: 4px; color: #6e727c; font-size: 9px; font-weight: 700; }
.companies-table td:first-child { min-width: 230px; }

@media (max-width: 760px) {
  .cep-field-grid { grid-template-columns: 1fr; }
  .company-checkbox-list { max-height: 180px; }
}

/* A??es destrutivas e auditoria filtrada */
.button-danger { color:#a82820; background:#fff; border-color:#efc9c5; }
.button-danger:hover { background:#fff1ef; border-color:#e9aaa4; }
.link-button.danger { color:var(--danger); }
.audit-toolbar { align-items:flex-end; }
.audit-filters { align-items:flex-end; width:100%; }
.audit-filters .field { margin:0; min-width:150px; }
.audit-filters .field > span { display:block; margin-bottom:6px; color:var(--muted); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.audit-filters input,.audit-filters select { height:42px; border:1px solid var(--line); border-radius:11px; background:#fff; padding:0 12px; color:var(--ink); }
.audit-user-field { min-width:280px!important; flex:1; }
.audit-empty-state { min-height:190px; display:grid; place-items:center; align-content:center; gap:6px; color:var(--muted); }
.audit-empty-state strong { color:var(--ink); }
@media(max-width:760px){.audit-filters{display:grid;grid-template-columns:1fr 1fr}.audit-user-field{grid-column:1/-1;min-width:0!important}.audit-filters .button{width:100%}}

/* v22 ? resultado de or?amento, seletores padronizados e grades */
.actions-cell { display: table-cell; text-align: right; vertical-align: middle; }
.actions-cell .table-row-actions { justify-content: flex-end; }
.users-table-compact { min-width: 760px; }
.users-table-compact th:nth-child(1) { width: 38%; }
.users-table-compact th:nth-child(2) { width: 22%; }
.users-table-compact th:nth-child(3),
.users-table-compact th:nth-child(4) { width: 14%; }
.users-table-compact th:last-child { width: 12%; }

.model-selection-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.model-selection-field > legend { margin-bottom: 8px; color: #40434b; font-size: 11px; line-height: 1.3; font-weight: 700; }
.model-selection-list { max-height: 330px; overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fafafb; }
.model-selection-list label { min-width: 0; min-height: 45px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid transparent; border-radius: 9px; background: #fff; cursor: pointer; }
.model-selection-list label:hover { border-color: #d9dce2; }
.model-selection-list input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--red); }
.model-selection-list label > span { min-width: 0; display: grid; gap: 2px; }
.model-selection-list strong { overflow: hidden; color: var(--ink); font-family: inherit; font-size: 11px; line-height: 1.35; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.model-selection-list small { color: var(--muted); font-family: inherit; font-size: 9px; line-height: 1.3; }
#motorcycleSelection.is-disabled { opacity: .55; }

.budget-outcome-detail { display: block; max-width: 210px; margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.budget-result-dialog .dialog-card { width: min(650px, calc(100vw - 28px)); }
.outcome-choice { margin: 0 0 16px; padding: 0; border: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.outcome-choice legend { width: 100%; margin-bottom: 8px; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.outcome-choice label { min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.outcome-choice label:has(input:checked) { border-color: #e1a1a5; background: var(--red-soft); box-shadow: inset 0 0 0 1px rgba(181,18,27,.08); }
.outcome-choice input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--red); }
.outcome-choice label > span { display: grid; gap: 4px; }
.outcome-choice strong { font-size: 12px; }
.outcome-choice small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.result-fields { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafafb; }
.result-fields[hidden] { display: none; }
.result-fields [data-chassis-input] { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

.settings-form { max-width: 880px; }
.settings-card { overflow: hidden; }
.settings-fields { padding-bottom: 4px; }
.settings-days-field { max-width: 360px; }
.field-with-suffix { display: flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.field-with-suffix input { min-width: 0; flex: 1; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.field-with-suffix strong { height: 100%; padding: 0 14px; display: flex; align-items: center; border-left: 1px solid var(--line); color: var(--muted); background: #f6f7f9; font-size: 10px; white-space: nowrap; }
.proposal-standard-terms { white-space: pre-line; }

@media (max-width: 720px) {
  .model-selection-list { grid-template-columns: 1fr; max-height: 290px; }
  .outcome-choice { grid-template-columns: 1fr; }
}

/* Vers?o final ? perfis, aprova??o e responsividade */
.role-corporate { background:#e9f3ff; color:#245f96; }
.user-management-stats { grid-template-columns:repeat(5,minmax(0,1fr)); }
.budget-number-cell { display:grid; gap:3px; min-width:92px; }
.budget-number-cell small { color:var(--muted); font-size:8px; font-weight:700; }
.approval-badge { display:inline-flex; width:fit-content; padding:6px 9px; border-radius:999px; font-size:8px; line-height:1.25; font-weight:700; white-space:nowrap; }
.approval-not_required { background:#f1f2f4; color:#5f6470; }
.approval-pending { background:#fff3df; color:#8d5b0c; }
.approval-approved { background:#eaf8f1; color:#12663f; }
.approval-rejected { background:#fff0ef; color:#a52a20; }
.approval-detail { display:block; max-width:170px; margin-top:5px; color:var(--muted); font-size:8px; line-height:1.35; }
.approval-summary { display:grid; gap:4px; margin-bottom:16px; padding:14px; border:1px solid var(--line); border-radius:12px; background:#f7f8fa; }
.approval-summary span,.approval-comparison span,.approval-request-note span { color:var(--muted); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.045em; }
.approval-summary strong { font-size:24px; letter-spacing:-.035em; }
.approval-summary small { color:var(--muted); font-size:10px; }
.approval-comparison { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.approval-comparison > div { min-width:0; display:grid; gap:5px; padding:13px; border:1px solid var(--line); border-radius:11px; background:#f7f8fa; }
.approval-comparison strong { overflow-wrap:anywhere; font-size:17px; }
.approval-request-note { margin-bottom:14px; padding:12px 14px; border-left:3px solid var(--red); border-radius:0 10px 10px 0; background:var(--red-soft); }
.approval-request-note p { margin:5px 0 0; color:#4c3033; font-size:11px; line-height:1.55; white-space:pre-line; }
.approval-actions { display:grid; grid-template-columns:1fr 1fr; }
.price-request-dialog .dialog-card,.price-approval-dialog .dialog-card { width:min(590px,calc(100vw - 28px)); }
.budget-table { min-width:1320px; }
.budget-table-card .table-responsive { width:100%; max-width:100%; overflow:auto; overscroll-behavior-inline:contain; }
.budget-mobile-list { display:none; }
.history-header-row { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-bottom:18px; }
.history-header-row h2 { margin:5px 0 0; font-size:25px; letter-spacing:-.035em; }
.history-header-row p { margin:5px 0 0; color:var(--muted); font-size:11px; }
.budget-history-list { display:grid; gap:12px; max-width:920px; }
.budget-history-card { overflow:hidden; border:1px solid var(--line); border-radius:14px; background:#fff; box-shadow:0 8px 24px rgba(20,22,26,.035); }
.budget-history-card > header { min-height:58px; padding:12px 16px; display:flex; align-items:center; justify-content:space-between; gap:14px; border-bottom:1px solid var(--line); }
.budget-history-card > header > div { display:grid; gap:3px; }
.budget-history-card > header strong { font-size:13px; }
.budget-history-card > header span,.budget-history-card time { color:var(--muted); font-size:9px; }
.budget-history-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
.budget-history-grid > div { min-width:0; display:grid; gap:5px; padding:14px 16px; border-right:1px solid var(--line); }
.budget-history-grid > div:last-child { border-right:0; }
.budget-history-grid span { color:var(--muted); font-size:8px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.budget-history-grid strong { overflow-wrap:anywhere; font-size:11px; }
.proposal-document-number small { margin-top:3px; color:var(--muted); font-size:8px; font-weight:700; }

/* Prote??es gerais contra estouro de layout */
.app-shell,.main-content,.content-wrap,.card,.toolbar,.management-toolbar,.management-filters { min-width:0; }
.content-wrap { width:100%; }
.card { max-width:100%; }
.form-grid > *,.simulator-layout > *,.dashboard-model-item > * { min-width:0; }
input,select,textarea { max-width:100%; }

@media (max-width:1180px) {
  .user-management-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:900px) {
  .budget-history-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .budget-history-grid > div:nth-child(2) { border-right:0; }
  .budget-history-grid > div:nth-child(-n+2) { border-bottom:1px solid var(--line); }
}
@media (max-width:760px) {
  .budget-table-card { display:none; }
  .budget-mobile-list { display:grid; gap:12px; }
  .budget-mobile-card { min-width:0; padding:15px; border:1px solid var(--line); border-radius:15px; background:#fff; box-shadow:0 8px 24px rgba(20,22,26,.04); }
  .budget-mobile-card > header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
  .budget-mobile-card > header > div { display:grid; gap:3px; }
  .budget-mobile-card > header strong { font-size:13px; }
  .budget-mobile-card > header small { color:var(--muted); font-size:8px; }
  .budget-mobile-client { display:grid; gap:4px; margin:14px 0; padding-bottom:13px; border-bottom:1px solid var(--line); }
  .budget-mobile-client strong { font-size:13px; }
  .budget-mobile-client span { color:var(--muted); font-size:9px; overflow-wrap:anywhere; }
  .budget-mobile-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .budget-mobile-meta > div { min-width:0; display:grid; gap:3px; }
  .budget-mobile-meta span { color:var(--muted); font-size:8px; font-weight:700; text-transform:uppercase; }
  .budget-mobile-meta strong { overflow-wrap:anywhere; font-size:10px; }
  .budget-mobile-approval { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:13px; }
  .budget-mobile-approval small { color:var(--muted); font-size:9px; }
  .budget-mobile-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:14px; }
  .budget-mobile-actions form { display:contents; }
  .budget-mobile-actions .button { width:100%; min-width:0; padding:0 9px; font-size:10px; }
  .user-management-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .approval-comparison { grid-template-columns:1fr; }
  .approval-actions { grid-template-columns:1fr; }
  .history-header-row { align-items:stretch; flex-direction:column; }
  .history-header-row .button { width:100%; }
}
@media (max-width:480px) {
  .budget-history-grid { grid-template-columns:1fr; }
  .budget-history-grid > div { border-right:0; border-bottom:1px solid var(--line); }
  .budget-history-grid > div:last-child { border-bottom:0; }
  .user-management-stats { grid-template-columns:1fr 1fr; }
}


/* Revis?o final de UX, responsividade e tipografia */
:root {
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html, body, button, input, select, textarea, option, optgroup, table, dialog, fieldset, legend, summary {
  font-family: var(--font-sans);
}
.proposal-document { font-family: var(--font-sans); }

/* Filtros da tela de or?amentos */
.budget-toolbar { gap: 12px; }
.budget-toolbar .management-filters { flex-wrap: wrap; }
.budget-search-box { flex: 1 1 410px !important; min-width: 260px; max-width: 620px !important; }
.column-visibility-toggle {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: #4b4f58;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.column-visibility-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--red); }

/* Tabela de or?amentos sem rolagem horizontal por padr?o */
.budget-table { width: 100%; min-width: 0; table-layout: fixed; }
.budget-table-card .table-responsive { overflow: visible; }
.budget-table th,
.budget-table td { min-width: 0; padding: 12px 9px; overflow-wrap: anywhere; }
.budget-table .col-budget-number { width: 8.5%; }
.budget-table .col-budget-client { width: 17%; }
.budget-table .col-budget-bike { width: 9%; }
.budget-table .col-budget-seller { width: 9%; }
.budget-table .col-budget-company { width: 9%; }
.budget-table .col-budget-date { width: 7%; }
.budget-table .col-budget-total { width: 8.5%; }
.budget-table .col-budget-approval { width: 10.5%; }
.budget-table .col-budget-status { width: 10%; }
.budget-table .col-budget-actions { width: 13.5%; }
.budget-client,
.budget-number-cell,
.budget-total-cell { min-width: 0; }
.budget-client strong,
.budget-client span,
.budget-bike-name,
.budget-seller-name,
.budget-company-name { display: block; overflow: hidden; text-overflow: ellipsis; }
.budget-client strong,
.budget-bike-name,
.budget-seller-name,
.budget-company-name { white-space: nowrap; }
.budget-client span { margin-top: 4px; white-space: normal; line-height: 1.35; }
.budget-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; white-space: normal; }
.budget-actions form { margin: 0; }
.budget-actions .table-action { line-height: 1.25; }

/* Contraste WCAG AA no bot?o desabilitado do simulador */
.proposal-card .button:disabled,
.proposal-card .button-light:disabled {
  opacity: 1;
  border-color: #60656f;
  background: #60656f;
  color: #ffffff;
  box-shadow: none;
  cursor: not-allowed;
}

/* Configura??es: separar validade autom?tica e observa??es livres */
.automatic-terms-preview {
  display: grid;
  gap: 6px;
  padding: 15px 16px;
  border: 1px solid #dfe2e7;
  border-radius: 12px;
  background: #f7f8fa;
}
.automatic-terms-preview > span,
.proposal-terms > div > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.automatic-terms-preview p { margin: 0; color: #3f434b; font-size: 12px; line-height: 1.55; }
.proposal-terms { display: grid; gap: 10px; }
.proposal-terms > div { padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fafafb; }
.proposal-terms > div p { margin: 5px 0 0; }
.proposal-automatic-terms { border-left: 3px solid var(--red) !important; background: #fff8f8 !important; }

/* Seletores de modelos e campos nativos com a mesma tipografia */
.model-selection-field,
.model-selection-field *,
.field,
.field *,
.management-filters,
.management-filters * { font-family: var(--font-sans); }
.model-selection-list label { font-weight: 400; }
.model-selection-list strong { font-size: 12px; font-weight: 600; }
.model-selection-list small { font-size: 10px; font-weight: 400; }
select, select option, select optgroup { font-family: var(--font-sans); font-weight: 400; }
select optgroup { font-weight: 600; }

@media (max-width: 1280px) {
  .budget-table-card { display: none; }
  .budget-mobile-list { display: grid; gap: 12px; }
}
@media (max-width: 760px) {
  .budget-search-box { min-width: 0; width: 100%; max-width: none !important; }
  .column-visibility-toggle { width: 100%; justify-content: flex-start; }
}

/* Distribui??o de colunas por perfil/visibilidade */
.budget-table:not(.has-seller-column) .col-budget-number { width: 9%; }
.budget-table:not(.has-seller-column) .col-budget-client { width: 20%; }
.budget-table:not(.has-seller-column) .col-budget-bike { width: 10%; }
.budget-table:not(.has-seller-column) .col-budget-date { width: 7%; }
.budget-table:not(.has-seller-column) .col-budget-total { width: 10%; }
.budget-table:not(.has-seller-column) .col-budget-approval { width: 12%; }
.budget-table:not(.has-seller-column) .col-budget-status { width: 12%; }
.budget-table:not(.has-seller-column) .col-budget-actions { width: 13%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-number { width: 7.5%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-client { width: 16%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-bike { width: 8%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-seller { width: 9%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-date { width: 6.5%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-total { width: 8%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-approval { width: 10%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-status { width: 10%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-actions { width: 18.5%; }
.budget-table.has-company-column .col-budget-number { width: 7%; }
.budget-table.has-company-column .col-budget-client { width: 14%; }
.budget-table.has-company-column .col-budget-bike { width: 7%; }
.budget-table.has-company-column .col-budget-seller { width: 8%; }
.budget-table.has-company-column .col-budget-company { width: 8%; }
.budget-table.has-company-column .col-budget-date { width: 6%; }
.budget-table.has-company-column .col-budget-total { width: 7.5%; }
.budget-table.has-company-column .col-budget-approval { width: 9%; }
.budget-table.has-company-column .col-budget-status { width: 9.5%; }
.budget-table.has-company-column .col-budget-actions { width: 18%; }

@media (max-width: 760px) {
  .management-filters .column-visibility-toggle { grid-column: 1 / -1; }
}

/* Revis?o final de praticidade: tabelas sem rolagem nos m?dulos operacionais */
.practical-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}
.practical-table {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
}
.practical-table th,
.practical-table td {
  min-width: 0;
  padding: 12px 14px;
  overflow-wrap: anywhere;
  vertical-align: middle;
}
.practical-table td:last-child,
.practical-table th:last-child { text-align: right; }
.desktop-management-table { overflow: visible !important; }
.mobile-management-list { display: none; }
.compact-management-toolbar { align-items: center; }

/* Menu compacto de a??es para evitar colunas largas */
.compact-actions-menu {
  position: relative;
  display: inline-block;
  text-align: left;
}
.compact-actions-menu > summary {
  min-width: 74px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #34373e;
  font-size: 11px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.compact-actions-menu > summary::-webkit-details-marker { display: none; }
.compact-actions-menu > summary::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpolyline points='5 7.5 10 12.5 15 7.5' stroke='%237b8089' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .16s;
}
.budget-action-menu > summary::after { display: none; }
.compact-actions-menu[open]:not(.budget-action-menu) > summary::after { transform: rotate(180deg); }
.compact-actions-menu[open] > summary { border-color: #cfd2d8; background: #f7f8fa; }
.compact-actions-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  right: 0;
  width: 180px;
  padding: 7px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(18,20,25,.16);
}
.compact-actions-popover form { margin: 0; }
.compact-actions-popover .table-action {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #383b43;
  font-size: 11px;
  font-weight: 650;
  text-align: left;
}
.compact-actions-popover .table-action:hover { background: #f3f4f6; }
.compact-actions-popover .table-action.danger { color: var(--danger); }

/* Grades administrativas: informa??es priorit?rias */
.users-table-compact th:nth-child(1) { width: 38%; }
.users-table-compact th:nth-child(2) { width: 20%; }
.users-table-compact th:nth-child(3) { width: 15%; }
.users-table-compact th:nth-child(4) { width: 13%; }
.users-table-compact th:nth-child(5) { width: 14%; }
.companies-table th:nth-child(1) { width: 29%; }
.companies-table th:nth-child(2) { width: 21%; }
.companies-table th:nth-child(3),
.companies-table th:nth-child(4) { width: 11%; }
.companies-table th:nth-child(5) { width: 13%; }
.companies-table th:nth-child(6) { width: 15%; }
.motorcycle-management-table th:nth-child(1) { width: 30%; }
.motorcycle-management-table th:nth-child(2) { width: 13%; }
.motorcycle-management-table th:nth-child(3),
.motorcycle-management-table th:nth-child(4) { width: 14%; }
.motorcycle-management-table th:nth-child(5) { width: 10%; }
.motorcycle-management-table th:nth-child(6) { width: 9%; }
.motorcycle-management-table th:nth-child(7) { width: 10%; }
.move-brasil-table th:nth-child(1) { width: 30%; }
.move-brasil-table th:nth-child(2) { width: 18%; }
.move-brasil-table th:nth-child(3) { width: 24%; }
.move-brasil-table th:nth-child(4) { width: 14%; }
.move-brasil-table th:nth-child(5) { width: 14%; }
.motorcycle-table-card .table-product { min-width: 0; }
.motorcycle-table-card .table-product > div:last-child { min-width: 0; }
.motorcycle-table-card .table-product strong,
.motorcycle-table-card .table-product small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Or?amentos: grade operacional enxuta */
.budget-table .col-budget-number { width: 9%; }
.budget-table .col-budget-client { width: 20%; }
.budget-table .col-budget-bike { width: 10%; }
.budget-table .col-budget-seller { width: 10%; }
.budget-table .col-budget-company { width: 10%; }
.budget-table .col-budget-date { width: 10%; }
.budget-table .col-budget-total { width: 13%; }
.budget-table .col-budget-status { width: 12%; }
.budget-table .col-budget-actions { width: 10%; }
.budget-table:not(.has-seller-column) .col-budget-number { width: 10%; }
.budget-table:not(.has-seller-column) .col-budget-client { width: 25%; }
.budget-table:not(.has-seller-column) .col-budget-bike { width: 13%; }
.budget-table:not(.has-seller-column) .col-budget-date { width: 11%; }
.budget-table:not(.has-seller-column) .col-budget-total { width: 16%; }
.budget-table:not(.has-seller-column) .col-budget-status { width: 14%; }
.budget-table:not(.has-seller-column) .col-budget-actions { width: 11%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-number { width: 9%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-client { width: 21%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-bike { width: 10%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-seller { width: 10%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-date { width: 10%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-total { width: 14%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-status { width: 14%; }
.budget-table.has-seller-column:not(.has-company-column) .col-budget-actions { width: 12%; }
.budget-table.has-company-column .col-budget-number { width: 8%; }
.budget-table.has-company-column .col-budget-client { width: 18%; }
.budget-table.has-company-column .col-budget-bike { width: 9%; }
.budget-table.has-company-column .col-budget-seller { width: 9%; }
.budget-table.has-company-column .col-budget-company { width: 9%; }
.budget-table.has-company-column .col-budget-date { width: 9%; }
.budget-table.has-company-column .col-budget-total { width: 13%; }
.budget-table.has-company-column .col-budget-status { width: 13%; }
.budget-table.has-company-column .col-budget-actions { width: 12%; }
.budget-date-cell { display: grid; gap: 4px; }
.budget-date-cell strong { font-size: 11px; white-space: nowrap; }
.budget-date-cell small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.budget-total-cell .approval-badge { width: fit-content; max-width: 100%; }
.budget-action-menu { text-align: right; }

/* Auditoria continua sendo a ?nica grade com rolagem t?cnica */
.audit-table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.audit-table-scroll table { min-width: 920px; }

/* Cards compactos em tablet e celular */
.mobile-management-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20,22,26,.04);
}
.mobile-management-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.mobile-management-card > header > div { min-width: 0; display: grid; gap: 4px; }
.mobile-management-card > header strong { overflow-wrap: anywhere; font-size: 13px; }
.mobile-management-card > header small { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.mobile-management-meta {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  padding-top: 13px;
}
.mobile-management-meta > div { min-width: 0; display: grid; gap: 4px; }
.mobile-management-meta span { color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mobile-management-meta strong { overflow-wrap: anywhere; font-size: 11px; }
.mobile-management-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  margin-top: 14px;
}
.mobile-management-actions form { display: contents; }
.mobile-management-actions .button { width: 100%; min-width: 0; padding: 0 9px; font-size: 10px; }
.mobile-bike-heading { display: flex !important; align-items: center; gap: 10px; }
.mobile-bike-heading .table-thumb { flex: 0 0 auto; }

@media (max-width: 1100px) {
  .desktop-management-table { display: none !important; }
  .mobile-management-list { display: grid; gap: 12px; }
  .compact-management-toolbar { align-items: stretch; flex-direction: column; }
  .compact-management-toolbar .search-box,
  .compact-management-toolbar .button { width: 100%; max-width: none; }
}
@media (max-width: 620px) {
  .mobile-management-meta { grid-template-columns: 1fr 1fr; }
  .mobile-management-actions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 390px) {
  .mobile-management-meta,
  .mobile-management-actions { grid-template-columns: 1fr; }
}

/* Ajustes finais dos menus de a??o e ponto de quebra */
.budget-table-card { overflow: visible !important; }
@media (max-width: 1180px) {
  .desktop-management-table { display: none !important; }
  .mobile-management-list { display: grid; gap: 12px; }
}

/* PWA, sincroniza??o, favoritos e pend?ncias */
.sync-status-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.sync-status-chip [data-sync-dot] { width: 8px; height: 8px; border-radius: 50%; background: #a5a8af; }
.sync-status-chip [data-sync-dot][data-state="atualizado"] { background: #158052; box-shadow: 0 0 0 4px rgba(21,128,82,.1); }
.sync-status-chip [data-sync-dot][data-state="offline"] { background: #d27c15; box-shadow: 0 0 0 4px rgba(210,124,21,.1); }
.sync-status-chip [data-sync-dot][data-state="erro-ao-sincronizar"] { background: var(--danger); }
.sync-status-chip [data-sync-dot][data-state="sincronizando"] { background: #4677c7; animation: syncPulse 1s infinite alternate; }
@keyframes syncPulse { to { opacity: .35; } }
.admin-sync-chip { margin-left: auto; }
.topbar .admin-sync-chip + .topbar-profile { margin-left: 0; }

.seller-pending-center { margin-bottom: 20px; }
.section-title-row { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:12px; }
.section-title-row h2 { margin:4px 0 0; font-size:18px; letter-spacing:-.025em; }
.pending-center-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.pending-center-card { min-width:0; min-height:118px; padding:16px; display:grid; align-content:center; gap:6px; border:1px solid var(--line); border-radius:15px; background:#fff; box-shadow:0 8px 24px rgba(20,22,26,.04); }
.pending-center-card span { color:var(--muted); font-size:10px; font-weight:750; text-transform:uppercase; letter-spacing:.04em; }
.pending-center-card strong { font-size:24px; line-height:1; letter-spacing:-.04em; }
.pending-center-card small { color:var(--muted); font-size:9px; line-height:1.4; }
.pending-center-card.has-pending { border-color:#efc6c9; background:#fff8f8; }
.pending-center-card.has-pending strong { color:var(--red); }
.sync-card strong { font-size:16px; letter-spacing:-.02em; }

.recent-motorcycles-section { margin-bottom:20px; }
.recent-motorcycles-strip { display:flex; gap:12px; overflow-x:auto; padding:2px 2px 8px; scroll-snap-type:x proximity; }
.recent-motorcycle-card { width:150px; flex:0 0 150px; padding:12px; display:grid; gap:6px; border:1px solid var(--line); border-radius:14px; background:#fff; scroll-snap-align:start; }
.recent-motorcycle-card > div { height:86px; display:grid; place-items:center; overflow:hidden; }
.recent-motorcycle-card img { width:100%; height:100%; object-fit:contain; }
.recent-motorcycle-card strong { overflow:hidden; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
.recent-motorcycle-card span { color:var(--muted); font-size:9px; }
.favorites-filter { min-height:42px; display:inline-flex; align-items:center; gap:8px; padding:0 12px; border:1px solid var(--line); border-radius:11px; background:#fff; color:#444850; font-size:11px; font-weight:700; }
.favorites-filter input { accent-color:var(--red); }
.motorcycle-card { position:relative; }
.favorite-form { position:absolute; z-index:8; top:12px; right:12px; margin:0; }
.favorite-button { width:36px; height:36px; display:grid; place-items:center; border:1px solid rgba(0,0,0,.08); border-radius:50%; background:rgba(255,255,255,.94); color:#a7a9af; font-size:18px; box-shadow:0 7px 20px rgba(20,22,26,.11); }
.favorite-button.is-favorite { color:#d69a00; }

.client-status-message { display:block; margin-top:6px; font-size:9px; line-height:1.4; }
.client-status-message.success { color:#14764a; }
.client-status-message.danger { color:var(--danger); }
.client-status-message.warning { color:#966112; }
.client-status-message.loading { color:#4771ae; }
.offline-draft-success { color:#12663f !important; background:#eaf8f1 !important; border-color:#c8ebd9 !important; }

@media (max-width: 980px) {
  .pending-center-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .seller-topbar .sync-status-chip strong { display:none; }
  .seller-topbar .sync-status-chip { width:34px; padding:0; justify-content:center; }
}
@media (max-width: 620px) {
  .section-title-row { align-items:flex-start; }
  .sync-now-button { min-height:36px; padding:0 11px; font-size:10px; }
  .pending-center-grid { grid-template-columns:1fr 1fr; gap:9px; }
  .pending-center-card { min-height:104px; padding:13px; }
  .pending-center-card strong { font-size:21px; }
  .catalog-filter .favorites-filter { width:100%; }
}
@media (max-width: 390px) {
  .pending-center-grid { grid-template-columns:1fr; }
}

@media print {
  .proposal-document-actions { display:none !important; }
}

/* Agenda comercial e carteira do vendedor */
.seller-quick-nav { min-width: 0; flex: 1 1 auto; justify-content: center; overflow-x: auto; scrollbar-width: none; }
.seller-quick-nav::-webkit-scrollbar { display: none; }
.seller-quick-nav a { flex: 0 0 auto; white-space: nowrap; }
.seller-action-grid,
.contact-stat-grid,
.portfolio-stage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.seller-action-card,
.contact-stat-card,
.portfolio-stage-card { min-width: 0; min-height: 112px; padding: 18px; display: grid; align-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 8px 24px rgba(20,22,26,.035); transition: .18s ease; }
.seller-action-card:hover,
.contact-stat-card:hover,
.portfolio-stage-card:hover { transform: translateY(-2px); border-color: #d7d9de; }
.seller-action-card span,
.contact-stat-card span,
.portfolio-stage-card span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.seller-action-card strong,
.contact-stat-card strong,
.portfolio-stage-card strong { font-size: 30px; line-height: 1; letter-spacing: -.04em; }
.seller-action-card small { color: #92969f; font-size: 10px; }
.seller-action-card.attention strong,
.contact-stat-card.attention strong,
.portfolio-stage-card.attention strong { color: var(--red); }
.contact-stat-card.active,
.portfolio-stage-card.active { border-color: #efc6c9; background: var(--red-soft); }
.contact-toolbar { margin-bottom: 16px; }
.contact-list,
.portfolio-list { display: grid; gap: 12px; }
.contact-card { min-width: 0; display: grid; grid-template-columns: 76px minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.contact-card.overdue { border-left: 4px solid var(--red); }
.contact-card.completed { opacity: .72; }
.contact-date-block { min-height: 66px; display: grid; place-items: center; align-content: center; padding: 8px; border-radius: 12px; background: #f6f7f8; }
.contact-date-block strong { font-size: 24px; line-height: 1; }
.contact-date-block span,
.contact-date-block small { color: var(--muted); font-size: 9px; }
.contact-main { min-width: 0; display: grid; gap: 8px; }
.contact-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.contact-title-row > div { min-width: 0; display: grid; gap: 3px; }
.contact-title-row strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.contact-title-row span { color: var(--muted); font-size: 10px; }
.contact-type-badge { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #f0f1f3; color: #4a4e56 !important; font-size: 9px !important; font-weight: 800; }
.contact-main p { margin: 0; color: #555a63; font-size: 11px; line-height: 1.45; }
.contact-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: #858a94; font-size: 9px; }
.contact-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.contact-actions form { margin: 0; }
.contact-actions .button { min-height: 36px; padding: 0 12px; }
.contact-schedule-fields { margin-top: 2px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fafafb; }
.contact-schedule-fields .proposal-option-head { margin-bottom: 12px; }
.contact-schedule-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.portfolio-card { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 18px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.portfolio-card-main { min-width: 0; display: grid; gap: 7px; }
.portfolio-card-title { min-width: 0; display: grid; gap: 3px; }
.portfolio-card-title strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.portfolio-card-title span { color: var(--muted); font-size: 10px; }
.portfolio-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: #858a94; font-size: 9px; }
.portfolio-next-contact { width: fit-content; display: flex; flex-wrap: wrap; gap: 5px 9px; padding: 7px 9px; border-radius: 9px; background: #f5f6f8; font-size: 9px; }
.portfolio-next-contact span { color: var(--muted); }
.portfolio-card-status { display: grid; justify-items: end; gap: 8px; }
.portfolio-card-status > strong { font-size: 14px; white-space: nowrap; }
.portfolio-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.portfolio-card-actions .button { min-height: 36px; padding: 0 12px; }

@media (max-width: 1050px) {
  .seller-action-grid,
  .contact-stat-grid,
  .portfolio-stage-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .contact-card { grid-template-columns: 68px minmax(0,1fr); }
  .contact-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 8px; border-top: 1px solid var(--line); }
  .portfolio-card { grid-template-columns: minmax(0,1fr) auto; }
  .portfolio-card-actions { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .seller-mode { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .seller-topbar { justify-content: flex-start; }
  .seller-topbar .seller-quick-nav { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; height: calc(62px + env(safe-area-inset-bottom)); margin: 0; padding: 6px 8px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 3px; overflow: visible; border-top: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(14px); }
  .seller-topbar .seller-quick-nav a { min-width: 0; padding: 9px 3px; display: grid; place-items: center; border-radius: 9px; font-size: 9px; text-align: center; white-space: normal; line-height: 1.15; }
  .seller-topbar .sync-status-chip { margin-left: auto; }
  .seller-action-grid,
  .contact-stat-grid,
  .portfolio-stage-grid { gap: 9px; }
  .seller-action-card,
  .contact-stat-card,
  .portfolio-stage-card { min-height: 94px; padding: 14px; border-radius: 13px; }
  .seller-action-card strong,
  .contact-stat-card strong,
  .portfolio-stage-card strong { font-size: 25px; }
  .contact-card { grid-template-columns: 58px minmax(0,1fr); gap: 11px; padding: 12px; }
  .contact-date-block { min-height: 58px; }
  .contact-date-block strong { font-size: 20px; }
  .contact-title-row { display: grid; }
  .contact-type-badge { width: fit-content; }
  .contact-actions { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
  .contact-actions .button,
  .contact-actions form,
  .contact-actions form .button { width: 100%; min-width: 0; white-space: nowrap; }
  .contact-schedule-grid { grid-template-columns: 1fr; }
  .portfolio-card { grid-template-columns: 1fr; gap: 11px; padding: 14px; }
  .portfolio-card-status { justify-items: start; grid-template-columns: auto auto; align-items: center; justify-content: space-between; }
  .portfolio-card-actions { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
  .portfolio-card-actions .button { width: 100%; min-width: 0; white-space: nowrap; }
}

@media (max-width: 420px) {
  .seller-action-grid,
  .contact-stat-grid,
  .portfolio-stage-grid { grid-template-columns: 1fr 1fr; }
  .contact-actions,
  .portfolio-card-actions { grid-template-columns: 1fr; }
}


/* PWA enxuta: sincroniza??o discreta e sem recursos locais de carteira */
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.sync-status-mini { width:28px; height:28px; flex:0 0 auto; display:grid; place-items:center; padding:0; border:0; border-radius:50%; background:transparent; }
.sync-status-mini:hover { background:rgba(0,0,0,.045); }
.sync-status-mini [data-sync-dot], .account-sync-meta [data-sync-dot] { width:7px; height:7px; border-radius:50%; background:#a5a8af; }
.sync-status-mini [data-sync-dot][data-state="atualizado"], .account-sync-meta [data-sync-dot][data-state="atualizado"] { background:#158052; }
.sync-status-mini [data-sync-dot][data-state="offline"], .account-sync-meta [data-sync-dot][data-state="offline"] { background:#d27c15; }
.sync-status-mini [data-sync-dot][data-state="erro"], .account-sync-meta [data-sync-dot][data-state="erro"] { background:var(--danger); }
.sync-status-mini [data-sync-dot][data-state="sincronizando"], .account-sync-meta [data-sync-dot][data-state="sincronizando"] { background:#4677c7; animation:syncPulse 1s infinite alternate; }
.account-sync-meta { padding:10px 12px; display:grid; grid-template-columns:8px 1fr; align-items:center; gap:3px 8px; border-bottom:1px solid var(--line); color:var(--muted); font-size:10px; }
.account-sync-meta small { grid-column:2; color:#92969f; font-size:8px; }
.recent-motorcycles-section, .favorites-filter, .favorite-form, .seller-pending-center { display:none!important; }
.seller-topbar .sync-status-mini { margin-left:auto; }
.admin-sync-chip { margin-left:auto; }
@media(max-width:650px){ .sync-status-mini{width:26px;height:26px}.seller-topbar .sync-status-mini{margin-left:auto} }


/* Ajustes finais: menu lateral do vendedor e di?logos sem estouro */
.seller-mode { padding-bottom: 0 !important; }
.seller-mode .topbar { min-height: 88px; height: auto; }
.seller-mode .content-wrap { padding-top: 24px; }
.management-dialog.price-request-dialog,
.management-dialog.price-approval-dialog,
.management-dialog.budget-result-dialog { width: min(640px, calc(100vw - 32px)); max-width: calc(100vw - 32px); overflow: hidden; }
.management-dialog .dialog-card,
.price-request-dialog .dialog-card,
.price-approval-dialog .dialog-card,
.budget-result-dialog .dialog-card { width: 100% !important; max-width: 100%; max-height: calc(100dvh - 32px); overflow-x: hidden; overflow-y: auto; box-sizing: border-box; }
.dialog-header, .dialog-header > div, .dialog-fields, .dialog-fields .field, .approval-summary, .approval-comparison { min-width: 0; }
.dialog-header h2 { font-size: clamp(20px, 3vw, 28px); line-height: 1.15; overflow-wrap: anywhere; }
.dialog-fields input, .dialog-fields textarea, .dialog-fields select { width: 100%; min-width: 0; }
.approval-comparison { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.approval-comparison small { display:block; margin-top:6px; color:var(--muted); font-size:11px; font-weight:700; }
.result-won-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
@media (max-width: 720px) {
  .seller-mode .topbar { min-height: 76px; }
  .seller-mode .content-wrap { padding-top: 18px; }
  .approval-comparison, .result-won-grid { grid-template-columns: 1fr; }
  .management-dialog.price-request-dialog, .management-dialog.price-approval-dialog, .management-dialog.budget-result-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); }
  .management-dialog .dialog-card { max-height: calc(100dvh - 20px); padding:18px; }
}


/* Fechamento final: navega??o lateral do vendedor, modais e espa?amento */
.seller-mode .content-wrap { padding-top: 30px; }
.seller-mode .budget-stat-grid, .seller-mode .seller-action-grid { margin-top: 0; }
.management-dialog {
  width: min(620px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  max-height: calc(100dvh - 32px);
  margin: auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box;
}
.management-dialog .dialog-card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  max-height: calc(100dvh - 32px);
  margin: 0 !important;
  padding: 24px;
  overflow-x: hidden !important;
  overflow-y: auto;
  box-sizing: border-box;
}
.management-dialog .dialog-header { align-items: flex-start; gap: 18px; }
.management-dialog .dialog-header > div { flex: 1 1 auto; min-width: 0; }
.management-dialog .dialog-header h2 { margin: 7px 0 0; }
.management-dialog .form-grid, .management-dialog .field, .management-dialog input, .management-dialog textarea, .management-dialog select { min-width: 0; max-width: 100%; }
.price-request-dialog, .price-approval-dialog { width: min(580px, calc(100vw - 32px)) !important; }
.approval-value-field { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafafb; }
.approval-margin-preview { margin-top: 7px; color: var(--muted); font-size: 11px; }
.approval-margin-preview strong { color: var(--ink); font-size: 12px; }
.budget-toolbar .management-filters { min-width: 0; }
.budget-toolbar .budget-search-box { flex: 1 1 360px; min-width: 220px; }
.budget-toolbar .management-filters select { min-width: 190px; }
@media (max-width: 720px) {
  .seller-mode .content-wrap { padding-top: 18px; }
  .management-dialog, .price-request-dialog, .price-approval-dialog, .budget-result-dialog { width: calc(100vw - 16px) !important; max-width: calc(100vw - 16px) !important; max-height: calc(100dvh - 16px); }
  .management-dialog .dialog-card { max-height: calc(100dvh - 16px); padding: 18px; }
  .dialog-actions { position: sticky; bottom: -18px; margin: 18px -18px -18px; padding: 14px 18px; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); }
}

/* Revis?o final de usabilidade e consist?ncia visual */
:root {
  --focus: #697586;
  --focus-ring: rgba(105, 117, 134, .18);
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.filter-bar select:focus,
.custom-select-trigger:focus-visible {
  border-color: var(--focus) !important;
  box-shadow: 0 0 0 3px var(--focus-ring) !important;
  outline: none !important;
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field .is-invalid,
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .12) !important;
}

/* Select customizado com suporte a grupos */
.custom-select { position: relative; width: 100%; min-width: 0; }
.native-select-accessible {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  flex: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
}
.custom-select-trigger {
  width: 100%; min-height: 43px; padding: 0 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--muted); text-align: left;
  font: inherit; font-size: 12px; transition: border-color .16s, box-shadow .16s;
  cursor: pointer;
}
.custom-select-value {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-select.has-value .custom-select-trigger { color: var(--ink); }
.custom-select.is-disabled .custom-select-trigger,
.custom-select-trigger:disabled {
  opacity: .55; cursor: not-allowed; background: #f1f2f4;
}
.custom-select-trigger.is-invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .12) !important;
}
.custom-select-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7b8089;
  flex: 0 0 auto;
  line-height: 0;
  transition: transform .16s;
}
.custom-select-chevron svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.7;
}
.custom-select.is-open .custom-select-chevron { transform: rotate(180deg); }
.custom-select-menu {
  position: absolute; z-index: 120; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 280px; padding: 7px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  box-shadow: 0 16px 38px rgba(24,26,31,.16);
}
.custom-select:not(.is-open) .custom-select-menu { display: none; }
.custom-select-group {
  padding: 10px 10px 6px; color: #8a8e97;
  font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.custom-select-option {
  width: 100%; min-height: 38px; padding: 8px 10px;
  display: block; border: 0; border-radius: 8px; background: transparent;
  color: #33363d; text-align: left; font: inherit; font-size: 12px;
  font-weight: 400; cursor: pointer;
}
.custom-select-option:hover:not(:disabled),
.custom-select-option:focus-visible:not(:disabled) { background: #f3f4f6; outline: none; }
.custom-select-option.is-selected {
  background: var(--red-soft);
  color: var(--ink);
  font-weight: 500;
}
.custom-select-option:disabled,
.custom-select-option.is-disabled {
  opacity: .45; cursor: not-allowed; color: #8a8e97;
}
.custom-select-option-multi {
  display: flex; align-items: center; gap: 10px;
}
.custom-select-check {
  width: 18px; height: 18px; flex: 0 0 auto;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 5px;
  background: #fff; color: transparent; font-size: 11px; font-weight: 800; line-height: 1;
}
.custom-select-option-multi.is-selected .custom-select-check {
  border-color: var(--red); background: var(--red); color: #fff;
}
.custom-select-option-label {
  min-width: 0; flex: 1 1 auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Filtros e toolbars usam o mesmo trigger arredondado */
.filter-bar .custom-select,
.management-filters .custom-select,
.catalog-filter .custom-select,
.budget-main-filters .custom-select {
  width: auto; min-width: 150px; flex: 0 1 auto;
}
.filter-bar .custom-select-trigger,
.management-filters .custom-select-trigger,
.catalog-filter .custom-select-trigger,
.budget-main-filters .custom-select-trigger {
  min-width: 150px; height: 44px; min-height: 44px;
  border-radius: 11px; padding: 0 14px;
}
.budget-toolbar .management-filters .custom-select,
.budget-toolbar .management-filters .custom-select-trigger { min-width: 190px; }
.field .custom-select { width: 100%; }

/* Evita que overflow de cards/pain?is corte a lista aberta */
.card:has(.custom-select.is-open),
.toolbar:has(.custom-select.is-open),
.management-toolbar:has(.custom-select.is-open),
.management-filters:has(.custom-select.is-open),
.filter-bar:has(.custom-select.is-open),
.budget-query-panel:has(.custom-select.is-open),
.form-grid:has(.custom-select.is-open),
.field:has(.custom-select.is-open),
.dialog-card:has(.custom-select.is-open),
.management-dialog:has(.custom-select.is-open) {
  overflow: visible;
}

/* Hierarquia das informa??es nos or?amentos */
.budget-number-cell,
.budget-client,
.budget-total-cell { display: grid; align-content: center; gap: 4px; }
.budget-number-cell strong,
.budget-client strong,
.budget-total-cell > strong { color: var(--ink); font-size: 11px; font-weight: 800; line-height: 1.3; }
.budget-secondary { color: #727780; font-size: 8.5px; line-height: 1.35; }
.budget-tertiary { color: #969aa2; font-size: 8px; line-height: 1.3; }
.budget-adjustment { color: #8c5c14; font-size: 8.5px; font-weight: 700; }
.budget-total-cell .approval-badge { margin-top: 2px; font-size: 7px; }
.budget-row td { vertical-align: middle; }

/* Login em card ?nico, consistente em qualquer largura */
.auth-page { min-height: 100vh; background: linear-gradient(180deg, #f7f7f8 0%, #eef0f3 100%); }
.login-shell-centered {
  min-height: 100vh; padding: 28px 18px;
  display: grid; place-items: center;
  grid-template-columns: 1fr;
}
.login-card-centered {
  width: min(410px, 100%); padding: 34px;
  border: 1px solid var(--line); border-radius: 18px; background: #fff;
  box-shadow: 0 20px 55px rgba(24,26,31,.10);
}
.login-brand-centered { justify-content: center; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.login-brand-centered img { width: 112px; height: 84px; object-fit: contain; }
.login-card-centered .login-heading { margin: 25px 0 22px; text-align: center; }
.login-card-centered .login-heading h1 { margin: 8px 0 7px; font-size: 26px; letter-spacing: -.035em; }
.login-card-centered .login-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.login-card-centered .field { margin-bottom: 14px; }
.login-card-centered .button { margin-top: 4px; }

/* Di?logos: conte?do integral, sem apar?ncia de valores j? preenchidos */
.budget-result-dialog input::placeholder,
.management-dialog input::placeholder,
.management-dialog textarea::placeholder { color: #9a9ea6; opacity: 1; font-weight: 400; }
.management-dialog .custom-select-menu { position: static; margin-top: 6px; max-height: 230px; }
.management-dialog .custom-select.is-open .custom-select-menu { display: block; }

@media (max-width: 700px) {
  .login-card-centered { padding: 26px 22px; border-radius: 15px; }
  .login-brand-centered img { width: 100px; height: 72px; }
  .budget-secondary { font-size: 9px; }
  .budget-tertiary { font-size: 8.5px; }
}


/* Revis?o integral de tipografia e formul?rios ? fonte ?nica e escala consistente */
:root {
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --text-xs: 11px;
  --text-sm: 13px;
  --text-md: 15px;
  --text-lg: 17px;
  --control-height: 44px;
}
html, body, button, input, select, textarea, option, label, table, dialog {
  font-family: var(--font-ui) !important;
}
body { font-size: var(--text-sm); line-height: 1.45; }
input, select, textarea, button { letter-spacing: 0; }
.field { gap: 7px; }
.field > span,
.field > label,
fieldset > legend,
.audit-filters .field > span,
.model-selection-field > legend,
.company-checkbox-field legend {
  color: #3e424a;
  font-size: var(--text-sm) !important;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.field input,
.field select,
.field textarea,
.search-box input,
.filter-bar select,
.management-filters select,
.audit-filters input,
.audit-filters select,
.custom-select-trigger {
  font-family: var(--font-ui) !important;
  font-size: var(--text-md) !important;
  line-height: 1.35;
  font-weight: 400;
}
.field input,
.field select,
.search-box,
.filter-bar select,
.management-filters select,
.audit-filters input,
.audit-filters select,
.custom-select-trigger { min-height: var(--control-height); }
.field input,
.field select { height: var(--control-height); padding: 0 14px; }
.field textarea { min-height: 112px; padding: 13px 14px; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder,
.search-box input::placeholder,
.management-dialog input::placeholder,
.management-dialog textarea::placeholder {
  color: #8a9099 !important;
  font-family: var(--font-ui) !important;
  font-size: var(--text-md) !important;
  line-height: 1.35;
  font-weight: 400 !important;
  opacity: 1;
}
.field input[readonly] {
  font-size: var(--text-md) !important;
  font-weight: 600;
  color: #565c66;
}
.field small,
.client-status-message,
.cep-lookup-status,
.proposal-form-error,
.approval-margin-preview,
.dialog-copy,
.aggregate-confirmation-copy p {
  font-family: var(--font-ui) !important;
  font-size: var(--text-xs) !important;
  line-height: 1.45;
}
.client-status-message { margin-top: 1px; }
.button,
.table-action,
.compact-actions-menu summary {
  font-family: var(--font-ui) !important;
  font-size: var(--text-sm) !important;
  font-weight: 700;
  line-height: 1.2;
}
.custom-select-option {
  font-family: var(--font-ui) !important;
  font-size: var(--text-sm) !important;
  font-weight: 400 !important;
  line-height: 1.2;
}
.custom-select-option.is-selected {
  font-weight: 500 !important;
}
.search-box { height: var(--control-height); min-height: var(--control-height); }
.search-box input { height: auto; font-size: var(--text-md) !important; }
/* Filtros: busca, selects e bot?es na mesma escala tipogr?fica */
.management-filters .search-box input,
.management-filters select,
.management-filters select option,
.management-filters .button,
.management-filters .custom-select-trigger,
.management-filters .custom-select-option,
.filter-bar .search-box input,
.filter-bar .custom-select-trigger,
.filter-bar .custom-select-option,
.catalog-filter .search-box input,
.catalog-filter .custom-select-trigger,
.catalog-filter .custom-select-option,
.budget-main-filters .search-box input,
.budget-main-filters .custom-select-trigger,
.budget-main-filters .custom-select-option {
  font-size: var(--text-sm) !important;
  font-weight: 400 !important;
  line-height: 1.35;
}
.management-filters .button,
.filter-bar .button,
.catalog-filter .button,
.budget-main-filters .button {
  font-weight: 600 !important;
}
.management-filters .search-box input::placeholder,
.filter-bar .search-box input::placeholder,
.catalog-filter .search-box input::placeholder,
.budget-main-filters .search-box input::placeholder {
  font-size: var(--text-sm) !important;
  font-weight: 400 !important;
}
.custom-select-group { font-size: var(--text-xs); }
.custom-select-option { min-height: 42px; }
.model-selection-list strong,
.company-checkbox-list strong { font-size: var(--text-sm) !important; }
.model-selection-list small,
.company-checkbox-list small { font-size: var(--text-xs) !important; }
.check-row { font-size: var(--text-sm); line-height: 1.4; }
.dialog-header h2 { font-size: clamp(22px, 2.4vw, 28px); }
.dialog-header .eyebrow { font-size: 10px; }
.management-dialog .dialog-card { padding: 26px; }
.proposal-client-dialog .dialog-card { width: min(700px, calc(100vw - 32px)); }
.proposal-client-form .dialog-fields { gap: 17px; }
.proposal-client-form .cep-field-grid { align-items: end; }
.proposal-client-form .cep-field-grid .field { align-self: stretch; }
.proposal-client-form .cep-field-grid input { height: var(--control-height); }
.proposal-dialog-summary span { font-size: var(--text-xs); }
.proposal-dialog-summary strong { font-size: var(--text-sm); }
.login-card-centered { padding: 30px 34px 34px; }
.login-brand-centered { padding-bottom: 24px; margin-bottom: 24px; }
.login-card-centered .field > span { font-size: var(--text-sm) !important; }
.login-card-centered .field input { font-size: var(--text-md) !important; }
.login-card-centered .button { min-height: 46px; font-size: var(--text-sm) !important; }
/* N?o deixar campos auxiliares parecerem maiores que os dados digit?veis */
#clientPhone,
#clientCityDisplay,
#clientCep,
#clientCpf,
#clientName,
#clientEmail,
#clientNotes { font-size: var(--text-md) !important; }
/* Cabe?alhos e textos de tabelas seguem uma escala ?nica */
th { font-family: var(--font-ui) !important; font-size: 10px !important; }
td { font-family: var(--font-ui) !important; font-size: 12px !important; }
.budget-number-cell strong,
.budget-client strong,
.budget-total-cell > strong { font-size: 12px !important; }
.budget-secondary { font-size: 10px !important; }
.budget-tertiary, .budget-adjustment { font-size: 9px !important; }
@media (max-width: 720px) {
  :root { --text-md: 16px; }
  .management-dialog .dialog-card { padding: 20px; }
  .proposal-client-dialog { width: calc(100vw - 12px) !important; max-width: calc(100vw - 12px) !important; }
  .proposal-client-dialog .dialog-card { width: 100%; max-height: calc(100dvh - 12px); }
  /* 16px no valor digitado evita zoom autom?tico do iOS ao focar */
  .field input,
  .field select,
  .search-box input,
  .filter-bar select,
  .management-filters select,
  .custom-select-trigger,
  .management-filters .search-box input,
  .management-filters .custom-select-trigger,
  .filter-bar .search-box input,
  .filter-bar .custom-select-trigger,
  .catalog-filter .search-box input,
  .catalog-filter .custom-select-trigger,
  .budget-main-filters .search-box input,
  .budget-main-filters .custom-select-trigger {
    font-size: 16px !important;
    font-weight: 500;
  }
  /* Placeholder e bot?es de filtro ficam menores ? sem risco de zoom */
  .management-filters .search-box input::placeholder,
  .filter-bar .search-box input::placeholder,
  .catalog-filter .search-box input::placeholder,
  .budget-main-filters .search-box input::placeholder {
    font-size: 13px !important;
    font-weight: 500;
  }
  .management-filters .button,
  .management-filters .button-secondary,
  .filter-bar .button,
  .catalog-filter .button {
    font-size: 12px !important;
    font-weight: 700;
  }
}

/* ========================================================================== 
   RESPONSIVIDADE GLOBAL DE SUBTELAS E MODAIS
   Mant?m todos os di?logos dentro da viewport em desktop, notebook e mobile.
   ========================================================================== */
:root {
  --dialog-edge: 20px;
  --dialog-padding: 24px;
}

/* O pr?prio dialog controla a largura. O card interno nunca pode ser maior. */
dialog.eligibility-dialog,
dialog.proposal-client-dialog,
dialog.management-dialog {
  width: min(680px, calc(100vw - (var(--dialog-edge) * 2))) !important;
  max-width: calc(100vw - (var(--dialog-edge) * 2)) !important;
  max-height: calc(100vh - (var(--dialog-edge) * 2)) !important;
  max-height: calc(100dvh - (var(--dialog-edge) * 2)) !important;
  margin: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  background: transparent !important;
  box-sizing: border-box !important;
}

dialog.proposal-client-dialog {
  width: min(720px, calc(100vw - (var(--dialog-edge) * 2))) !important;
}

dialog.aggregate-confirmation-dialog {
  width: min(480px, calc(100vw - (var(--dialog-edge) * 2))) !important;
}

/* Padroniza??o do conte?do interno de todas as subtelas. */
dialog > .dialog-card,
dialog > form.dialog-card,
dialog .dialog-card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  max-height: calc(100vh - (var(--dialog-edge) * 2)) !important;
  max-height: calc(100dvh - (var(--dialog-edge) * 2)) !important;
  margin: 0 !important;
  padding: var(--dialog-padding) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border-radius: 18px !important;
  box-sizing: border-box !important;
}

/* Impede qualquer descendente de criar largura m?nima al?m do modal. */
dialog *,
dialog *::before,
dialog *::after {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

dialog .dialog-header {
  position: sticky;
  top: calc(-1 * var(--dialog-padding));
  z-index: 5;
  margin: calc(-1 * var(--dialog-padding)) calc(-1 * var(--dialog-padding)) 20px;
  padding: var(--dialog-padding);
  align-items: flex-start;
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

dialog .dialog-header > div { flex: 1 1 auto; }
dialog .dialog-header h2 {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

dialog .dialog-close {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

dialog .dialog-fields,
dialog .form-grid,
dialog .cep-field-grid,
dialog .approval-comparison,
dialog .result-won-grid,
dialog .proposal-dialog-summary,
dialog .commercial-admin-grid,
dialog .calculated-margins {
  width: 100%;
  max-width: 100%;
}

dialog .field,
dialog label,
dialog fieldset,
dialog input,
dialog select,
dialog textarea,
dialog .custom-select,
dialog .custom-select-trigger {
  width: 100%;
  min-width: 0 !important;
  max-width: 100% !important;
}

dialog input,
dialog select,
dialog textarea {
  display: block;
}

dialog textarea {
  resize: vertical;
}

dialog .dialog-actions {
  position: sticky;
  bottom: calc(-1 * var(--dialog-padding));
  z-index: 6;
  width: auto;
  margin: 20px calc(-1 * var(--dialog-padding)) calc(-1 * var(--dialog-padding));
  padding: 16px var(--dialog-padding);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(255,255,255,.98);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

dialog .dialog-actions .button {
  min-width: 0;
  max-width: 100%;
}

/* Campos lado a lado apenas quando houver espa?o real. */
dialog .cep-field-grid,
dialog .approval-comparison,
dialog .result-won-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Evita que menus customizados criem scroll horizontal dentro de modais. */
dialog .custom-select-menu {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

dialog .custom-select-option,
dialog .custom-select-group {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Quando um modal estiver aberto, a p?gina de fundo n?o deve rolar. */
body:has(dialog[open]) {
  overflow: hidden;
}

@media (max-width: 760px) {
  :root {
    --dialog-edge: 8px;
    --dialog-padding: 18px;
  }

  dialog.eligibility-dialog,
  dialog.proposal-client-dialog,
  dialog.management-dialog,
  dialog.aggregate-confirmation-dialog {
    width: calc(100vw - (var(--dialog-edge) * 2)) !important;
    max-width: calc(100vw - (var(--dialog-edge) * 2)) !important;
    max-height: calc(100dvh - (var(--dialog-edge) * 2)) !important;
    border-radius: 15px !important;
  }

  dialog > .dialog-card,
  dialog > form.dialog-card,
  dialog .dialog-card {
    max-height: calc(100dvh - (var(--dialog-edge) * 2)) !important;
    border-radius: 15px !important;
  }

  dialog .cep-field-grid,
  dialog .approval-comparison,
  dialog .result-won-grid,
  dialog .proposal-dialog-summary {
    grid-template-columns: 1fr !important;
  }

  dialog .dialog-header {
    gap: 12px;
  }

  dialog .dialog-header h2 {
    font-size: 22px;
  }

  dialog .dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  dialog .dialog-actions .button {
    width: 100%;
    padding-inline: 12px;
  }
}

@media (max-width: 430px) {
  dialog .dialog-actions {
    grid-template-columns: 1fr;
  }

  dialog .dialog-actions .button-primary {
    order: -1;
  }

  dialog .dialog-close {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }
}

/* Viewports baixas de notebooks: reduz espa?os sem esconder campos ou bot?es. */
@media (max-height: 720px) and (min-width: 761px) {
  :root {
    --dialog-edge: 12px;
    --dialog-padding: 18px;
  }

  dialog .dialog-header {
    margin-bottom: 14px;
    padding-block: 16px;
  }

  dialog .dialog-fields,
  dialog .form-grid {
    gap: 12px;
  }

  dialog .field textarea {
    min-height: 88px;
  }
}

/* =========================================================
   Revis?o final: login, or?amentos e cat?logo mobile
   Mant?m o design system existente e reduz densidade visual.
   ========================================================= */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Login */
.password-input-wrap { position: relative; min-width: 0; display: block; }
.password-input-wrap input { padding-right: 46px; }
.password-visibility-button {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #777b84;
}
.password-visibility-button:hover,
.password-visibility-button:focus-visible { background: #f1f2f4; color: var(--ink); outline: none; }
.password-visibility-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.password-visibility-button.is-visible svg circle { fill: currentColor; }
.remember-login { display: inline-flex; align-items: center; gap: 9px; margin: 1px 0 17px; color: #4f535b; font-size: 12px; font-weight: 650; cursor: pointer; }
.remember-login input { width: 17px; height: 17px; accent-color: var(--red); }

/* Or?amentos: cards objetivos */
.budget-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 12px;
  margin-bottom: 16px;
}
.budget-focus-grid.has-approval { grid-template-columns: repeat(3, minmax(0, 220px)); }
.budget-focus-card {
  min-width: 0;
  min-height: 92px;
  padding: 16px 17px;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(20,22,26,.035);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.budget-focus-card:hover { transform: translateY(-1px); border-color: #cfd2d8; box-shadow: 0 10px 26px rgba(20,22,26,.055); }
.budget-focus-card span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .035em; }
.budget-focus-card strong { font-size: 28px; line-height: 1; letter-spacing: -.04em; }
.budget-focus-card.attention.has-pending { border-color: #efc6c9; background: #fff8f8; }
.budget-focus-card.attention.has-pending strong { color: var(--red); }
.budget-focus-card.approval { border-color: #dfd7bd; background: #fffdf6; }

.budget-query-panel { margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.budget-period-row { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.budget-period-row > span { margin-right: 3px; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.period-chip {
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #555961;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.period-chip:hover { border-color: #c8cbd1; background: #f8f8f9; }
.period-chip.active { border-color: #efc3c5; background: var(--red-soft); color: var(--red); }
.custom-period-control { position: relative; }
.custom-period-control > summary { list-style: none; }
.custom-period-control > summary::-webkit-details-marker { display: none; }
.custom-period-popover {
  position: absolute;
  z-index: 25;
  top: calc(100% + 8px);
  right: 0;
  width: min(420px, calc(100vw - 44px));
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow);
}
.custom-period-popover .button { grid-column: 1 / -1; min-height: var(--control-height, 44px); }
.budget-toolbar { margin: 0; align-items: flex-end; }
/* Vis?o geral: toolbar solta (fora do painel) precisa de respiro antes da lista */
.content-wrap > .budget-toolbar { margin-bottom: 16px; }
.budget-main-filters { min-width: 0; flex: 1 1 760px; display: grid; grid-template-columns: minmax(230px, 1.4fr) repeat(3, minmax(155px, .75fr)) auto auto; gap: 9px; align-items: center; }
.budget-main-filters .budget-search-box { width: 100%; }
.budget-main-filters select,
.budget-main-filters .custom-select { width: 100%; min-width: 0; }
.budget-result-summary { margin-top: 12px; color: var(--muted); font-size: 10px; }
.budget-result-summary strong { color: var(--ink); }
.budget-result-summary span { margin-left: 8px; }

/* Grid enxuta, sem rolagem horizontal */
.budget-table-clean { overflow: visible !important; }
.budget-table-clean .practical-table-wrap { overflow: visible !important; }
.clean-budget-table { width: 100%; min-width: 0 !important; table-layout: fixed; }
.clean-budget-table th,
.clean-budget-table td { padding: 13px 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.clean-budget-table .col-budget-number { width: 12%; }
.clean-budget-table .col-budget-client { width: 25%; }
.clean-budget-table .col-budget-bike { width: 17%; }
.clean-budget-table .col-budget-issued { width: 10%; }
.clean-budget-table .col-budget-validity { width: 10%; }
.clean-budget-table .col-budget-status { width: 17%; }
.clean-budget-table .col-budget-actions { width: 6%; }
.clean-budget-table.has-seller-column .col-budget-number { width: 10%; }
.clean-budget-table.has-seller-column .col-budget-client { width: 20%; }
.clean-budget-table.has-seller-column .col-budget-bike { width: 14%; }
.clean-budget-table.has-seller-column .col-budget-seller { width: 13%; }
.clean-budget-table.has-seller-column .col-budget-issued,
.clean-budget-table.has-seller-column .col-budget-validity { width: 9%; }
.clean-budget-table.has-seller-column .col-budget-status { width: 16%; }
.clean-budget-table.has-seller-column .col-budget-actions { width: 6%; }
.budget-primary-text,
.budget-bike-name,
.budget-seller-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.budget-primary-text { color: var(--ink); font-weight: 750; }
.budget-client-name { text-transform: uppercase; }
.clickable-budget-row { cursor: pointer; }
.clickable-budget-row:hover td { background: #fafafb; }
.clickable-budget-row:focus-visible { outline: 2px solid #b8bbc2; outline-offset: -2px; }
.budget-actions-cell { overflow: visible !important; text-align: right; }
.budget-actions-cell .compact-actions-menu { display: inline-block; }
.budget-actions-cell .compact-actions-menu > summary {
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #555961;
  font-size: 20px;
  line-height: 1;
}
.budget-actions-cell .compact-actions-menu > summary:hover { background: #f0f1f3; }
.clean-budget-mobile-list { display: none; }

.pagination { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 12px; }
.pagination-link { min-height: 36px; padding: 0 13px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #41454d; font-size: 10px; font-weight: 750; }
.pagination-link:hover { background: #f5f6f8; }
.pagination-status { color: var(--muted); font-size: 10px; }

/* Cat?logo: filtros ?ntegros e card mais compacto no celular */
.catalog-filter:empty { display: none !important; }

@media (max-width: 1180px) and (min-width: 821px) {
  .budget-main-filters { grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(145px, .7fr)) auto auto; }
  .budget-main-filters > .custom-select:nth-of-type(2) { display: none; }
  .budget-table-card { display: block !important; }
  .budget-mobile-list { display: none !important; }
}

@media (max-width: 820px) {
  .budget-focus-grid,
  .budget-focus-grid.has-approval { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .budget-focus-card.approval { grid-column: 1 / -1; }
  .budget-query-panel { padding: 12px; }
  .budget-period-row { margin-bottom: 12px; gap: 8px; }
  .budget-period-row > span { width: 100%; margin: 0 0 2px; }
  .period-chip { min-height: 34px; padding: 0 12px; font-size: 11px; }
  .custom-period-control { position: static; width: 100%; flex: 1 1 100%; }
  .custom-period-popover {
    position: static;
    inset: auto;
    z-index: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    max-width: none;
    margin-top: 8px;
    padding: 14px;
    grid-template-columns: 1fr;
    box-shadow: none;
    background: #fafafb;
  }
  .custom-period-popover .button { width: 100%; }
  .budget-toolbar { align-items: stretch; flex-direction: column; }
  .budget-main-filters { width: 100%; flex-basis: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .budget-main-filters .budget-search-box { grid-column: 1 / -1; }
  .budget-main-filters .button { width: 100%; }
  .budget-toolbar > .button-primary { width: 100%; }
  .budget-table-card { display: none !important; }
  .clean-budget-mobile-list { display: grid !important; gap: 10px; }
  .compact-budget-card { min-width: 0; padding: 14px; display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 7px 22px rgba(20,22,26,.035); }
  .compact-budget-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .compact-budget-card > header > strong { font-size: 12px; }
  .compact-budget-main { min-width: 0; display: grid; gap: 4px; }
  .compact-budget-main > strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; }
  .compact-budget-main > span { color: #4f535b; font-size: 11px; }
  .compact-budget-main > small { color: var(--muted); font-size: 9px; }
  .compact-budget-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .compact-budget-dates > div { padding: 9px 10px; display: grid; gap: 3px; border-radius: 10px; background: #f7f7f8; }
  .compact-budget-dates span { color: var(--muted); font-size: 8px; font-weight: 750; text-transform: uppercase; }
  .compact-budget-dates strong { font-size: 10px; }
  .mobile-card-actions { justify-self: end; position: relative; }
  .mobile-card-actions > summary { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; font-weight: 750; }
}

@media (max-width: 650px) {
  .budget-focus-card { min-height: 82px; padding: 14px; }
  .budget-focus-card strong { font-size: 24px; }
  .budget-period-row > span { width: 100%; }
  .period-chip { min-height: 34px; padding: 0 11px; font-size: 11px; }
  .budget-main-filters { grid-template-columns: 1fr; }
  .budget-main-filters .budget-search-box { grid-column: auto; }
  .budget-result-summary span { display: block; margin: 4px 0 0; }

  .catalog-filter {
    width: 100%;
    padding: 11px;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
  }
  .catalog-filter .search-box { grid-column: 1 / -1; width: 100%; }
  .catalog-filter select,
  .catalog-filter .custom-select { width: 100%; min-width: 0; }
  .catalog-filter .button { width: auto !important; min-width: 88px; }
  .catalog-filter .text-link { align-self: center; justify-self: end; }
  .result-line { margin: 11px 2px 12px; }
  .catalog-grid {
    width: 100%;
    gap: 12px;
    grid-template-columns: 1fr !important;
  }
  .motorcycle-card {
    max-width: none !important;
    width: 100%;
    border-radius: 14px;
  }
  .motorcycle-image {
    height: 176px !important;
    min-height: 176px !important;
    aspect-ratio: auto !important;
    padding: 10px 12px !important;
  }
  .motorcycle-image-stage { height: 152px !important; min-height: 0 !important; }
  .motorcycle-image-stage img { width: 100% !important; height: 100% !important; max-width: 300px !important; max-height: 152px !important; object-fit: contain !important; }
  .motorcycle-card-body { padding: 14px; }
  .motorcycle-card-body h2 { font-size: 15px; }

  /* Pre?os em lista (label | valor) ? usa a largura toda no celular */
  .catalog-price-grid {
    margin: 12px 0 0 !important;
    gap: 0 !important;
    grid-template-columns: 1fr !important;
    border: 1px solid #e3e5e8;
    border-radius: 12px 12px 0 0;
    background: #fafafb;
    overflow: hidden;
  }
  .catalog-price-grid .refined-price-box {
    min-height: 0 !important;
    padding: 12px 14px !important;
    border: 0 !important;
    border-bottom: 1px solid #e8eaee !important;
    border-radius: 0 !important;
    background: transparent !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "heading value"
      "original value"
      "note value";
    align-items: center;
    column-gap: 12px;
    row-gap: 2px;
  }
  .catalog-price-grid .refined-price-box:last-child { border-bottom: 0 !important; }
  .catalog-price-grid .price-box-heading {
    grid-area: heading;
    justify-content: flex-start;
    gap: 8px;
  }
  .catalog-price-grid .price-box-heading span {
    font-size: 10px !important;
    letter-spacing: .03em;
  }
  .catalog-price-grid .price-original { grid-area: original; }
  .catalog-price-grid .refined-price-box > strong {
    grid-area: value;
    justify-self: end;
    text-align: right;
    font-size: 16px !important;
    white-space: nowrap;
  }
  .catalog-price-grid .refined-price-box > em {
    grid-area: note;
    font-size: 9px !important;
  }
  .catalog-freight-row {
    margin: 0 0 12px !important;
    padding: 12px 14px !important;
    border: 1px solid #e3e5e8 !important;
    border-top: 0 !important;
    border-radius: 0 0 12px 12px;
    background: #fafafb;
    font-size: 11px !important;
  }
  .catalog-freight-row strong {
    font-size: 14px;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .budget-focus-grid,
  .budget-focus-grid.has-approval { grid-template-columns: 1fr 1fr; gap: 9px; }
  .budget-focus-card { min-height: 78px; padding: 12px; }
  .budget-focus-card span { font-size: 8px; }
  .budget-focus-card strong { font-size: 22px; }
  .catalog-filter { grid-template-columns: 1fr; }
  .catalog-filter .search-box { grid-column: auto; }
  .catalog-filter .button { width: 100% !important; }
  .catalog-filter .text-link { justify-self: start; }
}

/* ========================================================================== 
   REVIS?O DE ESCALA E ZOOM ? v23
   O layout responde ? largura ?til do conte?do, n?o a um percentual espec?fico
   de zoom do navegador. Textos e controles podem crescer sem serem comprimidos.
   ========================================================================== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* A largura ?til muda quando o menu abre, o navegador recebe zoom ou a janela
   ? redimensionada. O conte?do passa a ser o referencial das quebras. */
.main-content,
.content-wrap {
  min-width: 0;
}
.content-wrap {
  container-name: page-content;
  container-type: inline-size;
  padding-inline: clamp(16px, 2.6vw, 36px);
}

/* Cabe?alhos e barras n?o dependem de altura fixa. */
.topbar {
  height: auto;
  min-height: 86px;
  padding-block: 13px;
  flex-wrap: wrap;
}
.topbar > div {
  min-width: 0;
  flex: 1 1 240px;
}
.topbar h1,
.toolbar-title,
.card-header h2,
.dashboard-panel-header h2 {
  overflow-wrap: anywhere;
  line-height: 1.15;
}
.toolbar,
.management-toolbar,
.card-header,
.dashboard-panel-header,
.history-header-row {
  flex-wrap: wrap;
}

/* Bot?es preservam a altura m?nima, mas crescem quando o texto precisa quebrar. */
.button {
  height: auto !important;
  min-height: 41px;
  padding-block: 9px;
  line-height: 1.25 !important;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.nav-item,
.nav-group-toggle,
.nav-subitem,
.link-button {
  height: auto;
  padding-block: 9px;
  line-height: 1.3;
}

/* Filtros flu?dos: mant?m todos os campos dispon?veis e quebram linha antes
   de espremer r?tulos, seletores ou bot?es. */
.budget-main-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  flex: 1 1 760px;
  gap: 9px;
}
.budget-main-filters .budget-search-box {
  flex: 2 1 270px;
  width: auto;
  min-width: min(100%, 250px);
  max-width: none !important;
}
.budget-main-filters .custom-select {
  display: block !important;
  flex: 1 1 175px;
  width: auto;
  min-width: min(100%, 165px);
}
.budget-main-filters .button {
  flex: 0 1 auto;
  min-width: 88px;
}
.budget-toolbar {
  flex-wrap: wrap;
}
.budget-toolbar > .button-primary {
  flex: 0 1 auto;
}

.catalog-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}
.catalog-filter .search-box {
  flex: 2 1 280px;
  min-width: min(100%, 240px);
}
.catalog-filter select,
.catalog-filter .custom-select {
  flex: 1 1 190px;
  width: auto;
  min-width: min(100%, 170px);
}
.catalog-filter .button,
.catalog-filter .text-link {
  flex: 0 1 auto;
}

/* Cards e indicadores dimensionam-se pelo espa?o dispon?vel. */
.budget-focus-grid,
.budget-focus-grid.has-approval {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 220px));
}
.budget-focus-card {
  height: auto;
}
.budget-focus-card span {
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.dashboard-stat-grid,
.management-stats,
.budget-stat-grid,
.user-management-stats {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
.dashboard-stat-card,
.management-stats article,
.budget-stat-grid article {
  height: auto;
}

/* Cat?logo: a grade e os pre?os quebram apenas quando realmente necess?rio. */
.catalog-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 380px));
}
.motorcycle-card {
  container-name: motorcycle-card;
  container-type: inline-size;
}
.price-box-heading {
  min-width: 0;
  flex-wrap: wrap;
}
.price-box-heading span,
.refined-price-box > strong,
.catalog-freight-row span,
.catalog-freight-row strong {
  overflow-wrap: anywhere;
}
.refined-price-box > strong {
  line-height: 1.15;
}

/* A tabela s? permanece vis?vel quando existe largura ?til suficiente. A troca
   por cards usa a ?rea real ap?s descontar o menu lateral e o zoom. */
@container page-content (max-width: 1080px) {
  .budget-table-card {
    display: none !important;
  }
  .clean-budget-mobile-list {
    display: grid !important;
    gap: 10px;
  }
  .budget-main-filters .button {
    flex: 1 1 120px;
  }
  .budget-toolbar > .button-primary {
    flex: 1 1 170px;
  }
}

@container page-content (max-width: 760px) {
  .budget-focus-grid,
  .budget-focus-grid.has-approval {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .budget-focus-card.approval {
    grid-column: 1 / -1;
  }
  .budget-main-filters .budget-search-box,
  .budget-main-filters .custom-select {
    flex-basis: calc(50% - 5px);
  }
  .form-grid.two-columns,
  .form-grid.three-columns,
  .technical-form-grid,
  .calculated-margins,
  .seller-commercial-data {
    grid-template-columns: 1fr;
  }
}

@container page-content (max-width: 560px) {
  .budget-main-filters > *,
  .budget-main-filters .budget-search-box,
  .budget-main-filters .custom-select,
  .budget-main-filters .button,
  .budget-toolbar > .button-primary {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }
  .catalog-filter > *,
  .catalog-filter .search-box,
  .catalog-filter .custom-select,
  .catalog-filter .button,
  .catalog-filter .text-link {
    flex: 1 1 100%;
    width: 100% !important;
    min-width: 0;
  }
  .catalog-filter .text-link {
    justify-content: flex-start;
  }
  .compact-budget-card > header,
  .catalog-freight-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

@container motorcycle-card (max-width: 325px) {
  .catalog-price-grid {
    grid-template-columns: 1fr;
  }
  .refined-price-box {
    min-height: 82px;
  }
}

/* Fallback para navegadores sem container queries. */
@media (max-width: 1320px) and (min-width: 821px) {
  .budget-table-card {
    display: none !important;
  }
  .clean-budget-mobile-list {
    display: grid !important;
    gap: 10px;
  }
}

@media (max-width: 650px) {
  .budget-main-filters,
  .catalog-filter {
    display: flex !important;
  }
  .budget-main-filters > *,
  .budget-main-filters .budget-search-box,
  .budget-main-filters .custom-select,
  .budget-main-filters .button,
  .budget-toolbar > .button-primary {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }
}

/* Complemento v23: cards de or?amento tamb?m recebem o acabamento completo
   quando a troca ? provocada pela largura ?til do conte?do em notebooks. */
.clean-budget-mobile-list {
  display: none;
  gap: 10px;
}
.compact-budget-card {
  min-width: 0;
  padding: 14px;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(20,22,26,.035);
}
.compact-budget-card > header {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.compact-budget-card > header > strong { font-size: 12px; }
.compact-budget-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.compact-budget-main > strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}
.compact-budget-main > span { color: #4f535b; font-size: 11px; overflow-wrap: anywhere; }
.compact-budget-main > small { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.compact-budget-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.compact-budget-dates > div {
  min-width: 0;
  padding: 9px 10px;
  display: grid;
  gap: 3px;
  border-radius: 10px;
  background: #f7f7f8;
}
.compact-budget-dates span { color: var(--muted); font-size: 8px; font-weight: 750; text-transform: uppercase; }
.compact-budget-dates strong { font-size: 10px; overflow-wrap: anywhere; }
.mobile-card-actions { position: relative; justify-self: end; }
.mobile-card-actions > summary {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
}

@container page-content (max-width: 1080px) {
  .budget-main-filters { flex-basis: auto; }
}

@container page-content (max-width: 560px) {
  .budget-main-filters { flex: 0 1 auto; }
}

@media (max-width: 820px) {
  .budget-main-filters { flex: 0 1 auto; }
}

/* No celular, pre?os do cat?logo ficam em lista; no restante, 2 colunas no card. */
@container motorcycle-card (max-width: 285px) {
  .catalog-price-grid { grid-template-columns: 1fr; }
}
@media (min-width: 651px) {
  @container motorcycle-card (min-width: 286px) {
    .catalog-price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
}

@media (max-width: 700px) {
  .content-wrap {
    padding-inline: 12px;
  }
}

/* Ajuste fino v23: mant?m a grade de or?amentos no desktop comum e usa cards
   apenas quando a ?rea ?til fica realmente estreita. */
.budget-main-filters .custom-select {
  flex-basis: 200px;
  min-width: min(100%, 190px);
}

@container page-content (max-width: 1200px) and (min-width: 961px) {
  .clean-budget-table th,
  .clean-budget-table td {
    padding: 11px 8px;
  }
  .budget-primary-text,
  .budget-bike-name,
  .budget-seller-name,
  .clean-budget-table .budget-status {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
  }
}

@container page-content (min-width: 961px) {
  .budget-table-card { display: block !important; }
  .clean-budget-mobile-list { display: none !important; }
}

@container page-content (max-width: 960px) {
  .budget-table-card { display: none !important; }
  .clean-budget-mobile-list { display: grid !important; }
}

@media (max-width: 1180px) and (min-width: 821px) {
  .budget-table-card { display: none !important; }
  .clean-budget-mobile-list { display: grid !important; }
}

@media (min-width: 1321px) {
  .budget-table-card { display: block !important; }
  .clean-budget-mobile-list { display: none !important; }
}

/* ==========================================================================
   POLIMENTO PRE-PUBLICACAO ? piso tipografico da UI
   Documento de proposta (.proposal-document) mantem tipografia densa de impressao.
   ========================================================================== */
:root {
  --text-micro: 10px;
  --text-label: 11px;
}

.app-shell .eyebrow,
.app-shell .nav-section,
.app-shell .brand-copy small,
.app-shell .login-kicker,
.app-shell .budget-period-row > span,
.app-shell .status,
.app-shell .status-badge,
.app-shell .restricted-badge,
.app-shell .category-pill,
.app-shell .promotion-pill,
.app-shell .benefit-pill,
.app-shell .role-badge,
.app-shell .approval-badge,
.app-shell .item-kind,
.app-shell .aggregate-price-badge,
.app-shell .aggregate-confirm-badge,
.app-shell .contact-type-badge,
.app-shell .audit-action,
.app-shell .price-box-heading span,
.app-shell .data-item span,
.app-shell .technical-spec-grid span,
.app-shell .management-stats span,
.app-shell .budget-stat-grid span,
.app-shell .budget-focus-card span,
.app-shell .dashboard-stat-card span,
.app-shell .dashboard-model-price span,
.app-shell .selected-bike-box span,
.app-shell .proposal-label,
.app-shell .mobile-management-meta span,
.app-shell .compact-budget-dates span,
.app-shell .catalog-freight-row,
.app-shell .detail-freight,
.app-shell .user-copy small,
.app-shell .seller-brand small,
.app-shell .field small,
.app-shell .table-product small,
.app-shell .price-original,
.app-shell .refined-price-box > em {
  font-size: var(--text-micro) !important;
}

.app-shell .price-box-heading b,
.app-shell .dashboard-price-heading b,
.app-shell .budget-total-cell span,
.app-shell .budget-total-cell .approval-badge {
  font-size: 9px !important;
}

.app-shell th {
  font-size: var(--text-micro) !important;
}

.app-shell .period-chip {
  font-size: var(--text-label) !important;
  font-weight: 600 !important;
}

.app-shell .custom-select-group {
  font-size: var(--text-micro) !important;
}

@media (max-width: 650px) {
  .app-shell .period-chip { font-size: 10px !important; }
  .app-shell .price-box-heading span { font-size: var(--text-micro) !important; }
}
