:root {
  --navy: #0d3158;
  --navy2: #164a7d;
  --blue: #1972ad;
  --sky: #e9f4fd;
  --bg: #f3f6fa;
  --card: #fff;
  --line: #dce5ee;
  --text: #17324d;
  --muted: #6a7f93;
  --red: #c83228;
  --yellow: #d69700;
  --green: #238548;
  --shadow: 0 8px 26px rgba(23, 50, 77, 0.08);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.45 Inter,
    system-ui,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  padding: 11px 16px;
  font-weight: 750;
  cursor: pointer;
  transition: 0.18s;
}
button:hover {
  background: var(--navy2);
  transform: translateY(-1px);
}
header {
  height: 74px;
  background: linear-gradient(110deg, #092a4c, #154b7d);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 9px max(3%, 24px);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 5px 18px #0a2c4f24;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.brand-link img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 4px;
}
.brand-link span {
  display: flex;
  flex-direction: column;
}
.brand-link strong {
  font-size: 19px;
}
.brand-link small {
  opacity: 0.72;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-link {
  color: #dcecff;
  text-decoration: none;
  font-weight: 650;
  padding: 9px 10px;
  border-radius: 8px;
}
.header-link:hover {
  background: #ffffff16;
}
.secondary {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
}
.secondary:hover {
  background: #f1f6fa;
  color: var(--navy);
}
nav {
  height: 62px;
  display: flex;
  justify-content: center;
  gap: 7px;
  background: #fff;
  padding: 8px 3%;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 74px;
  z-index: 15;
}
nav button {
  min-width: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  background: transparent;
  color: #536b80;
  font-weight: 700;
}
nav button span {
  font-size: 19px;
}
nav button:hover,
nav button.active {
  background: var(--sky);
  color: var(--navy);
  transform: none;
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 28px max(3%, 22px) 90px;
}
.view {
  display: none;
}
.view.active {
  display: block;
}
.eyebrow {
  display: block;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.02em;
}
h2 {
  margin: 0;
  font-size: 18px;
}
.sub {
  color: var(--muted);
  margin: 5px 0 21px;
}
.title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 17px;
}
.welcome {
  background: linear-gradient(120deg, #fff, #eaf5fd);
  border: 1px solid #d6e9f7;
  border-radius: 20px;
  padding: 25px 27px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow);
}
.welcome h1 {
  font-size: 29px;
}
.welcome p {
  margin: 6px 0 0;
  color: var(--muted);
}
.quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.quick-actions button {
  background: #fff;
  color: var(--navy);
  border: 1px solid #c8ddec;
}
.quick-actions button:last-child {
  background: var(--navy);
  color: #fff;
}
.cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.card,
.panel,
.item,
.client-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 17px;
  box-shadow: 0 3px 14px rgba(23, 50, 77, 0.045);
}
.card-link {
  text-align: left;
  color: var(--text);
  min-height: 124px;
}
.card-link strong {
  display: block;
  font-size: 31px;
  color: var(--navy);
  margin-top: 7px;
}
.card-link small {
  display: block;
  margin-top: 6px;
  color: var(--blue);
}
.card-link:hover {
  background: #fff;
  border-color: #9dc8e8;
  box-shadow: var(--shadow);
}
.panel {
  margin-top: 14px;
}
.panel-heading > div {
  display: flex;
  gap: 11px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.panel-heading p {
  margin: 2px 0;
  color: var(--muted);
  font-size: 13px;
}
.panel-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff1d6;
  color: #9a6500;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.alerts-panel #alerts p {
  padding: 10px 4px;
  margin: 0;
  border-bottom: 1px solid #edf2f6;
}
.alerts-panel #alerts p:last-child {
  border-bottom: 0;
}
.service-alert-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid #edf2f6;
}
.service-alert-row:last-child {
  border-bottom: 0;
}
.service-alert-row p {
  padding: 0 !important;
  border: 0 !important;
}
.service-alert-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.service-alert-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.service-alert-actions button {
  padding: 7px 9px;
  font-size: 11px;
}
.search-box {
  max-width: 590px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #cbd9e5;
  border-radius: 11px;
  padding-left: 13px;
  box-shadow: 0 2px 10px #17324d0a;
}
.section-search {
  margin-bottom: 15px;
  max-width: none;
}
.search-box span {
  font-size: 22px;
  color: #789;
}
.search,
input,
select,
textarea {
  width: 100%;
  padding: 11px;
  border: 1px solid #cbd9e5;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.search {
  border: 0;
  box-shadow: none;
}
.search:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: #4d9acc;
  box-shadow: 0 0 0 3px #4d9acc1f;
}
.order-tools {
  display: grid;
  grid-template-columns: minmax(280px, 590px) 220px;
  gap: 10px;
  margin-bottom: 14px;
}
.appointment-tools {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 250px;
  gap: 10px;
  margin-bottom: 14px;
}
.appointment-tools .search-box {
  max-width: none;
}
.order-tools .search-box {
  max-width: none;
}
.order-tools select {
  background: #fff;
}
.color-help {
  display: flex;
  gap: 17px;
  margin: -7px 0 14px;
  color: var(--muted);
  font-size: 12px;
}
.color-help span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.color-help i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.red-dot {
  background: var(--red);
}
.yellow-dot {
  background: var(--yellow);
}
.blue-dot {
  background: var(--blue);
}
.gray-dot {
  background: #8796a5;
}
.list {
  display: grid;
  gap: 11px;
}
.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}
.item h3,
.client-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
}
.item p,
.client-head p {
  margin: 2px 0;
  color: var(--muted);
}
.item .purchase-alert {
  margin-top: 7px;
  color: #9b5200;
  background: #fff1d7;
  padding: 7px 9px;
  border-radius: 8px;
}
.actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.actions button {
  padding: 8px 11px;
}
.appointment-row.is-archived {
  border-left: 7px solid #8796a5;
  background: #f7f9fb;
  opacity: 0.9;
}
.appointment-note {
  margin-top: 6px !important;
  font-size: 12px;
}
.appointment-actions {
  align-items: center;
  justify-content: flex-end;
}
.appointment-actions-menu {
  position: relative;
}
.appointment-actions-menu summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 11px;
  border: 1px solid #bfd0de;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}
.appointment-actions-menu summary::-webkit-details-marker {
  display: none;
}
.appointment-actions-menu[open] > div {
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  gap: 6px;
  min-width: 145px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}
