
.consultoras-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;padding:12px 0}
.consultoras-actions>a,.consultoras-actions>button{min-height:43px;padding:10px 12px}
#consultorasStatus{flex-basis:100%;margin:4px 0}
#consultorasPreview{width:100%;border:1px solid var(--border);border-radius:10px;padding:12px;background:var(--surface-alt)}
#consultorasPreview[hidden]{display:none!important}

/* Itens em linhas na janela de edição de vendas antigas */
#saleItemsEditor{grid-column:1/-1;border:1px solid var(--border);border-radius:12px;padding:14px;min-width:0;background:var(--surface-alt)}
#saleItemsEditor h3{font-size:16px;margin:0 0 10px}
#saleLineContainer{display:grid;gap:10px}
.sale-line-row{display:grid;grid-template-columns:minmax(0,1fr) 112px auto;gap:10px;align-items:end;border-bottom:1px solid var(--border);padding-bottom:10px;min-width:0}
.sale-line-row:has(.sale-line-price){grid-template-columns:minmax(0,1fr) 85px 130px 120px auto}
.sale-line-row .field{min-width:0}.sale-line-row .input-control{width:100%;min-width:0}
.sale-line-subtotal{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}.sale-line-subtotal small{color:var(--muted)}.sale-price-summary{margin:12px 0 0;font-size:15px;font-weight:700;line-height:1.5}.sale-line-delete{min-height:43px}.sale-items-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.sale-items-note{font-size:12px;color:var(--muted);line-height:1.5;margin-bottom:0}
@media(max-width:660px){.sale-line-row,.sale-line-row:has(.sale-line-price){grid-template-columns:minmax(0,1fr) minmax(94px,.34fr)}.sale-line-row .sale-line-name{grid-column:1/-1}.sale-line-price{grid-column:1}.sale-line-subtotal{grid-column:2}.sale-line-delete{grid-column:2;align-self:end}.modal-card{padding:16px}}
/* Avisos consistentes no cabeçalho, com detalhes visíveis em computadores e celulares. */
#martins-error-center{position:relative;z-index:125;padding:14px 18px;margin:0 auto 12px;width:min(100%,1320px);border:2px solid #b42318;border-radius:0 0 12px 12px;background:#fff4f3;color:#771a13;box-shadow:0 8px 24px rgba(0,0,0,.09);line-height:1.5}
#martins-error-center[hidden]{display:none!important}
#martins-error-center[data-type="missing"]{background:#fff9eb;border-color:#ab7010;color:#603c06}
#martins-error-center .martins-error-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
#martins-error-center .martins-error-heading strong{font-size:15px;letter-spacing:.02em}
#martins-error-center p{margin:5px 0}
#martins-error-center summary{font-weight:700;cursor:pointer;margin:8px 0}
#martins-error-center ul{margin:7px 0;padding-left:22px}
#martins-error-center li{padding:2px 0;overflow-wrap:anywhere}
#martins-error-center #martins-error-meta{font-size:12px;opacity:.85}
#martins-error-center button{border:1px solid currentColor;border-radius:8px;background:transparent;color:inherit;padding:8px 12px;min-height:36px;cursor:pointer;font-weight:700;white-space:normal}
#martins-error-center button:focus-visible{outline:3px solid #195fb4;outline-offset:2px}
#martins-error-center .martins-error-actions{margin-top:8px}
@media(max-width:600px){#martins-error-center{padding:12px;margin-bottom:8px;border-radius:0}#martins-error-center .martins-error-heading{flex-wrap:wrap}#martins-error-center .martins-error-heading button{margin-left:auto}}
@media print{body.martins-print-error> :not(#martins-error-center){display:none!important}body.martins-print-error #martins-error-center{display:block!important;border:1px solid #000!important;max-width:100%;width:100%;background:#fff!important;color:#000!important;box-shadow:none!important;position:static!important}body.martins-print-error #martins-error-center details{display:block!important}body.martins-print-error #martins-error-center .martins-error-actions,body.martins-print-error #martins-error-center #martins-error-close{display:none!important}}
.product-suggestion-anchor{position:relative;min-width:0}.product-suggestion-list{position:absolute;top:100%;left:0;right:0;z-index:1000;display:grid;gap:3px;max-height:min(320px,45vh);min-width:min(310px,100%);overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--border);background:var(--surface);padding:5px;border-radius:9px;box-shadow:0 12px 28px rgba(0,0,0,.18)}.product-suggestion-list[hidden]{display:none!important}.product-suggestion-list button{display:block;width:100%;min-height:44px;text-align:left;padding:10px;color:var(--text);background:var(--surface);border:1px solid transparent;border-radius:6px;white-space:normal;overflow-wrap:anywhere;cursor:pointer}.product-suggestion-list button strong{display:block;font-size:14px}.product-suggestion-list button small{display:block;margin-top:3px;color:var(--muted);font-size:12px}.product-suggestion-list button:hover,.product-suggestion-list button[aria-selected=true]{border-color:var(--link);background:var(--surface-alt)}@media(max-width:600px){.product-suggestion-list{min-width:0;max-width:100%;max-height:42vh}.product-suggestion-list button{min-height:48px}}
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--background);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  cursor: pointer;
}