.appointment-actions-menu[open] > div button {
  width: 100%;
}
.success {
  background: #157347;
}
.success:hover {
  background: #0f5d38;
}
.late-red {
  border-left: 7px solid #e0392d;
  background: #fff7f6;
}
.late-yellow {
  border-left: 7px solid #e7ad18;
  background: #fffbeb;
}
.stock-low {
  border-left: 7px solid #e0392d;
}
.stock-alert-summary{display:flex;gap:8px;align-items:center;justify-content:space-between;margin:12px 0;padding:12px 14px;border:1px solid #e7bd55;border-radius:12px;background:#fff8df;color:#76520a}.stock-alert-summary span{font-size:13px}.stock-low-filter{display:flex;align-items:center;gap:9px;width:max-content;max-width:100%;margin:10px 0 14px;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;font-weight:700}.stock-low-filter input{width:18px;height:18px}.stock-critical{border-color:#d73737!important;background:#fff0f0!important}.stock-fast{margin-left:6px;background:#ffda75;color:#604300}@media(max-width:700px){.stock-alert-summary{align-items:flex-start;flex-direction:column}}
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  background: #e8f0f8;
  color: #355978;
  font-size: 11px;
  font-weight: 800;
}
.client-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.equipment-list {
  margin-top: 15px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  display: grid;
  gap: 8px;
}
.equipment-list > strong {
  font-size: 13px;
  color: #516b82;
}
.equipment-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  background: #f6f9fc;
  color: var(--text);
  border: 1px solid #dce6ef;
  padding: 11px 13px;
}
.equipment-row:hover {
  background: #eef6fc;
  color: var(--text);
  transform: none;
}
.equipment-row span,
.equipment-row small {
  display: block;
}
.equipment-row small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
}
.equipment-row .defect {
  color: #a34138;
}
.equipment-row em {
  font-style: normal;
  color: var(--blue);
  font-weight: 750;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-weight: 700;
  font-size: 13px;
}
.form-grid .wide,
.wide {
  grid-column: 1/-1;
}
textarea {
  min-height: 92px;
  resize: vertical;
}
.document-panel {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 22px;
  align-items: center;
  padding: 25px;
}
.document-icon {
  width: 88px;
  height: 110px;
  border-radius: 12px;
  background: linear-gradient(145deg, #d6312b, #a91d19);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 10px 25px #a91d1930;
}
dialog {
  width: min(900px, 96vw);
  max-height: 94vh;
  border: 0;
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 24px 80px #001c3555;
}
dialog::backdrop {
  background: #06223c99;
  backdrop-filter: blur(2px);
}
#entityForm,
#stockForm {
  padding: 22px;
  max-height: 94vh;
  overflow: auto;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 19px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.modal-head button {
  font-size: 25px;
  background: #eef3f7;
  color: #49647a;
  padding: 3px 10px;
  border-radius: 50%;
}
.modal-head button:hover {
  transform: none;
}
.modal-head .eyebrow {
  margin: 0;
}
footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
#toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #153f64;
  color: #fff;
  padding: 13px 18px;
  border-radius: 11px;
  display: none;
  z-index: 30;
  box-shadow: 0 10px 30px #0003;
}
.form-help {
  padding: 11px 13px;
  background: #eef6fc;
  border-radius: 10px;
  color: #45637d;
  font-size: 13px;
}
.catalog-editor {
  grid-column: 1/-1;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
  background: #f7fafc;
}
.catalog-editor h3 {
  margin: 14px 0 9px;
  font-size: 15px;
}
.catalog-editor h3:first-child {
  margin-top: 0;
}
.catalog-add {
  display: grid;
  grid-template-columns: 1fr 110px auto;
  gap: 8px;
  align-items: end;
}
.manual-add {
  display: grid;
  grid-template-columns: 130px 130px 1fr 100px 110px 120px auto;
  gap: 7px;
  align-items: center;
}
.catalog-list {
  display: grid;
  gap: 7px;
  margin-top: 13px;
}
.catalog-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px;
}
.catalog-row small {
  display: block;
  color: var(--muted);
}
.catalog-row button {
  padding: 6px 9px;
  background: #b8322a;
}
.guarantee-info {
  grid-column: 1/-1;
  padding: 10px 12px;
  border-radius: 9px;
  background: #edf7ef;
  color: #277143;
  font-weight: 700;
}
.inline-equipment {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  background: #f8fbfd;
}
.inline-equipment h3 {
  display: inline-block;
  margin: 0 12px 0 0;
}
.quick-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 10px 0;
}
input[readonly] {
  background: #edf2f6;
  color: #48627a;
  font-weight: 750;
}
#orderDetail {
  width: min(920px, 96vw);
}
.detail-shell {
  padding: 22px;
  max-height: 92vh;
  overflow: auto;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.detail-grid section,
.detail-block {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 12px;
  padding: 13px;
}
.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
}
.detail-grid strong {
  display: block;
  margin: 4px 0;
}
.detail-grid p,
.detail-block p {
  margin: 5px 0;
  color: #526b81;
}
.detail-block {
  margin-top: 10px;
  background: #fff;
}
.detail-block h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.detail-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--navy);
  color: #fff;
  border-radius: 12px;
  padding: 14px 17px;
  margin-top: 10px;
}
.detail-total strong {
  font-size: 21px;
}
@media (max-width: 950px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .header-link {
    display: none;
  }
  .welcome {
    align-items: flex-start;
    flex-direction: column;
  }
  .quick-actions {
    justify-content: flex-start;
  }
  .document-panel {
    grid-template-columns: 1fr;
  }
  .document-icon {
    display: none;
  }
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .manual-add {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .quick-fields {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  body {
    padding-bottom: 72px;
  }
  header {
    height: 66px;
    padding: 7px 11px;
    position: relative;
  }
  .brand-link img {
    width: 46px;
    height: 46px;
  }
  .brand-link strong {
    font-size: 15px;
  }
  .brand-link small {
    font-size: 10px;
  }
  .header-actions .header-link {
    display: none;
  }
  nav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    padding: 5px 4px;
    justify-content: flex-start;
    box-shadow: 0 -5px 18px #0b2f5522;
    border-top: 1px solid var(--line);
    z-index: 25;
  }
  nav button {
    min-width: 74px;
    flex: 0 0 74px;
    display: grid;
    gap: 0;
    padding: 4px 2px;
    font-size: 9px;
  }
  nav button span {
    font-size: 18px;
  }
  main {
    padding: 17px 10px 22px;
  }
  .welcome {
    padding: 19px;
  }
  .welcome h1 {
    font-size: 23px;
  }
  .quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .quick-actions button {
    padding: 9px 7px;
    font-size: 11px;
  }
  .quick-actions button:last-child {
    grid-column: 1/-1;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .card-link {
    min-height: 101px;
    padding: 12px;
  }
  .card-link strong {
    font-size: 24px;
  }
  .title {
    align-items: flex-start;
  }
  .title > button {
    padding: 9px;
    font-size: 11px;
  }
  .title h1 {
    font-size: 22px;
  }
  .item {
    grid-template-columns: 1fr;
  }
  .client-head {
    display: grid;
  }
  .actions button {
    flex: 1;
  }
  .equipment-row {
    align-items: flex-start;
  }
  .equipment-row em {
    font-size: 11px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide,
  .wide {
    grid-column: auto;
  }
  .document-panel {
    padding: 15px;
  }
  dialog {
    width: 96vw;
  }
  #entityForm {
    padding: 15px;
  }
  .color-help {
    flex-wrap: wrap;
  }
  .order-tools,
  .detail-grid,
  .detail-columns,
  .catalog-add,
  .manual-add,
  .quick-fields {
    grid-template-columns: 1fr;
  }
  .detail-shell {
    padding: 14px;
  }
  .detail-total {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .catalog-row {
    grid-template-columns: 1fr auto;
  }
  .catalog-row button {
    grid-column: 1/-1;
  }
}
@media print {
  header,
  nav,
  button,
  .no-print {
    display: none !important;
  }
  body {
    background: #fff;
    padding: 0;
  }
  main {
    max-width: none;
    padding: 0;
  }
  .view {
    display: block;
  }
  .view:not(.print-active) {
    display: none;
  }
  .panel {
    border: 0;
    box-shadow: none;
  }
}
.catalog-row.editable {
  grid-template-columns: minmax(190px, 1fr) 90px 130px auto auto;
}
.catalog-row.editable label {
  font-size: 11px;
  color: var(--muted);
}
.catalog-row.editable input {
  padding: 7px;
  margin-top: 3px;
}
.payment-help {
  border-left: 5px solid var(--blue);
}
[data-payment-field][hidden] {
  display: none;
}
@media (max-width: 700px) {
  .catalog-row.editable {
    grid-template-columns: 1fr 1fr;
  }
  .catalog-row.editable > span {
    grid-column: 1/-1;
  }
  .catalog-row.editable > button {
    grid-column: 1/-1;
  }
}
.purchase-history {
  margin-top: 22px;
}
.danger {
  background: #b52b25;
}
.danger:hover {
  background: #8f211d;
}
.cancelled-purchase {
  opacity: 0.68;
  border-left: 6px solid #8998a6;
}
.barcode-tools {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px;
  align-items: center;
  background: #eef6fc;
  padding: 11px;
  border-radius: 10px;
}
.barcode-tools small {
  color: var(--muted);
}
#barcodeVideo {
  grid-column: 1/-1;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 10px;
  background: #000;
}
@media (max-width: 700px) {
  .barcode-tools {
    grid-template-columns: 1fr;
  }
}
.purchase-heading {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 15px;
  align-items: center;
  margin-bottom: 14px;
}
.purchase-heading .sub {
  margin: 3px 0;
}
.manual-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.manual-panels section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px;
}
.manual-panels h4 {
  margin: 0 0 9px;
  color: var(--navy);
}
.manual-fields {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 7px;
  margin-top: 7px;
}
.manual-panels section:last-child .manual-fields {
  grid-template-columns: 120px 85px 110px 120px auto;
}
@media (max-width: 900px) {
  .purchase-heading,
  .manual-panels {
    grid-template-columns: 1fr;
  }
  .manual-fields,
  .manual-panels section:last-child .manual-fields {
    grid-template-columns: 1fr;
  }
}
.invoice-start {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: end;
}
.invoice-manual-tools {
  display: grid;
  grid-template-columns: auto auto minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #b9cee1;
  border-radius: 12px;
  background: #f2f7fb;
}
.invoice-manual-tools video {
  grid-column: 1 / -1;
  width: min(100%, 520px);
  max-height: 280px;
  margin: auto;
  border-radius: 10px;
  background: #06192d;
}
.ocr-status {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 320px) auto;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid #9abbd7;
  border-radius: 10px;
  background: #edf6fd;
  color: #07345e;
}
.ocr-status progress {
  width: 100%;
}
.ocr-review {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #c4d2df;
  border-radius: 10px;
  background: #fff;
}
.ocr-review summary {
  cursor: pointer;
  font-weight: 700;
  color: #07345e;
}
.ocr-review textarea {
  width: 100%;
  margin: 12px 0;
  font: 12px/1.45 monospace;
}
@media (max-width: 760px) {
  .invoice-manual-tools {
    grid-template-columns: 1fr;
  }
  .ocr-status {
    grid-template-columns: 1fr;
  }
}
.invoice-start label,
.invoice-meta label {
  display: grid;
  gap: 5px;
  font-weight: 750;
  font-size: 13px;
}
.file-button {
  background: var(--navy);
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  cursor: pointer;
}
.file-button input {
  display: none;
}
#invoiceVideo {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  background: #000;
  border-radius: 12px;
  margin: 12px 0;
}
.invoice-meta {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 9px;
  margin: 14px 0;
}
.invoice-items {
  display: grid;
  gap: 8px;
  max-height: 48vh;
  overflow: auto;
}
.invoice-row {
  display: grid;
  grid-template-columns:
    minmax(180px, 1.4fr) minmax(150px, 1fr)
    110px 120px 85px 75px 105px 105px 40px;
  gap: 6px;
  align-items: center;
  background: #f7fafc;
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 10px;
}
.invoice-row.review-needed {
  border: 2px solid #d98200;
  background: #fff8e8;
}
.invoice-row.review-needed span small {
  color: #8a4b00;
  font-weight: 700;
}
.invoice-row span small {
  display: block;
  color: var(--muted);
}
.invoice-row input {
  padding: 8px;
}
.invoice-row button {
  padding: 8px;
}
.invoice-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #e9f4fd;
  padding: 13px;
  border-radius: 10px;
  margin-top: 12px;
}
.invoice-total small {
  color: var(--muted);
}
.invoice-review-guard {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 2px solid #d98200;
  border-radius: 10px;
  background: #fff8e8;
  color: #633600;
  cursor: pointer;
}
.invoice-review-guard[hidden] {
  display: none;
}
.invoice-review-guard input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}
.invoice-review-guard span {
  display: grid;
  gap: 3px;
}
#invoiceForm {
  padding: 22px;
  max-height: 94vh;
  overflow: auto;
}
@media (max-width: 900px) {
  .invoice-start,
  .invoice-meta {
    grid-template-columns: 1fr;
  }
  .invoice-row {
    grid-template-columns: 1fr 1fr;
  }
  .invoice-row span {
    grid-column: 1/-1;
  }
  .invoice-row button {
    grid-column: 1/-1;
  }
  .invoice-total {
    display: grid;
  }
}
.gallery-uploader form {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.5fr) minmax(220px, 2fr)
    150px 150px auto;
  gap: 12px;
  align-items: end;
}
.gallery-uploader label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 750;
}
.gallery-drop {
  border: 2px dashed #9bc3df;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f1f8fd;
  cursor: pointer;
}
.gallery-drop input {
  padding: 4px;
  border: 0;
  background: transparent;
}
.gallery-drop span {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery-check {
  display: flex !important;
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  padding-bottom: 12px;
}
.gallery-check input {
  width: auto;
}
.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.gallery-admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery-admin-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}
.gallery-admin-card > div {
  padding: 13px;
}
.gallery-admin-card h3 {
  font-size: 15px;
  margin: 0 0 5px;
}
.gallery-admin-card p {
  color: var(--muted);
  font-size: 12px;
}
.gallery-admin-card button {
  width: 100%;
}
@media (max-width: 900px) {
  .gallery-uploader form {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-admin-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .gallery-uploader form,
  .gallery-admin-grid {
    grid-template-columns: 1fr;
  }
}
.whatsapp {
  background: #168b45 !important;
}
.whatsapp:hover {
  background: #107337 !important;
}
@media (max-width: 700px) {
  #orderDetail footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
  #orderDetail footer button {
    margin: 0;
    width: 100%;
  }
  .detail-shell {
    max-height: 96vh;
  }
  .item .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .item .actions button {
    min-height: 42px;
  }
}
.smart-search {
  position: relative;
}
.search-suggestions {
  position: absolute;
  z-index: 40;
  top: 58px;
  left: 0;
  right: 0;
  max-height: 290px;
  overflow: auto;
  background: #fff;
  border: 1px solid #a9bfd2;
  border-radius: 10px;
  box-shadow: 0 14px 35px #05223d40;
  padding: 5px;
}
.search-suggestions button {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  color: var(--text);
  border: 0;
  border-radius: 7px;
  padding: 10px;
}
.search-suggestions button + button {
  border-top: 1px solid var(--line);
}
.search-suggestions button:hover,
.search-suggestions button:focus {
  background: #eaf4fb;
  transform: none;
}
.search-suggestions strong,
.search-suggestions small {
  display: block;
}
.search-suggestions small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
}
.search-suggestions p {
  padding: 12px;
  margin: 0;
  color: var(--muted);
}
@media (max-width: 700px) {
  .smart-search input {
    font-size: 16px;
    min-height: 46px;
  }
  .search-suggestions {
    position: fixed;
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 78px;
    max-height: 48vh;
    border-radius: 15px;
    padding: 7px;
    box-shadow:
      0 0 0 100vh #061e365c,
      0 12px 35px #001a;
  }
  .search-suggestions button {
    min-height: 58px;
    padding: 11px 12px;
  }
  .catalog-add select {
    min-height: 46px;
  }
  .catalog-add > button {
    min-height: 46px;
  }
}
.document-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.archived-order {
  opacity: 0.78;
  border-left: 6px solid #718096;
}
.archive-badge {
  background: #e8edf2;
  color: #4a5968;
}
.share-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.site-editor {
  margin-bottom: 24px;
}
.site-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.site-settings-grid label,
.gallery-card-editor label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 750;
}
.site-settings-grid small {
  color: var(--muted);
  font-weight: 500;
}
.site-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.site-photo-title {
  margin-top: 28px;
}
.gallery-card-editor {
  display: grid;
  gap: 10px;
}
.gallery-card-line {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
  align-items: end;
}
.gallery-card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.gallery-card-actions button {
  width: auto;
}
.gallery-card-editor .gallery-check {
  padding: 0;
}
.gallery-card-editor input {
  padding: 9px;
}
.gallery-admin-card {
  position: relative;
}
.photo-placement-badge {
  position: absolute !important;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 6px 9px !important;
  border-radius: 20px;
  background: #073f70 !important;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 4px 14px #0018;
}
.gallery-card-editor select {
  width: 100%;
}
@media (max-width: 700px) {
  .document-actions {
    grid-template-columns: 1fr;
  }
  .document-actions button {
    min-height: 48px;
  }
}
@media (max-width: 700px) {
  .site-settings-grid {
    grid-template-columns: 1fr;
  }
  .site-editor-actions,
  .gallery-card-line,
  .gallery-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .site-editor-actions button,
  .gallery-card-actions button {
    width: 100%;
    min-height: 44px;
  }
}
.gallery-uploader form {
  grid-template-columns:
    minmax(190px, 1.3fr) minmax(190px, 1.5fr) minmax(170px, 1fr)
    115px 135px auto;
}
@media (max-width: 1100px) {
  .gallery-uploader form {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .gallery-uploader form {
    grid-template-columns: 1fr;
  }
}
.auto-archive {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #eef6fc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 750;
  color: var(--navy);
  white-space: nowrap;
}
.auto-archive input {
  width: 18px;
  height: 18px;
}
@media (max-width: 850px) {
  .order-tools {
    grid-template-columns: 1fr !important;
  }
  .auto-archive {
    white-space: normal;
    min-height: 44px;
  }
}
.order-party-filter {
  margin-bottom: 7px;
  background: #f4f9fd;
  border-color: #a9c9df !important;
}
.client-head .actions [data-new-order-client] {
  background: #157347;
}
.client-head .actions [data-new-order-client]:hover {
  background: #0f5d38;
}
@media (max-width: 700px) {
  .client-head .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .client-head .actions [data-new-order-client] {
    grid-column: 1/-1;
  }
}
.mp-rate-sync {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #bdd6e8;
  background: #f1f8fd;
  border-radius: 12px;
  padding: 13px;
}
.mp-rate-sync strong,
.mp-rate-sync small {
  display: block;
}
.mp-rate-sync small {
  color: var(--muted);
  margin-top: 3px;
}
.mp-rate-sync #mpRateEditor {
  grid-column: 1/-1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px;
}
.mp-rate-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}
.mp-rate-note a {
  white-space: nowrap;
  color: var(--blue);
  font-weight: 750;
}
.mp-credit-rates {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0;
}
.mp-rate-sync label {
  font-size: 12px;
}
.mp-rate-sync input {
  margin-top: 4px;
}
@media (max-width: 700px) {
  .mp-rate-sync {
    grid-template-columns: 1fr;
  }
  .mp-rate-sync #mpRateEditor {
    grid-column: auto;
  }
  .mp-rate-note {
    display: grid;
  }
  .mp-credit-rates {
    grid-template-columns: 1fr 1fr;
  }
  .mp-rate-sync > button {
    width: 100%;
  }
}
#batchStockModal {
  width: min(1180px, 96vw);
}
.batch-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}
.batch-toolbar .invoice-total {
  margin: 0;
  min-width: 260px;
}
.batch-row input {
  min-width: 0;
}
@media (max-width: 760px) {
  #batchStockModal {
    width: 98vw;
  }
  .batch-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .batch-toolbar .invoice-total {
    min-width: 0;
  }
  .invoice-row.batch-row {
    grid-template-columns: 1fr 1fr;
  }
  .invoice-row.batch-row > span,
  .invoice-row.batch-row > input:first-of-type {
    grid-column: 1/-1;
  }
}
/* DS.A V60 — visual unificado, leve e acessível */
.skip-link{position:fixed;left:12px;top:10px;z-index:1000;transform:translateY(-160%);background:#fff;color:#153a63;padding:10px 14px;border:2px solid #315fae;border-radius:8px;font-weight:800}.skip-link:focus{transform:none}
:root{--navy:#153a63;--navy2:#315f8f;--blue:#315fae;--sky:#eef3fa;--bg:#f6f7fa;--line:#dfe4eb;--text:#272d37;--muted:#687386;--red:#bd3030;--yellow:#a86500;--green:#368b43;--shadow:0 4px 16px rgba(24,45,72,.06)}
body{font-size:15px;line-height:1.45}header{height:70px;background:#173f6c;box-shadow:0 2px 10px #183a5f14}.brand-link img{border-radius:9px}.header-link{min-height:42px;display:flex;align-items:center}button{min-height:42px;border-radius:8px;transition:.12s}button:hover{transform:none}nav{height:58px;top:70px;padding:7px 2%;gap:4px}nav button{min-width:104px;border-radius:8px;color:#505c6d}nav button.active{background:#e9eef9;color:#293c91}main{max-width:1460px;padding-top:22px}.welcome{border-radius:10px;background:#173f6c;box-shadow:none}.cards{gap:11px}.card-link,.panel,.item{border-radius:9px;border-color:#e1e6ed;box-shadow:var(--shadow)}.card-link:hover{transform:none;border-color:#8aafd3;box-shadow:0 7px 20px #17365d18}.panel{padding:18px}.item{padding:15px}.title h1,.welcome h1{letter-spacing:-.015em}.title .sub,.welcome p,.item p{line-height:1.5}.search-box,input,select,textarea{border-radius:8px}.search-box:focus-within,input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible,a:focus-visible,[role="button"]:focus-visible{outline:3px solid #78aee6!important;outline-offset:2px}.color-help{border-radius:8px}.secondary{background:#fff}.modal-card,dialog{border-radius:11px}.modal::backdrop,dialog::backdrop{backdrop-filter:none}.actions button,.quick-actions button{min-height:42px}#toast{border-radius:8px;font-size:13px}
@media(max-width:700px){html{scroll-behavior:auto}body{padding-bottom:78px;font-size:14px}header{height:64px;background:#173f6c}.brand-link img{width:44px;height:44px}.header-actions #importBtn{min-height:40px}nav{height:76px;padding:5px 4px;gap:2px;scroll-snap-type:x proximity}nav button{min-width:72px;flex-basis:72px;min-height:64px;font-size:9px;scroll-snap-align:start}main{padding:13px 10px 28px}.welcome{padding:16px}.welcome h1{font-size:21px}.cards{gap:8px}.card-link,.panel,.item{border-radius:9px}.item{padding:13px}.item .actions button{min-height:44px}.title{align-items:flex-start}.title>button{min-height:44px}.search-box{min-height:44px}#toast{left:14px;right:14px;bottom:90px;max-width:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* DS.A V61 — Central de Serviços no novo padrão visual */
:root{--navy:#173b67;--navy2:#313b9d;--blue:#4a54c6;--sky:#eef0fc;--bg:#f5f6fa;--line:#e3e5ed;--text:#2d3442;--muted:#727b8c;--green:#58a85f;--shadow:0 2px 10px rgba(37,43,67,.055)}
body{background:linear-gradient(135deg,#f8f9fc,#f2f4f8)}header{background:#fff;color:#2d3442;border-bottom:1px solid #e4e6ed;box-shadow:none}.brand-link,.header-link{color:#173b67}.header-link:hover{background:#f0f1fb}nav{background:#fff;border-bottom:1px solid #e5e7ed;box-shadow:0 3px 10px #27314b0b}nav button{color:#626b7c}nav button.active{background:#eceefe;color:#343ea4;border-bottom:3px solid #4a54c6}.welcome{background:linear-gradient(135deg,#343f9f,#4d58bc);border-radius:14px}.card-link,.panel,.item{border-radius:14px;box-shadow:var(--shadow)}.card-link{border-top:4px solid #d8dbea}.card-link:hover{border-color:#aab0e3;box-shadow:0 7px 18px #424cba1b}.primary,button.primary{background:#353fa3;border-radius:10px}.secondary{border-radius:10px}.title h1{color:#2d3442}.search-box,input,select,textarea{border-radius:10px}.modal-card,dialog{border-radius:14px}
@media(max-width:700px){header{background:#fff}.brand-link span{color:#173b67}nav{background:#fff;border-top:1px solid #e5e7ed}.welcome,.card-link,.panel,.item{border-radius:13px}nav button.active{border-bottom:0;border-top:3px solid #4a54c6}}

/* DS.A V62 — azul institucional mais escuro */
:root{--navy:#102f55;--navy2:#0a2442;--blue:#244f85}.welcome{background:linear-gradient(135deg,#0b294b,#163f70)}.primary,button.primary{background:#102f55}nav button.active{background:#e8eef7;color:#102f55;border-color:#173f70}.card-link{border-top-color:#b9c9db}.card-link:hover{border-color:#718fac}

/* DS.A V63 — legibilidade e proporção */
body{font-size:16px}.brand-link img{width:74px;height:58px}header{height:82px}.header-link{font-size:14px}nav{top:82px;height:66px}nav button{font-size:14px;min-width:122px}main{max-width:1180px}.welcome h1{font-size:26px}.welcome p{font-size:14px}.title h1{font-size:24px}.title .sub,.item p{font-size:13px}.card-link,.item,.panel{font-size:14px}@media(max-width:700px){body{font-size:15px}header{height:68px}.brand-link img{width:58px;height:50px}nav{top:auto;height:76px}main{padding:13px 10px 28px}}

/* DS.A V64 — correções Android */
@media(max-width:700px){body{padding-bottom:144px}nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,62px);height:132px;overflow:visible;padding:4px 2px;align-content:center}nav button{min-width:0!important;width:auto!important;min-height:58px!important;padding:4px 1px!important;font-size:9px!important;white-space:normal}#toast{bottom:146px}.modal-card,dialog{width:calc(100% - 18px);max-width:none;margin:auto}.modal-card .actions{flex-wrap:wrap}}

/* DS.A V69 — contraste da visão geral */
.welcome{color:#fff}.welcome .eyebrow{color:#8fc4f3}.welcome h1{color:#fff!important}.welcome p{color:#dbe7f2!important}.welcome .quick-actions button{background:#fff;color:#102f55;border-color:#d7e4f0;font-weight:800}.welcome .quick-actions button:last-child{background:transparent;color:#fff;border:2px solid #c9dced}.welcome .quick-actions button:hover{background:#eef5fb}.welcome .quick-actions button:last-child:hover{background:#ffffff18}
@media(max-width:700px){.welcome .eyebrow{font-size:10px}.welcome h1{font-size:25px!important;line-height:1.2}.welcome p{font-size:15px!important;line-height:1.55}.welcome .quick-actions button{font-size:13px!important}}

/* V69.19 — DS.A Gestão: identidade e navegação responsiva */
:root{--brand-navy:#052b55;--brand-navy2:#073f78;--brand-blue:#0870c7;--brand-gold:#e2a929;--brand-gold2:#ffd46b;--brand-bg:#f4f7fb;--brand-line:#dae5ef}
body{background:var(--brand-bg)}
header{height:72px;background:linear-gradient(90deg,#06315d,#08477e)!important;box-shadow:0 4px 18px #0a2d5126!important}.brand-link img{width:62px;height:58px;background:transparent!important;border-radius:0!important;padding:0!important;filter:drop-shadow(0 5px 10px #00162e88)}.brand-link strong{font-size:18px}.brand-link small{color:#c9dbec;opacity:1}.header-link{color:#e2eef9}.header-link:hover{background:#ffffff12}.secondary{background:#ffffff13!important;color:#fff!important;border:1px solid #ffffff2a!important}
nav#tabs{position:fixed;left:0;top:72px;width:224px;height:calc(100vh - 72px);display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:4px;padding:16px 12px;background:linear-gradient(180deg,#06315f,#05294e 65%,#041d38);border:0;box-shadow:5px 0 24px #00172d28;overflow-y:auto;z-index:18}nav#tabs button{min-width:0;min-height:44px;justify-content:flex-start;color:#dce9f6;background:transparent;border-radius:10px;padding:10px 12px}nav#tabs button span{width:24px;color:#e7f0fa}nav#tabs button:hover{background:#ffffff10;color:#fff}nav#tabs button.active{background:linear-gradient(120deg,#b9780a,#e7aa27 55%,#ffd36a);color:#fff;box-shadow:0 5px 15px #00162e4d}nav#tabs button.active span{color:#fff}
main#serviceContent{max-width:none;margin-left:224px;padding:26px clamp(18px,3vw,42px) 90px}.welcome{background:linear-gradient(120deg,#fff,#f3f8fd);border-color:var(--brand-line);box-shadow:0 5px 18px #173b5d0b}.eyebrow{color:#ad7511}.quick-actions button{border-color:#d7e2ed}.quick-actions button:last-child,button{background:linear-gradient(135deg,#073d74,#075da7)}button:hover{background:linear-gradient(135deg,#063463,#07518f)}.card,.panel,.item,.client-card{border-color:var(--brand-line);box-shadow:0 4px 16px #173b5d09}.panel-icon{background:#fff0c8;color:#986600}.card-link strong{color:#0a315e}.search:focus,input:focus,select:focus,textarea:focus{border-color:#d5a235;box-shadow:0 0 0 3px #e2ad3330}
@media(max-width:900px){header{height:auto;min-height:72px;flex-wrap:wrap}.header-actions{overflow-x:auto;max-width:100%;padding-bottom:3px}nav#tabs{top:auto;bottom:0;left:0;right:0;width:100%;height:70px;display:flex;flex-direction:row;padding:5px;background:#052b55;box-shadow:0 -5px 18px #00172d22;overflow-x:auto}nav#tabs button{flex:0 0 82px;min-height:60px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;padding:4px 3px;font-size:9px;text-align:center}nav#tabs button span{width:auto;font-size:17px}nav#tabs button.active{background:#ffffff0d;color:#ffd36a;border-top:3px solid #f0bb46;box-shadow:none}main#serviceContent{margin-left:0;padding:18px 12px 88px}.welcome{align-items:flex-start;flex-direction:column}.quick-actions{justify-content:flex-start}.cards{grid-template-columns:1fr 1fr}.title{align-items:flex-start;flex-direction:column}.title>button,.title>.actions{width:100%}.title>.actions{display:grid}.title>.actions button{width:100%}}
@media(max-width:520px){.brand-link span{display:none}.header-actions .header-link:nth-of-type(2),.header-actions .header-link:nth-of-type(3){display:none}.cards{grid-template-columns:1fr}.welcome h1{font-size:24px}.order-tools{grid-template-columns:1fr}.color-help{flex-wrap:wrap}}
@media (max-width: 700px) {
  .appointment-tools,
  .service-alert-row {
    grid-template-columns: 1fr;
  }
  .service-alert-actions,
  .appointment-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }
  .service-alert-actions button,
  .appointment-actions > button,
  .appointment-actions > a,
  .appointment-actions > a button,
  .appointment-actions-menu,
  .appointment-actions-menu summary {
    width: 100%;
  }
  .appointment-actions-menu[open] > div {
    position: static;
    margin-top: 6px;
  }
}


/* ============================================================
   DS.A GESTÃO V69.20 — CENTRAL DE SERVIÇOS / REDESIGN COMPLETO
   ============================================================ */
:root{--v20-navy:#052b55;--v20-navy2:#073f78;--v20-blue:#0870c7;--v20-gold:#e5aa2b;--v20-gold2:#ffd36a;--v20-bg:#f3f7fb;--v20-card:#fff;--v20-text:#0b2b50;--v20-muted:#697d91;--v20-line:#dbe7f1;--v20-shadow:0 10px 28px rgba(8,43,78,.08)}
body{margin:0!important;background:var(--v20-bg)!important;color:var(--v20-text)!important;font-family:Inter,"Segoe UI",Arial,sans-serif!important;padding:0!important}
.service-sidebar{position:fixed;left:0;top:0;bottom:0;width:260px;z-index:40;background:linear-gradient(180deg,#052d58 0%,#05284e 62%,#031d39 100%);padding:16px 13px 18px;display:flex;flex-direction:column;box-shadow:8px 0 30px rgba(2,29,56,.12);border-right:1px solid rgba(255,255,255,.08)}
.service-brand{display:block!important;padding:1px 4px 14px!important;border-bottom:1px solid rgba(255,255,255,.12);margin-bottom:10px}.service-brand img{width:220px!important;height:100px!important;max-width:100%!important;object-fit:contain!important;background:transparent!important;border-radius:0!important;padding:0!important;filter:drop-shadow(0 8px 18px rgba(0,0,0,.26))!important}.service-brand span{display:none!important}
.service-module{padding:9px 11px;margin-bottom:9px;border-radius:12px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.08)}.service-module span{display:block;color:#f0b63d;font-size:9px;font-weight:900;letter-spacing:.15em;text-transform:uppercase}.service-module strong{display:block;color:#fff;font-size:14px;margin-top:3px}.service-module small{display:block;color:#c8d9e9;font-size:10px;margin-top:2px}
nav#tabs{position:static!important;inset:auto!important;width:auto!important;height:auto!important;flex:1!important;display:flex!important;flex-direction:column!important;gap:4px!important;padding:0!important;background:transparent!important;box-shadow:none!important;border:0!important;overflow-y:auto!important}nav#tabs button{width:100%!important;min-width:0!important;min-height:45px!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:9px!important;padding:10px 11px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:#d8e6f3!important;font-size:13px!important;font-weight:750!important;box-shadow:none!important;text-align:left!important}nav#tabs button span{width:22px!important;font-size:16px!important;color:#d8e6f3!important}nav#tabs button:hover{background:rgba(255,255,255,.08)!important;color:#fff!important}nav#tabs button.active{background:linear-gradient(110deg,#c88411,#edb12d 58%,#ffd36a)!important;color:#fff!important;box-shadow:0 8px 18px rgba(0,0,0,.20)!important}nav#tabs button.active span{color:#fff!important}.service-side-footer{border-top:1px solid rgba(255,255,255,.13);padding:13px 10px 2px;color:#bcd0e2}.service-side-footer>span{display:block;width:34px;height:3px;border-radius:2px;background:#e9b13a;margin-bottom:10px}.service-side-footer p{font-size:9px;line-height:1.6;letter-spacing:.2em;margin:0 0 8px}.service-side-footer small{font-size:9px;color:#829fb9}
.service-topbar{position:sticky!important;top:0!important;z-index:30!important;margin-left:260px!important;width:calc(100% - 260px)!important;height:72px!important;min-height:72px!important;padding:10px 24px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;background:linear-gradient(90deg,#06315d,#08477e)!important;color:#fff!important;border:0!important;box-shadow:0 5px 18px rgba(4,41,77,.14)!important}.service-global-search{display:flex;align-items:center;gap:8px;width:min(510px,42vw);height:44px;padding:0 13px;border-radius:11px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.16)}.service-global-search>span{font-size:20px;color:#d9e9f7}.service-global-search input{width:100%;background:transparent!important;border:0!important;color:#fff!important;outline:0!important;box-shadow:none!important;padding:0!important}.service-global-search input::placeholder{color:#bcd0e2}.service-header-actions{gap:7px!important;flex-wrap:nowrap!important}.service-topbar .header-link{min-height:40px!important;display:flex!important;align-items:center!important;padding:0 10px!important;border-radius:9px!important;color:#e2edf7!important;font-size:11px!important;font-weight:750!important}.service-topbar .header-link:hover{background:rgba(255,255,255,.09)!important}.service-topbar .secondary{min-height:40px!important;background:rgba(255,255,255,.10)!important;border:1px solid rgba(255,255,255,.16)!important;color:#fff!important;border-radius:9px!important;font-size:11px!important}.service-company{display:flex;align-items:center;gap:8px;height:42px;padding:0 10px;border-radius:10px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.07)}.service-company>span{color:#ffd36a}.service-company small{display:block;color:#bcd0e2;font-size:8px}.service-company strong{display:block;font-size:10px}.service-bell{position:relative;width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);color:#ffd36a}.service-bell>span{font-size:10px}.service-bell b{position:absolute;right:-4px;top:-5px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;display:grid;place-items:center;background:#ef4444;color:#fff;font-size:8px}
main#serviceContent{max-width:none!important;margin-left:260px!important;padding:24px clamp(20px,2.8vw,38px) 80px!important}.welcome{position:relative!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:20px!important;padding:21px 22px!important;border-radius:16px!important;background:linear-gradient(135deg,#fff,#f7fbff)!important;border:1px solid var(--v20-line)!important;box-shadow:var(--v20-shadow)!important;color:var(--v20-text)!important}.welcome:before{content:"";position:absolute;left:0;top:22px;bottom:22px;width:4px;border-radius:5px;background:linear-gradient(#e6a923,#ffd36a)}.welcome .eyebrow{color:#b67c0e!important;font-size:9px!important;letter-spacing:.14em!important;font-weight:900!important}.welcome h1{color:#082f5b!important;font-size:27px!important;letter-spacing:-.025em!important;margin:5px 0 4px!important}.welcome p{color:#6c8094!important;font-size:13px!important;margin:0!important}.quick-actions{display:flex!important;gap:8px!important;flex-wrap:wrap!important}.welcome .quick-actions button{min-height:42px!important;border-radius:10px!important;padding:0 14px!important;border:1px solid #d3e0eb!important;background:#fff!important;color:#0b477f!important;font-weight:800!important;box-shadow:none!important}.welcome .quick-actions button:last-child{background:linear-gradient(120deg,#cc8811,#eab02b)!important;color:#fff!important;border:0!important}.welcome .quick-actions button:hover{transform:translateY(-1px)!important;box-shadow:0 7px 15px rgba(8,43,78,.08)!important}
.cards{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:12px!important;margin:14px 0!important}.card.card-link{position:relative!important;min-height:132px!important;padding:17px 17px 14px 54px!important;border-radius:15px!important;border:1px solid var(--v20-line)!important;border-top:1px solid var(--v20-line)!important;background:#fff!important;box-shadow:var(--v20-shadow)!important;text-align:left!important;overflow:hidden!important;color:#5e7389!important}.card.card-link:before{content:attr(data-icon)!important;position:absolute;left:14px;top:16px;width:31px;height:31px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#ffe39b,#e9ab27);color:#0a3d70;font-size:16px;font-weight:900}.card.card-link:nth-child(1){background:linear-gradient(145deg,#075da8,#07386c)!important;border:0!important;color:#fff!important}.card.card-link:nth-child(1):before{background:rgba(255,255,255,.14);color:#ffd36a}.card.card-link:nth-child(1) strong,.card.card-link:nth-child(1) small{color:#fff!important}.card.card-link strong{display:block!important;margin:13px 0 8px!important;color:#082f5b!important;font-size:28px!important;letter-spacing:-.025em!important}.card.card-link small{color:#0a6ab2!important;font-size:10px!important;font-weight:800!important}.card.card-link:hover{transform:translateY(-2px)!important;box-shadow:0 14px 30px rgba(8,43,78,.13)!important;border-color:#c2d5e5!important}
.panel,.item,.client-card{border:1px solid var(--v20-line)!important;border-radius:15px!important;background:#fff!important;box-shadow:var(--v20-shadow)!important}.alerts-panel{padding:19px!important;margin-top:15px!important}.panel-heading{margin-bottom:8px!important}.panel-heading h2{color:#082f5b!important}.panel-icon{background:#fff0c8!important;color:#9c6900!important}.badge{border-radius:999px!important;background:#eaf3fb!important;color:#0b568f!important}.title{margin-bottom:13px!important}.title h1{color:#082f5b!important;font-size:27px!important;letter-spacing:-.02em!important}.title .sub{color:#72869a!important}.title>button,.title .actions button,button:not(.secondary):not([data-view]){border-radius:10px!important;background:linear-gradient(125deg,#0a5b9f,#0877c7)!important}.search-box{border:1px solid var(--v20-line)!important;border-radius:12px!important;background:#fff!important;box-shadow:0 5px 16px rgba(8,43,78,.035)!important}.search-box input{background:transparent!important}.item{padding:16px!important}.item h3,.client-card h3{color:#0a315e!important}.item:hover,.client-card:hover{border-color:#c4d7e7!important;box-shadow:0 12px 26px rgba(8,43,78,.09)!important}.payable-summary article{border-radius:14px!important}.gallery-admin-card{border-radius:14px!important}.modal-card,dialog{border-radius:18px!important}.color-help{border-radius:12px!important}
@media(max-width:1240px){.service-sidebar{width:224px}.service-topbar{margin-left:224px!important;width:calc(100% - 224px)!important}.service-brand img{width:190px!important;height:88px!important}main#serviceContent{margin-left:224px!important}.cards{grid-template-columns:repeat(4,minmax(0,1fr))!important}.compact-link{display:none!important}.service-company{display:none!important}}
@media(max-width:900px){body{padding-bottom:74px!important}.service-sidebar{position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;width:100%!important;height:72px!important;padding:4px 5px!important;display:block!important;z-index:60!important;background:#052b55!important}.service-brand,.service-module,.service-side-footer{display:none!important}nav#tabs{display:flex!important;flex-direction:row!important;gap:2px!important;overflow-x:auto!important;height:64px!important}nav#tabs button{flex:0 0 76px!important;width:auto!important;min-height:62px!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:2px!important;padding:4px 2px!important;font-size:8px!important;text-align:center!important}nav#tabs button span{width:auto!important;font-size:16px!important}nav#tabs button.active{background:rgba(255,255,255,.06)!important;color:#ffd36a!important;border-top:3px solid #eab137!important;box-shadow:none!important}.service-topbar{margin-left:0!important;width:100%!important;height:64px!important;min-height:64px!important;padding:8px 10px!important}.service-global-search{width:calc(100% - 195px)!important;height:40px!important}.service-header-actions .header-link,.service-header-actions #importBtn{display:none!important}.service-company{display:flex!important;height:40px!important}.service-bell{height:40px!important}main#serviceContent{margin-left:0!important;padding:16px 12px 90px!important}.cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}.welcome{align-items:flex-start!important;flex-direction:column!important}.quick-actions{width:100%!important}.quick-actions button{flex:1!important}}
@media(max-width:520px){.service-global-search{width:calc(100% - 50px)!important}.service-company{display:none!important}.cards{grid-template-columns:1fr 1fr!important;gap:8px!important}.card.card-link{min-height:112px!important;padding:14px 10px 12px 45px!important}.card.card-link:before{left:10px;top:13px;width:27px;height:27px;font-size:13px}.card.card-link strong{font-size:22px!important;margin:9px 0 6px!important}.welcome{padding:17px!important}.welcome h1{font-size:23px!important}.quick-actions{display:grid!important;grid-template-columns:1fr 1fr!important}.quick-actions button:last-child{grid-column:1/-1!important}.title h1{font-size:23px!important}.modal-card,dialog{width:calc(100% - 16px)!important}.item .actions{display:grid!important}.item .actions button,.item .actions a{width:100%!important}}

/* V69.20 — painéis operacionais do dashboard, aproximando o layout do mockup aprovado */
.dashboard-preview-grid{display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:12px;margin:14px 0}.dashboard-preview-panel{min-width:0;background:#fff;border:1px solid var(--v20-line);border-radius:15px;box-shadow:var(--v20-shadow);padding:16px;overflow:hidden}.dashboard-preview-orders{grid-column:span 2}.dashboard-preview-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:10px}.dashboard-preview-head span{display:block;font-size:8px;font-weight:900;letter-spacing:.13em;color:#b47a0c;margin-bottom:3px}.dashboard-preview-head h2{margin:0;color:#082f5b;font-size:15px}.dashboard-preview-head button{min-height:auto!important;padding:4px 0!important;background:transparent!important;color:#0b6ab2!important;box-shadow:none!important;border:0!important;font-size:10px!important;font-weight:800!important}.dashboard-mini-table{display:grid;gap:0}.dashboard-mini-row{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.9fr) auto;gap:10px;align-items:center;padding:9px 0;border-top:1px solid #edf2f6;font-size:11px;color:#4e667c}.dashboard-mini-row:first-child{border-top:0}.dashboard-mini-row strong{color:#103b65;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-mini-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-mini-row em{font-style:normal;font-size:9px;font-weight:800;padding:4px 7px;border-radius:999px;background:#e7f2fb;color:#0a5f9f;white-space:nowrap}.dashboard-mini-row em.good{background:#e2f5e9;color:#1d7444}.dashboard-mini-row em.warn{background:#fff0c8;color:#9a6800}.dashboard-mini-row em.bad{background:#ffe5e5;color:#aa2d2d}.dashboard-empty{padding:14px 0;color:#7d8fa1;font-size:11px}.alerts-panel{margin-top:12px!important}
@media(max-width:1240px){.dashboard-preview-grid{grid-template-columns:1fr 1fr}.dashboard-preview-orders{grid-column:span 2}}
@media(max-width:700px){.dashboard-preview-grid{grid-template-columns:1fr;gap:8px}.dashboard-preview-orders{grid-column:auto}.dashboard-preview-panel{padding:13px}.dashboard-mini-row{grid-template-columns:minmax(0,1fr) auto}.dashboard-mini-row small{display:none}}

/* V69.20-B — logomarca 3D oficial e refinamento de fidelidade */
.service-brand{padding:3px 7px 15px!important;border-bottom:1px solid rgba(255,255,255,.12)!important}.service-brand img{width:226px!important;height:94px!important;object-fit:contain!important;filter:drop-shadow(0 10px 15px rgba(0,13,29,.38))!important}.service-module>span{color:#efc45b!important}.service-module strong{color:#fff!important}.service-module small{color:#abc5dc!important}.service-sidebar nav button.active{background:linear-gradient(105deg,#c98a12,#f1b637 72%,#f7c655)!important;color:#fff!important}.service-topbar{background:linear-gradient(90deg,#073461,#06396c 55%,#06437c)!important}.welcome .quick-actions button:last-child{background:linear-gradient(135deg,#0a66b4,#0d7dcc)!important;color:#fff!important}.card.card-link:before{background:linear-gradient(145deg,#ffdf8b,#e7a624)!important}.card.card-link:nth-child(1):before{background:rgba(255,255,255,.12)!important;color:#ffd15d!important}.dashboard-preview-head span{color:#a97513!important}.eyebrow{color:#a97513!important}
@media(max-width:1240px){.service-brand img{width:190px!important;height:82px!important}}

/* ============================================================
   DS.A GESTÃO V69.20-C — CORREÇÕES DE INTERFACE E RESPONSIVIDADE
   ============================================================ */
.service-sidebar{
  padding:11px 12px 12px!important;
  overflow:hidden!important;
}
.service-brand{
  padding:0 6px 8px!important;
  margin-bottom:7px!important;
}
.service-brand img{
  height:76px!important;
}
.service-module{
  padding:7px 10px!important;
  margin-bottom:6px!important;
}
.service-sidebar nav#tabs{
  min-height:0!important;
  gap:2px!important;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.28) transparent;
}
.service-sidebar nav#tabs::-webkit-scrollbar{width:5px}
.service-sidebar nav#tabs::-webkit-scrollbar-track{background:transparent}
.service-sidebar nav#tabs::-webkit-scrollbar-thumb{
  border-radius:6px;
  background:rgba(255,255,255,.28);
}
.service-sidebar nav#tabs button{
  min-height:38px!important;
  padding:7px 10px!important;
}
.service-side-footer{
  padding:8px 8px 0!important;
}
.service-side-footer>span{
  margin-bottom:6px!important;
}
.service-side-footer p{
  margin:0 0 4px!important;
  line-height:1.35!important;
}
.service-topbar{
  gap:12px!important;
}
.service-global-search{
  flex:1 1 360px!important;
  width:auto!important;
  max-width:590px!important;
}
.service-header-actions{
  flex:0 0 auto!important;
}

/* Ações rápidas e cartões não podem herdar o azul global dos botões. */
.welcome .quick-actions button{
  background:#fff!important;
  color:#0b477f!important;
  border:1px solid #d3e0eb!important;
}
.welcome .quick-actions button:last-child{
  background:linear-gradient(135deg,#0a66b4,#0d7dcc)!important;
  color:#fff!important;
  border-color:transparent!important;
}
.cards .card.card-link{
  background:#fff!important;
  color:#526b81!important;
  border:1px solid var(--v20-line)!important;
}
.cards .card.card-link strong{
  color:#082f5b!important;
}
.cards .card.card-link small{
  color:#0a6ab2!important;
}
.cards .card.card-link:first-child{
  background:linear-gradient(145deg,#075da8,#07386c)!important;
  color:#fff!important;
  border-color:transparent!important;
}
.cards .card.card-link:first-child strong,
.cards .card.card-link:first-child small{
  color:#fff!important;
}

.client-card{
  padding:18px!important;
  overflow:hidden;
}
.client-head{
  align-items:flex-start;
}
.client-head>div:first-child{
  min-width:0;
  overflow-wrap:anywhere;
}
.client-head .actions{
  justify-content:flex-end;
}
.equipment-list .equipment-row{
  background:#f6f9fc!important;
  color:#17324d!important;
  border:1px solid #dce6ef!important;
  box-shadow:none!important;
}
.equipment-list .equipment-row:hover{
  background:#eef6fc!important;
  color:#17324d!important;
  border-color:#b8cfe2!important;
}
.equipment-list .equipment-row b{color:#0a315e!important}
.equipment-list .equipment-row small{color:#6a7f93!important}
.equipment-list .equipment-row .defect{color:#b42318!important}
.equipment-list .equipment-row em{
  flex:0 0 auto;
  padding-left:14px;
  color:#0a6ab2!important;
}

.dashboard-preview-head{
  min-width:0;
}
.dashboard-preview-head>div{
  min-width:0;
}
.dashboard-preview-head h2{
  overflow-wrap:anywhere;
}
.dashboard-preview-head button{
  flex:0 0 auto;
  white-space:nowrap;
  position:relative;
  z-index:1;
}

.payable-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:14px 0;
}
.payable-summary article{
  min-width:0;
  min-height:112px;
  padding:16px 18px;
  display:grid;
  grid-template-columns:1fr auto;
  align-content:center;
  column-gap:12px;
  border:1px solid var(--v20-line);
  border-left:5px solid #0a6ab2;
  border-radius:14px;
  background:#fff;
  box-shadow:var(--v20-shadow);
}
.payable-summary article>span{
  color:#597086;
  font-size:12px;
  font-weight:800;
}
.payable-summary article>strong{
  grid-row:1/3;
  grid-column:2;
  align-self:center;
  color:#082f5b;
  font-size:31px;
  line-height:1;
}
.payable-summary article>small{
  margin-top:5px;
  color:#72869a;
  font-size:11px;
  font-weight:700;
}
.payable-summary article.warning.has-alert{
  border-left-color:#e0a11b;
  background:#fffbef;
}
.payable-summary article.danger.has-alert{
  border-left-color:#cf332d;
  background:#fff7f6;
}
.payable-summary article.is-clear{
  border-left-color:#2d8a54;
  background:#f6fcf8;
}
.payable-summary article.is-clear>strong{color:#247547}
.payable-row .actions{
  justify-content:flex-end;
  max-width:360px;
}
.payable-row .actions a.secondary{
  display:inline-flex;
  align-items:center;
  padding:8px 11px;
  border:1px solid var(--v20-line);
  border-radius:10px;
  text-decoration:none;
}

.stock-low-filter input{
  flex:0 0 18px;
  min-height:18px;
  padding:0;
  accent-color:#0870c7;
}
.document-panel{
  overflow:hidden;
}
.document-actions button{
  min-width:0;
  white-space:normal;
}

@media(max-width:1240px){
  .service-brand img{height:70px!important}
  .service-sidebar nav#tabs button{min-height:36px!important}
  .service-side-footer p{display:none}
}
@media(max-width:900px){
  .service-sidebar{overflow:visible!important}
  .service-sidebar nav#tabs{scrollbar-width:none}
  .service-sidebar nav#tabs::-webkit-scrollbar{display:none}
  .service-topbar{gap:8px!important}
  .service-global-search{
    flex:1 1 auto!important;
    width:auto!important;
    max-width:none!important;
  }
  .client-head{
    flex-direction:column;
  }
  .client-head .actions{
    width:100%;
    justify-content:flex-start;
  }
  .payable-summary{
    grid-template-columns:1fr 1fr;
  }
  .payable-summary article:first-child{
    grid-column:1/-1;
  }
}
@media(max-width:700px){
  .dashboard-preview-head{
    align-items:center;
  }
  .payable-summary{
    grid-template-columns:1fr;
    gap:8px;
  }
  .payable-summary article:first-child{
    grid-column:auto;
  }
  .payable-summary article{
    min-height:92px;
  }
  .payable-row{
    grid-template-columns:1fr!important;
  }
  .payable-row .actions{
    max-width:none;
    display:grid!important;
    grid-template-columns:1fr 1fr;
  }
  .payable-row .actions>*{
    width:100%;
    justify-content:center;
  }
  .equipment-list .equipment-row{
    align-items:flex-start;
  }
}
@media(max-width:520px){
  .service-bell{display:none!important}
  .service-global-search{width:100%!important}
  .cards{
    grid-template-columns:1fr!important;
  }
  .cards .card.card-link{
    min-height:96px!important;
  }
  .quick-actions{
    grid-template-columns:1fr!important;
  }
  .quick-actions button:last-child{
    grid-column:auto!important;
  }
  .client-head .actions,
  .payable-row .actions{
    grid-template-columns:1fr!important;
  }
  .equipment-list .equipment-row{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto;
  }
  .document-panel{
    grid-template-columns:1fr;
    padding:18px;
  }
  .document-icon{
    width:64px;
    height:76px;
    font-size:17px;
  }
}

/* V69.20-M — apresentação comercial do orçamento. */
.quote-visibility{
  border:1px solid #bfd8e9!important;
  border-radius:12px!important;
  background:#f4f9fd!important;
  padding:0!important;
}
.quote-visibility>label{
  display:flex!important;
  align-items:flex-start!important;
  gap:12px!important;
  margin:0!important;
  padding:13px 14px!important;
  color:#17324d!important;
  cursor:pointer!important;
}
.quote-visibility>label:hover{
  background:#edf6fc!important;
  border-radius:11px!important;
}
.quote-visibility input{
  margin-top:2px!important;
}
.quote-visibility span,
.quote-visibility strong,
.quote-visibility small{
  display:block!important;
}
.quote-visibility strong{
  font-size:13px!important;
  line-height:1.35!important;
}
.quote-visibility small{
  margin-top:4px!important;
  color:#587087!important;
  font-size:12px!important;
  font-weight:500!important;
  line-height:1.45!important;
}

/* V69.20-L — dados do cliente clicáveis, sem botão textual adicional. */
.client-card .client-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:16px!important;
  align-items:start!important;
}
.client-card .client-summary{
  width:100%!important;
  min-width:0!important;
  min-height:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:12px!important;
  margin:-7px 0 -7px -8px!important;
  padding:8px!important;
  text-align:left!important;
  color:#17324d!important;
  background:transparent!important;
  border:1px solid transparent!important;
  border-radius:11px!important;
  box-shadow:none!important;
  transform:none!important;
  cursor:pointer!important;
}
.client-card .client-summary:hover,
.client-card .client-summary:focus-visible{
  color:#17324d!important;
  background:#f3f8fc!important;
  border-color:#d5e4ef!important;
  box-shadow:none!important;
  transform:none!important;
}
.client-card .client-summary span{
  display:block!important;
  min-width:0!important;
}
.client-card .client-summary h3,
.client-card .client-summary p{
  margin-left:0!important;
  margin-right:0!important;
}
.client-card .client-summary i{
  width:30px!important;
  height:30px!important;
  display:grid!important;
  place-items:center!important;
  color:#0a6ab2!important;
  background:#eaf3fb!important;
  border-radius:9px!important;
  font-size:15px!important;
  font-style:normal!important;
  opacity:.55!important;
  transition:opacity .15s ease,background .15s ease!important;
}
.client-card .client-summary:hover i,
.client-card .client-summary:focus-visible i{
  opacity:1!important;
  background:#dceefa!important;
}
.client-card .equipment-list button[type="button"].equipment-row[data-edit] em{
  width:28px!important;
  height:28px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border-radius:8px!important;
  background:#eaf3fb!important;
  font-size:22px!important;
  line-height:1!important;
}
@media(max-width:700px){
  .client-card .client-head{
    grid-template-columns:1fr!important;
  }
  .client-card .client-head .actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
  }
}
@media(max-width:420px){
  .client-card .client-head .actions{
    grid-template-columns:1fr!important;
  }
}

/* V69.20-D — botões dos painéis sempre legíveis sobre cartões claros. */
.dashboard-preview-panel .dashboard-preview-head button[type="button"][data-open-view]{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:0!important;
  min-height:30px!important;
  padding:6px 10px!important;
  border:1px solid #c9dfef!important;
  border-radius:999px!important;
  background:#edf6fc!important;
  color:#075b9c!important;
  box-shadow:none!important;
  font-size:10px!important;
  font-weight:850!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}
.dashboard-preview-panel .dashboard-preview-head button[type="button"][data-open-view]:hover,
.dashboard-preview-panel .dashboard-preview-head button[type="button"][data-open-view]:focus-visible{
  background:#dceefb!important;
  color:#043b68!important;
  border-color:#9fc7e3!important;
}

/* V69.20-E — cartões de equipamentos sempre claros e legíveis. */
.client-card .equipment-list button[type="button"].equipment-row[data-edit]{
  width:100%!important;
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:14px!important;
  padding:12px 14px!important;
  text-align:left!important;
  background:#f6f9fc!important;
  color:#17324d!important;
  border:1px solid #dce6ef!important;
  border-left:4px solid #1b78b8!important;
  border-radius:10px!important;
  box-shadow:none!important;
  transform:none!important;
}
.client-card .equipment-list button[type="button"].equipment-row[data-edit]:hover,
.client-card .equipment-list button[type="button"].equipment-row[data-edit]:focus-visible{
  background:#eaf3fb!important;
  color:#17324d!important;
  border-color:#9fc7e3!important;
  border-left-color:#075b9c!important;
  box-shadow:0 6px 16px rgba(8,43,78,.08)!important;
  transform:none!important;
}
.client-card .equipment-list button[type="button"].equipment-row[data-edit] span,
.client-card .equipment-list button[type="button"].equipment-row[data-edit] small{
  display:block!important;
  min-width:0!important;
}
.client-card .equipment-list button[type="button"].equipment-row[data-edit] b{
  color:#0a315e!important;
}
.client-card .equipment-list button[type="button"].equipment-row[data-edit] small{
  color:#61788e!important;
}
.client-card .equipment-list button[type="button"].equipment-row[data-edit] .defect{
  color:#b42318!important;
}
.client-card .equipment-list button[type="button"].equipment-row[data-edit] em{
  flex:0 0 auto!important;
  padding-left:0!important;
  color:#075b9c!important;
  font-style:normal!important;
  font-weight:850!important;
  opacity:1!important;
  white-space:nowrap!important;
}
@media(max-width:520px){
  .client-card .equipment-list button[type="button"].equipment-row[data-edit]{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:start!important;
  }
}

/* V69.20-F — atalhos funcionais do cabeçalho. */
.service-topbar button.service-company[data-company-settings],
.service-topbar button.service-bell[data-open-alerts]{
  flex:0 0 auto!important;
  margin:0!important;
  padding:0 10px!important;
  background:rgba(255,255,255,.07)!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.16)!important;
  box-shadow:none!important;
  transform:none!important;
  cursor:pointer!important;
}
.service-topbar button.service-bell[data-open-alerts]{
  width:38px!important;
  min-width:38px!important;
  padding:0!important;
}
.service-topbar button.service-company[data-company-settings]:hover,
.service-topbar button.service-company[data-company-settings]:focus-visible,
.service-topbar button.service-bell[data-open-alerts]:hover,
.service-topbar button.service-bell[data-open-alerts]:focus-visible{
  background:rgba(255,255,255,.16)!important;
  border-color:rgba(255,211,106,.72)!important;
  outline:2px solid rgba(255,211,106,.42)!important;
  outline-offset:2px!important;
}
.service-topbar #serviceNfseLink{
  position:relative!important;
  z-index:1!important;
  cursor:pointer!important;
  pointer-events:auto!important;
}
.shortcut-highlight{
  animation:shortcutHighlight 1.6s ease!important;
}
@keyframes shortcutHighlight{
  0%,100%{box-shadow:var(--v20-shadow)!important}
  35%{box-shadow:0 0 0 4px rgba(234,177,55,.34),0 14px 32px rgba(8,43,78,.15)!important}
}
@media(max-width:520px){
  .service-topbar button.service-bell[data-open-alerts]{
    display:grid!important;
    height:40px!important;
  }
}

/* V69.20-G — edição direta dos registros exibidos no painel inicial. */
.dashboard-preview-panel button.dashboard-mini-row.dashboard-edit-row{
  width:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:9px 4px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1.15fr) minmax(0,.9fr) auto!important;
  gap:10px!important;
  align-items:center!important;
  text-align:left!important;
  background:transparent!important;
  color:#4e667c!important;
  border:0!important;
  border-top:1px solid #edf2f6!important;
  border-radius:8px!important;
  box-shadow:none!important;
  transform:none!important;
  cursor:pointer!important;
}
.dashboard-preview-panel button.dashboard-mini-row.dashboard-edit-row:first-child{
  border-top-color:transparent!important;
}
.dashboard-preview-panel button.dashboard-mini-row.dashboard-edit-row:hover,
.dashboard-preview-panel button.dashboard-mini-row.dashboard-edit-row:focus-visible{
  background:#edf6fc!important;
  color:#17324d!important;
  border-top-color:#d4e6f3!important;
  outline:2px solid #9fc7e3!important;
  outline-offset:-2px!important;
}
.dashboard-preview-panel .dashboard-edit-row strong{
  color:#103b65!important;
}
.dashboard-row-meta{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  white-space:nowrap!important;
}
@media(max-width:700px){
  .dashboard-preview-panel button.dashboard-mini-row.dashboard-edit-row{
    grid-template-columns:minmax(0,1fr) auto!important;
  }
  .dashboard-preview-panel button.dashboard-mini-row.dashboard-edit-row>small{
    display:none!important;
  }
}

/* V69.20-I — painel clicável sem rótulos visuais extras. */
.dashboard-preview-panel button.dashboard-edit-row:hover strong,
.dashboard-preview-panel button.dashboard-edit-row:focus-visible strong{
  color:#075b9c!important;
}

/* V69.20-H — quadro da logomarca com contraste e delimitação claros. */
.service-sidebar .service-brand.brand-link{
  position:relative!important;
  isolation:isolate!important;
  min-height:90px!important;
  margin:0 0 8px!important;
  padding:6px 8px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  border:1px solid rgba(134,190,234,.42)!important;
  border-left:3px solid #eab137!important;
  border-radius:14px!important;
  background:linear-gradient(135deg,rgba(16,88,151,.9),rgba(5,46,87,.96))!important;
  box-shadow:0 10px 24px rgba(0,18,39,.3),inset 0 1px 0 rgba(255,255,255,.12)!important;
}
.service-sidebar .service-brand.brand-link::after{
  content:""!important;
  position:absolute!important;
  z-index:-1!important;
  right:-30px!important;
  top:-52px!important;
  width:130px!important;
  height:130px!important;
  border-radius:50%!important;
  background:radial-gradient(circle,rgba(255,211,106,.2),rgba(255,211,106,0) 68%)!important;
  pointer-events:none!important;
}
.service-sidebar .service-brand.brand-link img{
  position:relative!important;
  z-index:1!important;
  max-width:100%!important;
  filter:drop-shadow(0 8px 12px rgba(0,12,28,.55))!important;
}
.service-sidebar .service-brand.brand-link:hover,
.service-sidebar .service-brand.brand-link:focus-visible{
  border-color:rgba(255,211,106,.72)!important;
  border-left-color:#ffd36a!important;
  background:linear-gradient(135deg,rgba(18,99,169,.96),rgba(6,53,99,.98))!important;
}
@media(max-width:1240px){
  .service-sidebar .service-brand.brand-link{
    min-height:84px!important;
    padding:5px 7px!important;
  }
}

/* ============================================================
   V69.20-J — PADRÃO PROFISSIONAL PARA TODAS AS JANELAS
   ============================================================ */
dialog{
  width:min(760px,calc(100vw - 32px))!important;
  max-width:none!important;
  max-height:calc(100dvh - 32px)!important;
  margin:auto!important;
  padding:0!important;
  overflow:hidden!important;
  color:#17324d!important;
  background:#f8fafc!important;
  border:1px solid #c7d8e6!important;
  border-radius:20px!important;
  box-shadow:0 28px 90px rgba(0,24,48,.36),0 2px 8px rgba(0,24,48,.18)!important;
}
dialog::backdrop{
  background:rgba(3,29,54,.68)!important;
  backdrop-filter:blur(4px)!important;
}
#modal{width:min(1040px,calc(100vw - 32px))!important}
#stockModal{width:min(720px,calc(100vw - 32px))!important}
#batchStockModal{width:min(1060px,calc(100vw - 32px))!important}
#invoiceModal{width:min(1180px,calc(100vw - 32px))!important}
#payableModal{width:min(760px,calc(100vw - 32px))!important}
#creditMoveModal{width:min(720px,calc(100vw - 32px))!important}
#orderDetail{width:min(1040px,calc(100vw - 32px))!important}

dialog>form,
dialog>.detail-shell{
  width:100%!important;
  max-height:calc(100dvh - 34px)!important;
  margin:0!important;
  padding:0 24px!important;
  display:flex!important;
  flex-direction:column!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  background:linear-gradient(180deg,#fff 0,#fff 74%,#f8fafc 100%)!important;
  scrollbar-width:thin;
  scrollbar-color:#abc2d5 transparent;
}
dialog>form::-webkit-scrollbar,
dialog>.detail-shell::-webkit-scrollbar{width:8px}
dialog>form::-webkit-scrollbar-track,
dialog>.detail-shell::-webkit-scrollbar-track{background:transparent}
dialog>form::-webkit-scrollbar-thumb,
dialog>.detail-shell::-webkit-scrollbar-thumb{
  border:2px solid transparent;
  border-radius:999px;
  background:#abc2d5;
  background-clip:padding-box;
}

dialog .modal-head{
  position:sticky!important;
  top:0!important;
  z-index:12!important;
  flex:0 0 auto!important;
  min-height:78px!important;
  margin:0 -24px 20px!important;
  padding:17px 24px 15px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  background:rgba(255,255,255,.98)!important;
  border-bottom:1px solid #dbe5ed!important;
  box-shadow:0 7px 18px rgba(8,43,78,.05)!important;
  backdrop-filter:blur(8px)!important;
}
dialog .modal-head>div{min-width:0!important}
dialog .modal-head .eyebrow{
  display:block!important;
  margin:0 0 3px!important;
  color:#a97513!important;
  font-size:9px!important;
  font-weight:900!important;
  letter-spacing:.14em!important;
}
dialog .modal-head h2{
  margin:0!important;
  color:#082f5b!important;
  font-size:21px!important;
  line-height:1.2!important;
  letter-spacing:-.02em!important;
}
dialog .modal-head>button[type="button"]{
  flex:0 0 38px!important;
  width:38px!important;
  min-width:38px!important;
  height:38px!important;
  min-height:38px!important;
  margin:0!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid #cfdae4!important;
  border-radius:11px!important;
  background:#f2f6f9!important;
  color:#49647a!important;
  box-shadow:none!important;
  font-size:23px!important;
  font-weight:500!important;
  line-height:1!important;
  transform:none!important;
}
dialog .modal-head>button[type="button"]:hover,
dialog .modal-head>button[type="button"]:focus-visible{
  background:#e4eef6!important;
  color:#0b568f!important;
  border-color:#9dbbd1!important;
  transform:none!important;
}

dialog .form-grid{
  gap:15px 16px!important;
  align-items:start!important;
}
dialog label,
dialog .form-grid label,
dialog .invoice-start label,
dialog .invoice-meta label{
  gap:6px!important;
  color:#24445f!important;
  font-size:12px!important;
  font-weight:800!important;
}
dialog input,
dialog select,
dialog textarea{
  min-height:44px!important;
  padding:10px 12px!important;
  border:1px solid #c6d6e3!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#17324d!important;
  box-shadow:0 1px 2px rgba(8,43,78,.025)!important;
  font-size:13px!important;
  font-weight:600!important;
}
dialog textarea{
  min-height:104px!important;
  line-height:1.5!important;
}
dialog input:hover,
dialog select:hover,
dialog textarea:hover{border-color:#9fb9cd!important}
dialog input:focus,
dialog select:focus,
dialog textarea:focus{
  border-color:#2580bd!important;
  box-shadow:0 0 0 3px rgba(37,128,189,.14)!important;
  outline:0!important;
}
dialog input[readonly],
dialog input:disabled,
dialog select:disabled,
dialog textarea:disabled{
  background:#edf2f6!important;
  color:#60778b!important;
}
dialog input[type="checkbox"],
dialog input[type="radio"]{
  flex:0 0 auto!important;
  width:20px!important;
  height:20px!important;
  min-height:20px!important;
  margin:0!important;
  padding:0!important;
  accent-color:#0870c7!important;
  box-shadow:none!important;
}
dialog label.file-button{
  min-height:44px!important;
  padding:10px 14px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid #0a538e!important;
  border-radius:10px!important;
  background:#0b5f9f!important;
  color:#fff!important;
  text-align:center!important;
  cursor:pointer!important;
}
dialog label.file-button:hover{background:#084f86!important}
dialog .inline-field{
  width:100%!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:8px!important;
  align-items:stretch!important;
}
dialog .inline-field>button{
  min-width:92px!important;
  min-height:44px!important;
  padding:0 15px!important;
  align-self:stretch!important;
}
dialog .form-help{
  margin:14px 0 0!important;
  padding:11px 13px!important;
  border:1px solid #cfe2f1!important;
  border-left:4px solid #2580bd!important;
  border-radius:10px!important;
  background:#edf6fc!important;
  color:#49677f!important;
  font-size:12px!important;
  line-height:1.5!important;
}
dialog .panel{
  border-radius:12px!important;
  box-shadow:none!important;
}

dialog footer{
  position:sticky!important;
  bottom:0!important;
  z-index:12!important;
  flex:0 0 auto!important;
  min-height:74px!important;
  margin:20px -24px 0!important;
  padding:14px 24px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:9px!important;
  flex-wrap:wrap!important;
  border-top:1px solid #dbe5ed!important;
  background:rgba(255,255,255,.98)!important;
  box-shadow:0 -8px 20px rgba(8,43,78,.06)!important;
  backdrop-filter:blur(8px)!important;
}
dialog footer button{
  width:auto!important;
  min-width:128px!important;
  min-height:44px!important;
  margin:0!important;
  padding:10px 16px!important;
  border:1px solid transparent!important;
  border-radius:10px!important;
  box-shadow:none!important;
  font-size:12px!important;
  font-weight:850!important;
  transform:none!important;
}
dialog footer button:not(.secondary):not(.danger):not(.whatsapp){
  background:linear-gradient(135deg,#075da8,#0878c7)!important;
  color:#fff!important;
}
dialog footer button.secondary{
  background:#fff!important;
  color:#315570!important;
  border-color:#c7d6e2!important;
}
dialog footer button.danger{
  background:#fff2f1!important;
  color:#a92e27!important;
  border-color:#efc1bd!important;
}
dialog footer button.whatsapp{
  background:#168b45!important;
  color:#fff!important;
}
dialog footer button:hover{filter:brightness(.96)!important}

#orderDetail footer #detailDelete{margin-right:auto!important}
#orderDetail #detailBody{padding-bottom:2px!important}
#invoiceModal .invoice-start,
#batchStockModal .invoice-start{
  gap:14px!important;
  padding:2px 0 4px!important;
}
#invoiceModal .invoice-items,
#batchStockModal .invoice-items{
  border-radius:12px!important;
  scrollbar-width:thin;
  scrollbar-color:#abc2d5 transparent;
}

@media(max-width:700px){
  dialog,
  #modal,
  #stockModal,
  #batchStockModal,
  #invoiceModal,
  #payableModal,
  #creditMoveModal,
  #orderDetail{
    width:calc(100vw - 12px)!important;
    max-height:calc(100dvh - 12px)!important;
    border-radius:16px!important;
  }
  dialog>form,
  dialog>.detail-shell{
    max-height:calc(100dvh - 14px)!important;
    padding:0 14px!important;
  }
  dialog .modal-head{
    min-height:68px!important;
    margin:0 -14px 15px!important;
    padding:13px 14px 12px!important;
  }
  dialog .modal-head h2{font-size:18px!important}
  dialog .modal-head>button[type="button"]{
    flex-basis:36px!important;
    width:36px!important;
    min-width:36px!important;
    height:36px!important;
    min-height:36px!important;
  }
  dialog .form-grid{gap:12px!important}
  dialog footer{
    min-height:70px!important;
    margin:16px -14px 0!important;
    padding:11px 14px!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
  }
  dialog footer button{
    width:100%!important;
    min-width:0!important;
  }
  #orderDetail footer #detailDelete{margin-right:0!important}
  dialog .inline-field{
    grid-template-columns:1fr!important;
  }
  dialog .inline-field>button{width:100%!important}
}
@media(max-width:420px){
  dialog footer{grid-template-columns:1fr!important}
}

/* ============================================================
   V69.20-K — CORREÇÃO CRÍTICA DA NAVEGAÇÃO NO CELULAR
   ============================================================ */
@media(max-width:900px){
  .service-sidebar .service-brand.brand-link,
  .service-sidebar .service-module,
  .service-sidebar .service-side-footer{
    display:none!important;
  }
  .service-sidebar{
    height:72px!important;
    overflow:hidden!important;
  }
  .service-sidebar nav#tabs{
    position:static!important;
    width:100%!important;
    height:64px!important;
    margin:0!important;
  }
}

@media(max-width:520px){
  .service-topbar{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 40px!important;
    align-items:center!important;
    justify-content:stretch!important;
    gap:8px!important;
    height:64px!important;
    min-height:64px!important;
    padding:8px 10px!important;
  }
  .service-global-search{
    grid-column:1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:40px!important;
    flex:none!important;
  }
  .service-header-actions{
    grid-column:2!important;
    display:contents!important;
  }
  .service-topbar button.service-company[data-company-settings],
  .service-topbar .service-header-actions .header-link{
    display:none!important;
  }
  .service-topbar button.service-bell[data-open-alerts]{
    grid-column:2!important;
    display:grid!important;
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    margin:0!important;
    position:relative!important;
  }
}


/* V69.20-O — correção financeira/estoque sobre Agenda N */


/* V69.20-S — cabeçalho acessível em desktop intermediário */
@media (min-width:901px) and (max-width:1450px){
  .service-topbar{
    height:auto!important;
    min-height:72px!important;
    flex-wrap:wrap!important;
    align-content:center!important;
    overflow:visible!important;
  }
  .service-global-search{
    flex:1 1 360px!important;
    min-width:240px!important;
    max-width:none!important;
  }
  .service-header-actions{
    flex:1 1 auto!important;
    display:flex!important;
    justify-content:flex-end!important;
    flex-wrap:wrap!important;
    overflow:visible!important;
    max-width:100%!important;
  }
  .service-topbar .service-header-actions .header-link.compact-link{display:flex!important}
  .service-topbar .service-company{display:flex!important}
}

/* V69.20-U — organização funcional, recebimento, G.O. e relatórios gerenciais */
.nav-group{display:block;padding:14px 18px 6px;font-size:.68rem;font-weight:800;letter-spacing:.14em;color:#7890a4;opacity:.9}
.intake-rule{margin-bottom:16px}.intake-rule p{margin:.35rem 0 0}.management-cards{margin:14px 0}.danger-card strong,.go-item strong{color:#b42318}
.management-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-bottom:16px}.management-filters label{min-width:180px}.management-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}.management-table p{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid #e3e9ef;padding:9px 0;margin:0}.simple-chart{display:grid;gap:10px;margin:14px 0}.bar-row{display:grid;grid-template-columns:minmax(120px,1fr) 2fr auto;gap:10px;align-items:center}.bar-row i{display:block;height:14px;border-radius:999px;background:linear-gradient(90deg,#0b67a8 var(--bar),#e8eef4 var(--bar));min-width:60px}.bar-row.good i{background:linear-gradient(90deg,#2e7d32 var(--bar),#e8eef4 var(--bar))}.bar-row.danger i{background:linear-gradient(90deg,#b42318 var(--bar),#e8eef4 var(--bar))}.bar-row b{white-space:nowrap}
.intake-photo-panel{border:1px solid #d8e2ea;border-radius:10px;padding:12px;display:grid;gap:10px;background:#f8fbfd}.intake-photo-panel>div:first-child{display:flex;flex-direction:column;gap:3px}.intake-photo-preview{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}.intake-photo-preview figure{position:relative;margin:0}.intake-photo-preview img{width:100%;height:100px;object-fit:cover;border-radius:8px;border:1px solid #ccd7df}.intake-photo-preview button{position:absolute;top:4px;right:4px;border-radius:50%;width:28px;height:28px;padding:0;background:#b42318;color:#fff}.go-item{border-left:4px solid #b42318}
.payment-help{border-left:4px solid #0b67a8;background:#f2f8fc;padding:10px 12px;border-radius:6px}.payment-help::before{content:'Regra de pagamento: ';font-weight:800}
@media(max-width:900px){.management-grid{grid-template-columns:1fr}.management-filters{align-items:stretch}.management-filters label,.management-filters button{width:100%}.bar-row{grid-template-columns:1fr}.bar-row i{width:100%}.nav-group{padding-left:14px}.intake-photo-preview{grid-template-columns:repeat(2,minmax(0,1fr))}}
.go-financial-notice{display:flex;flex-direction:column;gap:5px;padding:12px 14px;border:1px solid #efb4ae;border-left:5px solid #b42318;border-radius:8px;background:#fff7f6}.go-financial-notice strong{color:#8f1d14}.go-financial-notice small{line-height:1.5}
.payment-breakdown{border:1px solid #cfdbe5;border-radius:10px;padding:13px 15px;background:#fff;display:grid;gap:7px}.payment-breakdown h3{margin:0 0 5px}.payment-breakdown>div{display:flex;justify-content:space-between;gap:14px;padding:5px 0;border-bottom:1px solid #edf1f4}.payment-breakdown .payment-total{border-top:2px solid #0b4d86;border-bottom:0;margin-top:4px;padding-top:10px;font-size:1.05rem}.payment-breakdown small{color:#5b7083}

/* V69.20-V — edição geral do estoque */
#stockGeneralEditModal{width:min(1500px,96vw);max-width:1500px}
#stockGeneralEditModal form{max-height:90vh;display:flex;flex-direction:column;gap:14px}
.stock-general-wrap{max-height:62vh;overflow:auto;border:1px solid var(--line,#d8dee8);border-radius:14px}
.stock-general-table{min-width:1180px;width:100%;border-collapse:collapse}
.stock-general-table th{position:sticky;top:0;z-index:2;background:var(--surface,#fff)}
.stock-general-table th,.stock-general-table td{padding:8px;border-bottom:1px solid var(--line,#e3e7ee);vertical-align:middle}
.stock-general-table input{width:100%;min-width:90px;box-sizing:border-box}
.stock-general-table td:first-child input{min-width:220px}
@media(max-width:760px){
  #stockGeneralEditModal{width:98vw;max-width:none;padding:12px}
  .stock-general-wrap{max-height:65vh}
}


/* ============================================================
   V69.20-Z — LEITOR CONTAS A PAGAR MOBILE SEM ZOOM
   ============================================================ */
#payableVideo{
  display:block;
  width:100%!important;
  height:auto!important;
  max-height:min(46dvh,380px)!important;
  aspect-ratio:16/9;
  object-fit:contain!important;
  object-position:center center!important;
  margin:4px auto 2px!important;
  border:1px solid #9cb8cd!important;
  border-radius:12px!important;
  background:#06192d!important;
}
#payableVideo[hidden]{display:none!important}
@media(max-width:700px){
  /* Evita o zoom automático do Safari/iOS ao focar os campos do modal. */
  dialog input,
  dialog select,
  dialog textarea{font-size:16px!important}
  #payableModal .inline-field input{font-size:16px!important}
  #payableVideo{
    width:100%!important;
    max-width:100%!important;
    max-height:38dvh!important;
    aspect-ratio:4/3;
    object-fit:contain!important;
  }
}

/* V69.20-AB — alertas de inatividade de OS */
.inactivity-alert-row {
  background: linear-gradient(90deg, #fff9e8 0, #fff 58%);
  border-left: 4px solid #d78a00;
  padding-left: 10px;
}
.inactivity-badge {
  background: #fff0c2 !important;
  color: #8a5200 !important;
  border: 1px solid #efc467;
}
.item.inactive-order {
  border-left: 6px solid #d78a00;
}
.item .order-inactivity-warning {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff5d9;
  color: #7a4a00;
  border: 1px solid #f0cf83;
}
.item .order-cancel-reason {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fbe8e8;
  color: #8a2222;
  border: 1px solid #e7b0b0;
}


/* V69.20-AC — notas fiscais por botão + Contas a pagar incorporado ao Financeiro */
.invoice-history-dialog{width:min(1040px,94vw);max-height:88vh;padding:0;overflow:hidden}
.invoice-history-dialog .dialog-header{position:sticky;top:0;z-index:3;background:#fff;padding:18px 20px 14px;border-bottom:1px solid #dce7f0}
.invoice-history-dialog .dialog-header p{margin:5px 0 0;color:#61788f}
.invoice-history-dialog .invoice-history-search{margin:16px 20px 8px}
.invoice-history-dialog .invoice-history-list{padding:4px 20px 18px;max-height:58vh;overflow:auto}
.invoice-history-dialog .dialog-actions{position:sticky;bottom:0;background:#fff;border-top:1px solid #dce7f0;padding:12px 20px}
.dashboard-finance-link{display:inline-flex!important;align-items:center!important;justify-content:center!important;text-decoration:none!important;white-space:nowrap!important}

/* Modo incorporado: a tela de Contas a pagar é exibida dentro do Financeiro sem duplicar menus. */
html.embed-payables,html.embed-payables body{background:transparent!important;min-height:0!important}
html.embed-payables .service-sidebar,
html.embed-payables .service-topbar{display:none!important}
html.embed-payables main#serviceContent{margin:0!important;max-width:none!important;width:100%!important;padding:0!important;min-height:0!important}
html.embed-payables #serviceContent>.view{display:none!important}
html.embed-payables #payables.view.active{display:block!important;padding:0!important}
html.embed-payables #payables .title{margin:0 0 16px!important}
html.embed-payables #payables .title .eyebrow{display:none}
html.embed-payables #payables .title h1{font-size:22px}
html.embed-payables #payables .title .sub{margin-bottom:0}
html.embed-payables #payables .payable-summary{margin-top:4px}
html.embed-payables body{padding:0!important}
@media(max-width:700px){
  .invoice-history-dialog{width:96vw;max-height:92vh}
  .invoice-history-dialog .invoice-history-list{max-height:64vh}
}