a {
  color: var(--link);
  text-decoration: none;
}

.wordmark {
  position: relative;
  width: max-content;
  padding-bottom: 8px;
  color: var(--link);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
}

.wordmark span {
  position: absolute;
  left: 1px;
  right: 0;
  bottom: 0;
  height: 4px;
  background: #e8293d;
}

.primary,
.secondary,
.outline-button,
.admin-link {
  min-height: 43px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary {
  border: 1px solid #0b3677;
  color: white;
  background: #0b3677;
}

.secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.outline-button {
  border: 1px solid #0b3677;
  color: var(--link);
  background: var(--surface);
}

.admin-link {
  min-height: 36px;
  padding: 8px 12px;
  color: white;
  background: #0b3677;
}

.full {
  width: 100%;
}

.input-control,
.auth-form input,
.auth-form select {
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(480px, 100%);
  min-width: 0;
  padding: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: 0 16px 50px rgba(23,59,114,.08);
}

.auth-card .wordmark {
  margin-bottom: 28px;
}

.auth-card h1 {
  margin: 0 0 10px;
  font-size: 29px;
}

.auth-card > p {
  color: var(--muted);
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 22px 0;
  padding: 4px;
  border-radius: 9px;
  background: var(--surface-alt);
}

.auth-tab {
  padding: 10px;
  border-radius: 7px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.auth-tab.active {
  color: var(--link);
  background: var(--surface);
  box-shadow: 0 1px 5px rgba(0,0,0,.08);
}

.auth-form {
  display: grid;
  gap: 17px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
}

.forgot-link {
  text-align: center;
}

.trial-badge {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 20px;
  color: #17653a;
  background: #e8f7ef;
  font-size: 12px;
  font-weight: 800;
}

.form-message {
  min-height: 17px;
  margin: 0;
  font-size: 13px;
}

.error {
  color: #a42132;
}

.success {
  color: #17653a;
}

.topbar {
  min-height: 86px;
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border-bottom: 1px solid #e2e7ef;
}

.brand {
  display: flex;
  align-items: center;
  gap: 22px;
}

.branch-name {
  padding-left: 22px;
  border-left: 1px solid #dce2ea;
  font-weight: 700;
}

.branch-name small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.account-email {
  color: var(--muted);
  font-size: 14px;
}

.dashboard-shell {
  width: 94%;
  max-width: 1400px;
  margin: auto;
  padding: 34px 0;
}

.dashboard-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin-bottom: 26px;
}

.dashboard-heading h1 {
  margin: 7px 0 9px;
  font-size: 34px;
}

.dashboard-heading p {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
}

.heading-actions {
  display: flex;
  gap: 10px;
}

.subscription-banner {
  margin-bottom: 20px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  border-radius: 10px;
}

.trial-banner {
  border: 1px solid #ead797;
  color: #7a5400;
  background: #fff9e8;
}

.active-banner {
  border: 1px solid #bde5ce;
  color: #17653a;
  background: #ecf9f1;
}

.admin-banner {
  border: 1px solid #bdd0ed;
  color: var(--link);
  background: var(--surface-alt);
}

.stats {
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
}

.stat-card {
  padding: 21px;
  background: var(--surface);
  border: 1px solid #e0e6ef;
  border-radius: 11px;
}

.stat-card span {
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin: 14px 0 9px;
  font-size: 26px;
}

.stat-card small {
  color: var(--muted);
}

.stat-card.featured {
  color: white;
  background: #0c3370;
  border-color: #0c3370;
}

.stat-card.featured span,
.stat-card.featured small {
  color: #d3e0f6;
}

.tabs {
  display: flex;
  gap: 20px;
  overflow: auto;
  border-bottom: 1px solid #dce3ed;
}

.tabs button,
.tabs a {
  padding: 14px 3px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  text-decoration: none;
  color: var(--muted);
  background: transparent;
}

.tabs button.active,
.tabs a.active {
  color: var(--link);
  border-bottom-color: var(--link);
  font-weight: 800;
}

.panel {
  margin-top: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid #e0e6ef;
  border-radius: 11px;
}

.hidden {
  display: none !important;
}

.panel-header {
  padding: 22px 24px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.panel-header h2 {
  margin: 0;
}

.panel-header p {
  margin: 5px 0 0;
  color: var(--muted);
}

.filters {
  padding: 0 24px 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.grow {
  flex: 1;
  min-width: 240px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.admin-table {
  min-width: 1500px;
}

th {
  padding: 12px 14px;
  background: var(--surface-alt);
  border-top: 1px solid #edf0f5;
  border-bottom: 1px solid #e7ebf2;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
}

td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf0f5;
  color: var(--text);
  font-size: 14px;
  vertical-align: top;
}

.table-sub {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.own-badge {
  display: inline-block;
  margin-top: 7px;
  padding: 3px 7px;
  border-radius: 12px;
  color: var(--link);
  background: var(--surface-alt);
  font-size: 11px;
  font-weight: 700;
}

.period-label {
  font-weight: 700;
}

.admin-users {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.admin-user-line {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.admin-user-line span {
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--surface-alt);
  font-size: 11px;
}

.subscription-controls {
  min-width: 260px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.mini-select {
  grid-column: 1 / -1;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.mini-button {
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.primary-mini {
  color: white;
  background: #0b3677;
  border-color: var(--link);
}

.mini-button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.danger-text {
  color: #a42132;
}

.badge {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.badge.paid {
  color: #17653a;
  background: #e8f7ef;
}

.badge.pending {
  color: #8a5600;
  background: #fff4d9;
}

.badge.cancelled {
  color: #992334;
  background: #fdebed;
}

.row-actions {
  display: flex;
  gap: 6px;
}

.empty-row,
.empty-text {
  padding: 28px !important;
  text-align: center;
  color: var(--muted);
}

.card-grid {
  padding: 0 22px 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(210px,1fr));
  gap: 14px;
}

.mini-card {
  padding: 18px;
  border: 1px solid #e0e6ef;
  border-radius: 10px;
}

.mini-card h3 {
  margin: 0 0 8px;
}

.mini-card p,
.mini-card small {
  color: var(--muted);
}

.mini-card strong {
  display: block;
  margin: 10px 0 5px;
  color: var(--link);
  font-size: 23px;
}

.payroll-box {
  padding: 20px 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid #edf0f5;
}

.receipt-grid {
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}

.receipt-card {
  padding: 20px;
  display: grid;
  gap: 12px;
  border: 1px solid #e0e6ef;
  border-radius: 10px;
}

.due-area {
  margin-bottom: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid #d8e2ee;
  border-radius: 11px;
}

.due-head {
  padding: 18px 21px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.due-head h2 {
  margin: 0 0 5px;
}

.due-head p {
  margin: 0;
  color: var(--muted);
}

.due-count {
  padding: 6px 10px;
  border-radius: 20px;
  background: var(--surface-alt);
}

.due-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.due-list li {
  padding: 13px 20px;
  display: flex;
  gap: 15px;
  align-items: center;
  border-top: 1px solid #e8edf4;
}

.due-info {
  flex: 1;
  display: grid;
  gap: 4px;
}

.due-info small {
  color: var(--muted);
}

.due-stage {
  color: #8a5600;
  font-weight: 700;
}

.small-button {
  min-height: 34px;
  padding: 6px 10px;
}

dialog {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(8,20,44,.67);
}

.dialog-card {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 22px 70px rgba(8,20,44,.22);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.dialog-head h2 {
  margin: 4px 0 0;
}

.dialog-card .form-grid > label {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.dialog-card .form-grid > .full {
  width: auto;
  grid-column: 1 / -1;
}

.dialog-card input,
.dialog-card select,
.dialog-card textarea {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

.dialog-card textarea {
  min-height: 96px;
  resize: vertical;
}

.dialog-card input:focus,
.dialog-card select:focus,
.dialog-card textarea:focus {
  border-color: var(--link);
  outline: 3px solid rgba(11,54,119,.12);
}

.field-hint {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.form-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.tracking-share-state {
  margin: 0 0 16px;
  padding: 11px 13px;
  border: 1px solid #badcc8;
  border-radius: 9px;
  color: #17653a;
  background: #edf9f2;
  font-size: 13px;
  font-weight: 700;
}

[hidden] { display: none !important; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid #72a8e8; outline-offset: 3px; }
.delivery-flow-help{margin:0 0 24px;padding:20px;border:1px solid var(--border);border-radius:14px;background:var(--surface)}.delivery-flow-help h2{font-size:18px;margin-top:0}.delivery-flow-help li{margin:8px 0}.delivery-table td>small{display:block;margin-top:6px}
body[data-page="deliveries"] .delivery-stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
.delivery-workspace { padding: 22px; }
.delivery-toolbar { display: grid; grid-template-columns: minmax(200px,2fr) repeat(2,minmax(160px,1fr)) auto; gap: 14px; align-items: end; }
.delivery-toolbar label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; min-width: 0; }
.delivery-toolbar input,.delivery-toolbar select,.delivery-table select { width:100%; min-width:0; min-height:44px; padding:10px; border:1px solid var(--border); border-radius:9px; color:var(--text); background:var(--surface); font:inherit; }
.delivery-result-note { color:var(--muted); font-size:12px; line-height:1.5; margin:16px 0; }
.delivery-table-wrap { overflow:auto; }
.delivery-table { width:100%; border-collapse:collapse; }
.delivery-table td { vertical-align:top; overflow-wrap:anywhere; }
.delivery-row-actions { display:flex; gap:8px; flex-wrap:wrap; min-width:180px; }
.delivery-row-actions button,.delivery-action-link { display:inline-flex; align-items:center; min-height:40px; padding:8px 10px; border:1px solid var(--border); background:var(--surface-alt); color:var(--link); border-radius:8px; font-size:12px; font-weight:700; }
.delivery-row-actions button:hover,.delivery-action-link:hover { background:var(--surface-alt); }
.delivery-badge { display:inline-block; border-radius:20px; padding:6px 10px; background:var(--surface-alt); color:var(--text); font-size:12px; font-weight:700; }
.status-separating { background:#fff4d9; color:#7b5308; }
.status-ready { background:#e9e9ff; color:#4b4090; }
.status-out_for_delivery { background:#e4f0ff; color:#164e92; }
.status-delivered { background:#e5f6ec; color:#17653a; }
.delivery-issues { display:grid; gap:5px; margin-top:8px; color:var(--delivery-warning); }
.delivery-location-controls { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 0 16px; font-size:12px; color:var(--muted); }
.delivery-overview { margin:0 0 24px; padding:22px; border:1px solid var(--border); border-radius:14px; background:linear-gradient(115deg,#f1f7ff,white); }
.delivery-overview-head { display:flex; justify-content:space-between; align-items:center; gap:18px; }
.delivery-overview h2 { margin:6px 0; font-size:22px; }
.delivery-overview p { color:var(--muted); font-size:13px; }
.delivery-overview-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:18px; }
.delivery-overview-metrics a { display:grid; gap:6px; padding:16px; border:1px solid var(--border); border-radius:10px; background:var(--surface); }
.delivery-overview-metrics a:hover { border-color:#3976bd; }
.delivery-overview-metrics strong { font-size:27px; color:var(--link); }
.delivery-overview-metrics span { font-size:13px; color:var(--muted); }
#deliveryDialog,#proofDialog,#destinationDialog { inset:0; width:max-content; max-width:calc(100vw - 18px); }
.dialog-card .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.top-actions { flex-wrap:wrap; justify-content:flex-end; }
@media(max-width:1000px) {
  .delivery-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body[data-page="deliveries"] .delivery-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:650px) {
  .topbar { flex-wrap:wrap; }
  .top-actions { justify-content:flex-start; }
  .delivery-workspace { padding:14px; }
  .delivery-toolbar { grid-template-columns:minmax(0,1fr); }
  .delivery-toolbar input,.delivery-toolbar select,.dialog-card input,.dialog-card textarea { font-size:16px; }
  .delivery-table,.delivery-table tbody,.delivery-table tr,.delivery-table td { display:block; width:100%; min-width:0; }
  .delivery-table-wrap { overflow:visible; }
  .delivery-table thead { display:none; }
  .delivery-table tr { border:1px solid var(--border); border-radius:12px; padding:12px; margin-bottom:14px; background:var(--surface); }
  .delivery-table td { padding:8px 0; border:0; white-space:normal; }
  .delivery-table td[data-label]::before { content:attr(data-label); display:block; font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:5px; font-weight:700; }
  .delivery-row-actions { min-width:0; }
  .delivery-row-actions button,.delivery-action-link { min-height:44px; }
  .delivery-location-controls,.delivery-overview-head { align-items:stretch; flex-direction:column; }
  .delivery-overview { padding:16px; }
  .delivery-overview-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dialog-card .form-grid { grid-template-columns:minmax(0,1fr); }
}

.modal-card {
  width: min(720px,94vw);
  max-height: 90vh;
  overflow: auto;
  padding: 24px;
  border-radius: 13px;
  background: var(--surface);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.icon-button {
  border: 0;
  background: transparent;
  font-size: 28px;
}

.form-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.field.wide {
  grid-column: 1 / -1;
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.muted {
  color: var(--muted);
}

@media(max-width:900px) {

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .receipt-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media(max-width:650px) {

  .stats {
    grid-template-columns: 1fr;
  }

  .branch-name,
  .account-email {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .dialog-card {
    width: min(100%, calc(100vw - 18px));
    max-height: calc(100dvh - 18px);
    padding: 20px 16px;
    border-radius: 12px;
  }

  .topbar {
    padding: 12px 16px;
    gap: 10px;
  }

  .topbar .wordmark {
    font-size: 28px;
  }

  .top-actions {
    gap: 10px;
  }

  .dialog-card .form-grid > .full {
    grid-column: auto;
  }

  .dialog-head {
    gap: 10px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions button {
    width: 100%;
  }

  .field.wide {
    grid-column: auto;
  }

  .auth-card {
    padding: 27px;
  }
}
:root{color-scheme:light;--background:#f5f7fb;--surface:#ffffff;--surface-alt:#edf1f6;--text:#1e2f49;--muted:#52627a;--link:#0b3677;--border:#8799b1;--delivery-warning:#8a5600}
:root[data-theme="dark"]{color-scheme:dark;--background:#0e1726;--surface:#19283b;--surface-alt:#23354c;--text:#edf3fc;--muted:#bccbe0;--link:#a9ceff;--border:#71859f;--delivery-warning:#ffd27a}
.theme-toggle{gap:6px;white-space:nowrap;font-size:13px;min-height:44px}
.auth-card>.theme-toggle{display:flex;margin:0 0 20px auto}
.theme-floating{position:fixed;right:16px;bottom:16px;z-index:1000}
.section-navigation{position:sticky;top:0;z-index:30;background:var(--background);padding:12px 0;margin:0 0 22px;overflow-x:auto;flex-wrap:nowrap;box-shadow:0 6px 12px var(--background)}
.section-navigation button,.section-navigation a{flex-shrink:0;min-height:44px}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
textarea,.icon-button{color:var(--text)}
textarea{background:var(--surface)}
:focus-visible{outline:3px solid var(--link);outline-offset:3px}
:root[data-theme="dark"] .tracking-status,:root[data-theme="dark"] .route-metric,:root[data-theme="dark"] .team-profile-dialog,:root[data-theme="dark"] .team-workspace input,:root[data-theme="dark"] .team-workspace select{background:var(--surface);color:var(--text);border-color:var(--border)}
:root[data-theme="dark"] .team-workspace button:not(.primary),:root[data-theme="dark"] .team-profile-dialog button:not(.primary){background:var(--surface-alt);color:var(--text);border-color:var(--border)}
:root[data-theme="dark"] .route-metric strong{color:var(--link)}
.route-metric span,.route-notice,.team-table td:before{color:var(--muted)}
.delivery-overview{background:var(--surface-alt)}
.primary,.admin-link{color:#fff!important;background:#0b3677}
.stat-card.featured{color:#fff;background:#0c3370}
.stat-card.featured span,.stat-card.featured small{color:#d3e0f6}

/* ---- Campos de senha com botao "Mostrar senha" (login e cadastro) ---- */
.login-password-field{display:grid;gap:8px}
.login-password-row{display:flex;align-items:stretch;gap:8px}
.login-password-row input{flex:1;min-width:0}
.login-password-row button{flex:none;min-width:114px;padding:8px 12px;white-space:nowrap}
.login-caps-status{margin:0;font-size:.85rem;color:var(--muted,#abc4de)}
.login-caps-status[data-state="active"]{color:#fbbf24;font-weight:600}
@media(max-width:380px){.login-password-row{flex-wrap:wrap}.login-password-row input{flex-basis:100%}}

/* ---- Retorno da consulta de CNPJ no cadastro ---- */
.cnpj-status{margin:4px 0 0;font-size:.85rem;color:var(--muted);min-height:1.2em}
.cnpj-status[data-state="loading"]{opacity:.75}
.cnpj-status[data-state="error"]{color:#b4541f}
:root[data-theme="dark"] .cnpj-status[data-state="error"]{color:#ffb380}
.cnpj-status[data-state="ok"]{color:var(--link);font-weight:600}


/* ---- Retorno da SEFAZ no detalhe da NF-e ---- */
.fiscal-state-note{margin:0 0 14px;color:var(--muted);line-height:1.5}
.fiscal-facts{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;margin:0 0 14px;font-size:.92rem}
.fiscal-facts dt{color:var(--muted)}
.fiscal-facts dd{margin:0;word-break:break-all;font-variant-numeric:tabular-nums}
.fiscal-sefaz{margin:0 0 16px;padding:12px 14px;border-radius:9px;border-left:4px solid var(--border);background:var(--surface-alt)}
.fiscal-sefaz[data-level="error"]{border-left-color:#b4541f}
:root[data-theme="dark"] .fiscal-sefaz[data-level="error"]{border-left-color:#ffb380}
.fiscal-sefaz-code{margin:0 0 4px;font-size:.78rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.fiscal-sefaz[data-level="error"] .fiscal-sefaz-code{color:#b4541f}
:root[data-theme="dark"] .fiscal-sefaz[data-level="error"] .fiscal-sefaz-code{color:#ffb380}
.fiscal-sefaz-message{margin:0;line-height:1.5}
.fiscal-sefaz-advice{margin:8px 0 0;padding-top:8px;border-top:1px solid var(--border);color:var(--muted);line-height:1.5}

@media print{.theme-toggle{display:none}}

