.mobile-nav-icon {
  display: none;
}
.admin-mobile-navigation {
  display: none;
}
.notification-icon {
  display: none;
}
.cautela-page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: -8px 0 18px;
}
/* Interface móvel. Os estilos de cartões do histórico também se aplicam ao desktop. */
.mobile-menu-toggle,
.nav-mobile-label,
.mobile-cell-label {
  display: none;
}
.mobile-cell-value {
  display: contents;
}
.vehicle-history {
  max-width: 850px;
}
.history-title h1 {
  margin-bottom: 3px;
}
.history-filter {
  background: #fff;
  border: 1px solid #dce4ed;
  border-radius: 12px;
  margin: 22px 0 18px;
}
.history-filter > summary {
  padding: 15px 16px;
  cursor: pointer;
  font-weight: 650;
  font-size: 14px;
}
.history-filter-form {
  padding: 0 16px 16px;
  margin: 0;
}
.history-filter-form label {
  margin: 12px 0 7px;
}
.history-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: #e4ebf3;
  border-radius: 11px;
  margin-bottom: 16px;
}
.history-tabs button {
  min-height: 46px;
  background: transparent;
  color: #526a80;
  font-size: 14px;
  border-radius: 8px;
  padding: 10px;
}
.history-tabs button[aria-selected='true'] {
  background: #fff;
  color: #153b5b;
  box-shadow: 0 1px 4px #16385312;
}
.history-card {
  padding: 18px;
  background: #fff;
  border: 1px solid #dce5ee;
  border-radius: 12px;
  margin: 12px 0;
}
.history-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.history-card-heading > strong {
  font-size: 16px;
}
.history-date {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: #60758a;
  margin: 6px 0 0;
}
.history-author {
  margin: 16px 0 12px;
  line-height: 1.5;
}
.history-author > span {
  display: block;
  color: #64788b;
  font-size: 12px;
  margin-bottom: 3px;
}
.history-author strong {
  font-size: 14px;
  font-weight: 550;
  overflow-wrap: break-word;
}
.history-changes {
  font-size: 13px;
  color: #5b7185;
  margin: 0 0 14px;
}
.history-open {
  display: flex;
  width: 100%;
  min-height: 46px;
}
.history-card .status {
  letter-spacing: 0;
  font-size: 11px;
  padding: 5px 8px;
  white-space: nowrap;
}
.status.completed {
  color: #216242;
  background: #e8f4ec;
}
.status.pending {
  color: #805b10;
  background: #fff3d4;
}
.activity-card {
  border-left: 2px solid #d4e0ea;
  margin: 0 0 0 8px;
  padding: 2px 0 24px 18px;
  position: relative;
}
.activity-card:before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: #b51d32;
  border: 3px solid #f3f6f9;
  border-radius: 50%;
  left: -6px;
  top: 9px;
}
.content .activity-card h2 {
  font-size: 16px;
  letter-spacing: -0.2px;
  margin: 7px 0 5px;
  line-height: 1.4;
}
.activity-author {
  font-size: 13px;
  color: #60768a;
  margin: 0 0 9px;
  overflow-wrap: break-word;
}
.activity-details {
  font-size: 13px;
  color: #526c81;
}
.activity-details summary {
  cursor: pointer;
  padding: 8px 0;
}
.activity-details p {
  margin: 8px 0;
  overflow-wrap: break-word;
}
.activity-checklist {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  text-decoration: none;
  font-weight: 650;
}
.history-empty {
  padding: 24px 14px;
  text-align: center;
  color: #5a7185;
}
.history-hint {
  font-size: 13px;
  color: #60758a;
  margin: 0 0 20px;
}

@media (max-width: 900px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 84px;
    scroll-padding-bottom: calc(130px + env(safe-area-inset-bottom));
  }
  body.workspace {
    background: #f3f6fa;
    font-size: 16px;
  }
  .workspace .app-layout {
    display: block;
    min-height: calc(100dvh - 68px);
  }
  .workspace .topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    min-height: 66px;
    padding: 10px 14px;
    padding-top: max(10px, env(safe-area-inset-top));
    gap: 8px;
    flex-wrap: nowrap;
    border-bottom-width: 2px;
  }
  .workspace .topbar .brand {
    font-size: 15px;
    letter-spacing: 1px;
    gap: 9px;
    min-width: 0;
  }
  .workspace .topbar .crest {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
  }
  .workspace .topbar .brand small {
    font-size: 8px;
    letter-spacing: 1px;
    margin-top: 3px;
  }
  .workspace .session-info {
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
  }
  .workspace .session-info > span {
    display: none;
  }
  .workspace .topbar form {
    margin: 0;
  }
  .workspace .topbar .inline > button {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 13px;
  }
  .workspace .topbar .notification-link {
    position: relative;
    width: 44px;
    min-width: 44px;
    height: 44px;
    justify-content: center;
    min-height: 44px;
    padding: 0;
    font-size: 0;
    gap: 0;
  }
  .workspace .notification-label {
    display: none;
  }
  .workspace .notification-icon {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .workspace .topbar .notification-link strong {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    width: auto;
    height: 18px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 1;
  }
  .workspace .content {
    width: 100%;
    max-width: 760px;
    min-width: 0;
    margin: 0 auto;
    padding: 20px 16px 34px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .workspace:has(.bm-navigation) .content {
    padding-bottom: calc(128px + env(safe-area-inset-bottom));
  }
  .workspace:has(.admin-navigation) .content {
    padding-bottom: calc(128px + env(safe-area-inset-bottom));
  }
  .workspace:has(.manager-navigation) .content {
    padding-bottom: calc(128px + env(safe-area-inset-bottom));
  }
  .workspace .content h1 {
    font-size: 25px;
    line-height: 1.2;
    letter-spacing: -0.7px;
    margin: 8px 0 10px;
    overflow-wrap: break-word;
  }
  .workspace .content h2 {
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -0.3px;
  }
  .workspace .muted {
    font-size: 14px;
    line-height: 1.55;
  }
  .workspace .back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 4px 0;
    margin-bottom: 4px;
    font-size: 13px;
  }
  .workspace .eyebrow {
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: 1.5px;
    margin: 10px 0;
  }
  .workspace .page-heading {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 18px;
  }
  .workspace .page-heading > div {
    min-width: 0;
  }
  .workspace .page-heading > .button {
    align-self: flex-start;
  }
  .workspace .content .panel {
    padding: 16px;
    border-left-width: 1px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: none;
    min-width: 0;
  }
  .workspace .notice {
    font-size: 14px;
    padding: 12px 14px;
    line-height: 1.5;
    overflow-wrap: break-word;
  }
  .workspace input:not([type='checkbox']):not([type='radio']):not([type='hidden']),
  .workspace select,
  .workspace textarea {
    font-size: 16px;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    border-radius: 9px;
    padding: 11px 12px;
  }
  .workspace select {
    padding-right: 28px;
  }
  .workspace textarea {
    height: auto;
    min-height: 88px;
    line-height: 1.5;
  }
  .workspace input[type='checkbox'],
  .workspace input[type='radio'] {
    width: 22px;
    height: 22px;
    min-width: 22px;
    accent-color: #c91930;
  }
  .workspace label {
    font-size: 14px;
    line-height: 1.45;
  }
  .workspace button,
  .workspace .button {
    min-height: 48px;
    font-size: 14px;
    padding: 12px 15px;
    line-height: 1.35;
    border-radius: 9px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }
  .workspace button:active,
  .workspace .button:active {
    transform: translateY(1px);
  }
  .workspace .text-button {
    min-height: 44px;
    padding: 9px 4px;
  }
  .workspace .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
  }
  .workspace .actions > .button,
  .workspace .actions > button {
    flex: 1 1 140px;
    font-size: 14px;
  }
  .workspace .actions > form {
    margin: 0;
  }
  .workspace .form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .workspace .entry-form {
    padding: 0;
    margin: 0;
    width: 100%;
    min-width: 0;
  }
  .workspace .entry-form > button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 22px;
  }
  .workspace .entry-form .actions > button {
    width: auto;
  }
  .workspace .filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
    gap: 12px;
  }
  .workspace .filters > div {
    min-width: 0;
    width: 100%;
  }
  .workspace .filters > button {
    width: 100%;
    height: auto;
    font-size: 14px;
  }
  .workspace .filters > a {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .workspace .details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .workspace .details > div {
    min-width: 0;
  }
  .workspace .details dt {
    font-size: 12px;
  }
  .workspace .details dd {
    font-size: 16px;
    overflow-wrap: break-word;
  }
  .workspace .section-heading {
    flex-wrap: wrap;
    gap: 8px;
  }
  .workspace .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .workspace .stats a {
    min-width: 0;
    padding: 14px;
  }
  .workspace .stats a strong {
    font-size: 26px;
  }
  .workspace .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    font-size: 13px;
    margin: 22px 0 0;
  }
  .workspace .pagination .button {
    flex: 1 1 90px;
  }
  .workspace .vehicle-choice-list {
    margin: 18px 0;
    gap: 12px;
  }
  .workspace .vehicle-choice {
    padding: 17px 15px;
    min-height: 84px;
    border-radius: 12px;
    gap: 13px;
  }
  .workspace .vehicle-choice strong {
    font-size: 17px;
    line-height: 1.35;
    overflow-wrap: break-word;
  }
  .workspace .vehicle-choice small {
    font-size: 13px;
    line-height: 1.4;
  }
  .workspace .vehicle-symbol {
    font-size: 24px;
  }
  .workspace .checklist-options {
    margin: 18px 0 22px;
  }
  .workspace .open-check {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 16px 0;
  }
  .workspace .open-check > div {
    margin: 0;
    min-width: 0;
  }
  .workspace .open-check small {
    font-size: 12px;
  }
  .workspace .open-check > form {
    grid-column: 2;
    margin: 0;
  }
  .workspace .open-check .button {
    min-width: 104px;
  }
  .workspace .compartment {
    margin: 12px 0;
    border-radius: 12px;
  }
  .workspace .compartment > summary {
    padding: 17px 14px;
    font-size: 15px;
    line-height: 1.5;
  }
  .workspace .compartment-body {
    padding: 0 14px 12px;
  }
  .workspace .compartment .entry-form {
    padding: 0 14px 16px;
  }
  .workspace .compact-row {
    gap: 12px;
  }
  .workspace .compact-row > strong {
    font-size: 15px;
    font-weight: 600;
    min-width: 0;
    line-height: 1.4;
    overflow-wrap: break-word;
  }
  .workspace .qty-control {
    flex-shrink: 0;
    gap: 5px;
    margin: 0;
    font-size: 12px;
  }
  .workspace .qty-control input {
    width: 72px !important;
    min-height: 48px;
    text-align: center;
    padding: 8px;
  }
  .workspace .compact-item {
    padding: 12px 0;
  }
  .workspace .item-observation {
    font-size: 13px;
  }
  .workspace .item-observation > summary {
    min-height: 42px;
    display: flex;
    align-items: center;
  }
  .workspace .material-container {
    padding-left: 10px;
    margin: 10px 0;
  }
  .workspace .material-container > summary {
    min-height: 48px;
    padding: 13px 0;
    font-size: 14px;
  }
  .workspace .pressure-inputs input {
    width: 106px !important;
  }
  .workspace .pressure-inputs label {
    min-height: 48px;
    font-size: 14px;
    margin: 10px 0;
  }
  .workspace .previous-alert {
    font-size: 13px;
    padding: 12px;
  }
  .workspace .previous-alert summary {
    min-height: 32px;
  }
  .workspace .alert-pill {
    white-space: nowrap;
    margin-left: 5px;
    font-size: 11px;
  }
  .workspace .loan-row {
    grid-template-columns: minmax(0, 1fr) 100px;
    gap: 10px;
  }
  .workspace .loan-row > div:nth-child(1),
  .workspace .loan-row > div:nth-child(2) {
    grid-column: 1/-1;
  }
  .workspace .loan-row > div:nth-child(3) {
    grid-column: 1;
  }
  .workspace .loan-row > button {
    grid-column: 2;
    align-self: end;
    min-height: 44px;
  }
  .workspace .loan-items {
    padding: 12px;
  }
  .workspace .check-item {
    padding: 14px;
  }
  .workspace .check-item .form-grid {
    gap: 10px;
  }

  /* Tabelas viram fichas identificadas, sem perder colunas. */
  .workspace .table-scroll {
    overflow: visible;
  }
  .workspace table.mobile-table,
  .workspace .mobile-table tbody {
    display: block;
    width: 100%;
  }
  .workspace .mobile-table thead {
    display: none;
  }
  .workspace .mobile-table tr {
    display: block;
    width: 100%;
    border: 1px solid #dce5ee;
    border-radius: 10px;
    padding: 12px;
    margin: 12px 0;
    background: #fff;
  }
  .workspace .mobile-table td {
    display: grid;
    grid-template-columns: minmax(80px, 30%) minmax(0, 1fr);
    gap: 12px;
    width: 100%;
    max-width: none;
    padding: 8px 0;
    border: 0;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: normal;
    word-break: normal;
    min-width: 0;
  }
  .workspace .mobile-table .mobile-cell-label {
    display: block;
    color: #61768a;
    font-size: 12px;
    line-height: 1.5;
    padding-top: 2px;
  }
  .workspace .mobile-cell-value {
    display: block;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
  }
  .workspace .mobile-cell-value > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 4px 0;
    line-height: 1.45;
  }
  .workspace .mobile-cell-value > a + a {
    margin-left: 8px;
  }
  .workspace .mobile-table td.row-actions {
    min-width: 0;
  }
  .workspace .mobile-table .row-actions .mobile-cell-value {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .workspace .mobile-table .row-actions form {
    margin: 0;
  }
  .workspace .mobile-table td.mobile-cell-empty {
    display: none;
  }
  .workspace .mobile-table td[colspan] {
    display: block;
  }
  .workspace .mobile-table td[colspan] .mobile-cell-label {
    display: none;
  }
  .workspace .mobile-table td.empty {
    text-align: center;
    padding: 16px 6px;
  }

  /* Navegação do perfil BM ao alcance do polegar. */
  .workspace .bm-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 70;
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
    background: #fff;
    border: 0;
    border-top: 1px solid #dce4ee;
    box-shadow: 0 -3px 18px #0c2b4510;
  }
  .workspace .general-navigation.admin-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 70;
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
    background: #fff;
    border: 0;
    border-top: 1px solid #dce4ee;
    box-shadow: 0 -3px 18px #0c2b4510;
  }
  .workspace .general-navigation.manager-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 70;
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
    background: #fff;
    border: 0;
    border-top: 1px solid #dce4ee;
    box-shadow: 0 -3px 18px #0c2b4510;
  }
  .workspace .general-navigation.admin-navigation nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
  }
  .workspace .general-navigation.manager-navigation nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
  }
  .workspace .general-navigation.admin-navigation .sidebar-foot,
  .workspace .general-navigation.admin-navigation nav > :not(.admin-mobile-navigation) {
    display: none;
  }
  .workspace .general-navigation.manager-navigation .sidebar-foot,
  .workspace .general-navigation.manager-navigation nav > :not(.admin-mobile-navigation) {
    display: none;
  }
  .workspace .admin-mobile-navigation {
    display: contents;
  }
  .workspace .general-navigation .admin-mobile-navigation > a,
  .workspace .admin-mobile-more > summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 58px;
    padding: 5px 1px;
    margin: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #61768a;
    font-size: 10px;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
  }
  .workspace .general-navigation .admin-mobile-navigation .mobile-nav-icon {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .workspace .general-navigation .admin-mobile-navigation > a[aria-current='page'],
  .workspace .admin-mobile-more:has(a[aria-current='page']) > summary {
    color: #b31b30;
    background: #fff0f2;
  }
  .workspace .admin-mobile-more {
    position: relative;
    min-width: 0;
  }
  .workspace .admin-mobile-more > summary {
    list-style: none;
  }
  .workspace .admin-mobile-more > summary::-webkit-details-marker {
    display: none;
  }
  .workspace .admin-mobile-options {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    display: grid;
    gap: 3px;
    width: min(280px, calc(100vw - 20px));
    max-height: min(60dvh, 450px);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #dce4ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 28px #0c2b4526;
  }
  .workspace .admin-mobile-options a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #163b5a;
    font-size: 14px;
    text-decoration: none;
  }
  .workspace .admin-mobile-options a[aria-current='page'] {
    color: #b31b30;
    background: #fff0f2;
    font-weight: 650;
  }
  .workspace .cautela-page-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 16px;
  }
  .workspace .cautela-page-actions .button {
    width: 100%;
    min-height: 50px;
    padding: 9px 10px;
    font-size: 13px;
    line-height: 1.25;
    text-align: center;
  }
  .workspace .loan-detail-page {
    max-width: 680px;
  }
  .workspace .loan-detail-heading {
    gap: 10px;
    margin-bottom: 14px;
  }
  .workspace .loan-detail-heading > .button {
    align-self: stretch;
    width: 100%;
    min-height: 48px;
  }
  .workspace .loan-summary-panel,
  .workspace .loan-items-panel,
  .workspace .loan-returns-panel {
    padding: 15px;
    margin: 12px 0;
  }
  .workspace .loan-summary-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }
  .workspace .loan-summary-details > div {
    min-width: 0;
  }
  .workspace .loan-summary-details .loan-summary-responsible,
  .workspace .loan-summary-details .loan-summary-registrar {
    grid-column: 1 / -1;
  }
  .workspace .loan-summary-details dt {
    margin-bottom: 4px;
    font-size: 11px;
  }
  .workspace .loan-summary-details dd {
    font-size: 15px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .workspace .loan-note {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid #e5ebf1;
  }
  .workspace .loan-items-panel .section-heading {
    align-items: center;
    margin-bottom: 10px;
  }
  .workspace .loan-items-panel .section-heading h2 {
    margin: 3px 0 0;
  }
  .workspace .loan-item-list {
    display: grid;
    gap: 9px;
  }
  .workspace .loan-item-card {
    min-width: 0;
    padding: 13px;
    border: 1px solid #dce5ee;
    border-radius: 10px;
    background: #fff;
  }
  .workspace .loan-item-name {
    display: block;
    min-height: 44px;
    padding: 7px 0 9px;
    color: #163b5a !important;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    overflow-wrap: anywhere;
  }
  .workspace .loan-item-warehouse {
    display: block;
    margin-top: -5px;
    color: #718297;
    font-size: 12px;
    line-height: 1.35;
  }
  .workspace .loan-item-quantities {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid #edf1f5;
  }
  .workspace .loan-item-quantities > div {
    display: grid;
    gap: 4px;
    min-width: 0;
  }
  .workspace .loan-item-quantities span {
    color: #64788c;
    font-size: 10px;
    line-height: 1.3;
  }
  .workspace .loan-item-quantities strong {
    color: #173d5f;
    font-size: 16px;
    line-height: 1.2;
  }
  .workspace .loan-item-pending strong {
    color: #b31b30;
  }
  .workspace .return-items {
    padding: 13px;
  }
  .workspace .return-item-list {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .workspace .return-item-row {
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 10px;
    padding: 12px;
  }
  .workspace .return-item-copy strong {
    font-size: 14px;
  }
  .workspace .return-item-copy span {
    font-size: 12px;
  }
  .workspace .return-item-input input[type=number] {
    min-height: 44px;
  }
  .workspace .loan-returns-panel h2 {
    margin-bottom: 12px;
  }
  .workspace .bm-navigation nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
  }
  .workspace .bm-navigation .sidebar-foot,
  .workspace .bm-navigation .nav-label {
    display: none;
  }
  .workspace .bm-navigation nav > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 58px;
    padding: 5px 1px;
    margin: 0;
    border: 0;
    font-size: 10px;
    line-height: 1.3;
    color: #61768a;
    white-space: nowrap;
    text-align: center;
    border-radius: 9px;
  }
  .workspace .bm-navigation nav > a[aria-current] {
    color: #b31b30;
    background: #fff0f2;
    border: 0;
  }
  .workspace .bm-navigation nav > a:before {
    font-size: 20px;
    line-height: 1;
    font-weight: 500;
  }
  .workspace .nav-mobile-label {
    display: inline;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .workspace .nav-desktop-label {
    display: none;
  }
  .workspace .general-navigation .nav-mobile-label {
    display: none;
  }
  .workspace .general-navigation .nav-desktop-label {
    display: inline;
  }
  .workspace .general-navigation {
    padding: 12px;
    border: 0;
    border-bottom: 1px solid #dce4ee;
  }
  .workspace .general-navigation nav {
    display: block;
    overflow: visible;
  }
  .workspace .general-navigation .sidebar-foot {
    display: none;
  }
  .workspace .general-navigation nav .nav-label {
    display: block;
  }
  .workspace .general-navigation nav a {
    white-space: normal;
    min-height: 44px;
    font-size: 14px;
  }
  .workspace.mobile-navigation-ready .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 7px 10px;
    border: 1px solid #66829b;
    background: transparent;
    color: #fff;
    font-size: 12px;
    order: -1;
  }
  .workspace.mobile-navigation-ready .general-navigation {
    display: none;
  }
  .workspace.mobile-navigation-ready.navigation-open .general-navigation {
    display: block;
    max-height: 70dvh;
    overflow-y: auto;
  }
  .workspace .history-card {
    padding: 16px;
  }
  .workspace .history-tabs button {
    min-height: 48px;
    padding: 10px;
  }
  .workspace .history-filter-form .actions > * {
    flex: 1;
  }
  .workspace .history-open {
    width: 100%;
  }
  .workspace .history-author strong {
    font-size: 14px;
  }
  .workspace .content .activity-card h2 {
    font-size: 16px;
  }
  .workspace .activity-card {
    margin-left: 5px;
    padding-left: 17px;
    padding-bottom: 25px;
  }
  .workspace .activity-details summary {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .workspace .history-date {
    font-size: 13px;
    white-space: normal;
    word-break: normal;
  }

  /* Login compacto, mantendo a identidade da corporação. */
  body:not(.workspace) .shell {
    display: block;
    min-height: 100dvh;
  }
  body:not(.workspace) .intro {
    min-height: 0;
    padding: 20px;
    gap: 0;
  }
  body:not(.workspace) .intro-copy,
  body:not(.workspace) .intro footer {
    display: none;
  }
  body:not(.workspace) .intro > .brand .crest {
    width: 42px;
    height: 42px;
  }
  body:not(.workspace) .access {
    padding: 24px 20px;
    min-height: auto;
  }
  body:not(.workspace) .login-card {
    padding: 22px 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    margin: 0 auto;
  }
  body:not(.workspace) .login-card h2 {
    font-size: 27px;
  }
  body:not(.workspace) .login-card input {
    font-size: 16px;
    min-height: 52px;
  }
  body:not(.workspace) .login-card button {
    min-height: 52px;
  }
  body:not(.workspace) .access-footer {
    margin-top: 16px;
  }
}

/* Ajustes de largura e navegação para o uso principal em celular. */
@media (max-width: 900px) {
  .workspace {
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
  }
  .workspace .topbar,
  .workspace .app-layout,
  .workspace .content {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
  }
  .workspace .product-card-list,
  .workspace .product-list-card,
  .workspace .warehouse-grid,
  .workspace .warehouse-overview-card,
  .workspace .warehouse-product-list,
  .workspace .warehouse-product-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .workspace .product-list-card {
    display: block;
    padding: 0;
  }
  .workspace .product-list-card-link {
    min-height: 68px;
    padding: 11px 12px;
    gap: 3px 10px;
  }
  .workspace .warehouse-product-link {
    min-height: 64px;
    padding: 10px 12px;
    gap: 3px 9px;
  }
  .workspace .product-card-count strong,
  .workspace .warehouse-product-count strong {
    font-size: 19px;
  }
  .workspace .product-card-main {
    grid-column: 1 / -1;
    min-width: 0;
    grid-template-columns: 14px minmax(0, 1fr);
    column-gap: 10px;
  }
  .workspace .product-card-main > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .workspace .product-card-meta {
    line-height: 1.35;
  }
  .workspace .product-card-main .product-distribution {
    font-size: 11px;
  }
  .workspace .product-stock {
    grid-column: 1;
    min-width: 0;
  }
  .workspace .product-card-status {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    min-width: 0;
    max-width: 150px;
    white-space: normal;
    text-align: right;
    line-height: 1.35;
  }
  .workspace .product-card-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 14px;
    min-width: 0;
    white-space: normal;
  }
  .workspace .product-card-actions a,
  .workspace .product-card-actions .text-button {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    font-size: 13px;
  }
  .workspace .product-card-actions form.inline {
    margin: 0;
  }
  .workspace .warehouse-overview-card {
    overflow: hidden;
  }
  .workspace .warehouse-card-link,
  .workspace .warehouse-card-title,
  .workspace .warehouse-card-description {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .workspace .warehouse-product-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .workspace .warehouse-distribution {
    overflow-wrap: anywhere;
  }
  .workspace .admin-mobile-more {
    z-index: 72;
  }
  .workspace .admin-mobile-options {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: auto;
    max-width: 520px;
    max-height: min(58dvh, 520px);
    margin: 0 auto;
    padding: 9px;
    border-radius: 16px;
    box-shadow: 0 14px 36px #0c2b4538;
    z-index: 2;
  }
  .workspace .admin-mobile-options a {
    min-height: 48px;
    padding: 10px 13px;
    font-size: 15px;
  }
  .admin-mobile-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 69;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #102b4359;
  }
}

@media (max-width: 740px) {
  .workspace .product-catalog-page {
    padding-bottom: calc(94px + env(safe-area-inset-bottom));
  }
  .workspace .product-catalog-page .page-heading {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 17px;
  }
  .workspace .product-catalog-page .page-heading > div {
    min-width: 0;
  }
  .workspace .product-catalog-page .page-heading h1 {
    margin-bottom: 4px;
  }
  .workspace .product-catalog-page .page-heading .muted {
    max-width: 32ch;
    margin-bottom: 0;
    font-size: 13px;
    line-height: 1.45;
  }
  .workspace .product-catalog-page .page-heading > .button {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    padding: 9px 12px;
    font-size: 13px;
  }
  .workspace .product-filter-form {
    margin-bottom: 14px;
  }
  .workspace .product-filter-disclosure > summary {
    min-height: 54px;
    padding: 0 15px;
    font-size: 15px;
  }
  .workspace .product-filter-disclosure .product-catalog-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 13px;
    gap: 11px;
  }
  .workspace .product-filter-disclosure .product-catalog-filters > div {
    min-width: 0;
    width: 100%;
  }
  .workspace .product-filter-disclosure .product-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
  }
  .workspace .product-filter-disclosure .product-filter-actions > button {
    flex: 1;
    width: auto;
    min-height: 44px;
  }
  .workspace .product-filter-disclosure .product-filter-actions > a {
    min-height: 44px;
    padding: 0 5px;
  }
  .workspace .product-card-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }
  .workspace .product-list-card-link {
    min-height: 104px;
    padding: 12px 14px;
    gap: 9px;
  }
  .workspace .product-card-name {
    font-size: 16px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }
  .workspace .product-card-copy .product-card-meta {
    font-size: 12px;
    line-height: 1.35;
  }
  .workspace .product-card-bottom {
    align-items: flex-start;
    gap: 7px 12px;
    padding-top: 8px;
  }
  .workspace .product-card-count strong {
    font-size: 21px;
  }
  .workspace .product-card-bottom .product-distribution {
    max-width: 72%;
    font-size: 10px;
  }
}
@media (max-width: 360px) {
  .workspace .content {
    padding-left: 12px;
    padding-right: 12px;
  }
  .workspace .topbar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .workspace .topbar .brand {
    font-size: 13px;
  }
  .workspace .topbar .brand small {
    font-size: 7px;
  }
  .workspace .topbar .notification-link {
    font-size: 0;
  }
  .workspace .topbar .notification-link strong {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .workspace button:active,
  .workspace .button:active {
    transform: none;
  }
}

@media (max-width: 900px) {
  .workspace .app-layout {
    min-height: calc(100dvh - 70px);
  }
  .workspace .bm-navigation nav > a:before {
    content: none;
  }
  .workspace .bm-navigation .mobile-nav-icon {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}

@media (max-width: 900px) {
  .workspace .table-scroll:has(table:not(.mobile-table)) {
    overflow-x: auto;
  }
  .workspace .table-scroll table:not(.mobile-table) {
    min-width: 560px;
  }
}

.mobile-filter-toggle {
  display: none;
}

/* Visão geral operacional do perfil de Bombeiro Militar. */
.firefighter-dashboard {
  max-width: 1120px;
}
.firefighter-welcome {
  padding: 4px 0 8px;
}
.firefighter-welcome .eyebrow,
.firefighter-section-heading .eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
}
.firefighter-welcome h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.035em;
}
.firefighter-welcome > p:not(.eyebrow) {
  margin: 8px 0 18px;
  color: #60758a;
}
.firefighter-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 28px;
}
.firefighter-stat {
  display: block;
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid #dce5ee;
  border-top: 3px solid var(--blue);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px #12375d06;
  color: inherit;
  text-decoration: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.firefighter-stat:hover {
  border-color: #9eb4ca;
  box-shadow: 0 7px 18px #12375d12;
  transform: translateY(-1px);
}
.firefighter-stat:focus-visible {
  outline: 3px solid #e3a900;
  outline-offset: 3px;
}
.firefighter-stat.is-alert {
  border-top-color: var(--red);
}
.firefighter-stat span,
.firefighter-stat small {
  display: block;
  color: #60758a;
  font-size: 13px;
  line-height: 1.4;
}
.firefighter-stat strong {
  display: block;
  margin: 9px 0 3px;
  color: var(--navy);
  font-size: 30px;
  line-height: 1;
}
.firefighter-stat.is-alert strong {
  color: var(--red);
}
.firefighter-stat small {
  font-size: 11px;
}
.maintenance-alerts {
  border-left-color: var(--red);
}
.maintenance-alert-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}
.maintenance-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid #f0d1d5;
  border-radius: 10px;
  background: #fffafb;
  color: var(--navy);
  text-decoration: none;
}
.maintenance-alert-link {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  color: var(--navy);
  text-decoration: none;
}
.maintenance-alert-link:hover,
.maintenance-alert-link:focus-visible {
  border-color: var(--red);
}
.maintenance-alert form {
  flex: 0 0 auto;
  margin: 0;
}
.maintenance-alert form .button {
  min-height: 42px;
  padding: 9px 12px;
  font-size: 13px;
}
.flagged-resolution-form {
  margin-top: 14px;
}
.flagged-resolution-form .button {
  min-height: 42px;
  padding: 9px 12px;
  font-size: 13px;
}
.maintenance-alert-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.maintenance-alert-copy small {
  color: #60758a;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.firefighter-section {
  margin: 22px 0;
  padding: 20px;
  border: 1px solid #dce5ee;
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  background: #fff;
}
.firefighter-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.firefighter-section-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
}
.firefighter-count {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #fff0f2;
  color: var(--red);
  font-weight: 750;
}
.text-link,
.firefighter-continue,
.firefighter-vehicle-action {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.firefighter-open-checklist {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 66px;
  padding: 12px 4px;
  border-top: 1px solid #e6ebf0;
  color: inherit;
  text-decoration: none;
}
.firefighter-open-checklist:first-of-type {
  border-top: 0;
}
.firefighter-checklist-copy,
.firefighter-vehicle-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.firefighter-checklist-copy strong,
.firefighter-vehicle-copy strong {
  color: #183b5b;
  font-size: 15px;
}
.firefighter-checklist-copy small,
.firefighter-vehicle-copy small {
  color: #60758a;
  font-size: 12px;
  line-height: 1.4;
}
.firefighter-continue {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
  margin-left: auto;
}
.firefighter-vehicle-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.firefighter-vehicle {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #e1e8ef;
  border-radius: 10px;
  background: #fbfcfd;
}
.vehicle-symbol {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 11px;
  background: #edf3f8;
  color: var(--blue);
  font-size: 20px;
  font-weight: 750;
}
.firefighter-vehicle-copy {
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}
.firefighter-outage-reason {
  color: #a5121e !important;
}
.firefighter-status {
  flex-shrink: 0;
  padding: 5px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 750;
}
.firefighter-status.is-ready {
  background: #e8f5ee;
  color: #247048;
}
.firefighter-status.is-down {
  background: #fff0f2;
  color: #a5121e;
}
.firefighter-vehicle-action {
  display: flex;
  flex-shrink: 0;
  gap: 5px;
  align-items: center;
}
.firefighter-vehicle-action.is-disabled {
  color: #788795;
  cursor: default;
  font-size: 11px;
}
.firefighter-quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}
.firefighter-quick-links a {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid #dce5ee;
  border-radius: 11px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}
.firefighter-quick-links strong {
  color: var(--navy);
  font-size: 14px;
}
.firefighter-quick-links span {
  color: #60758a;
  font-size: 12px;
  line-height: 1.45;
}
@media (max-width: 900px) {
  .firefighter-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .firefighter-stat {
    padding: 14px;
  }
  .firefighter-stat strong {
    font-size: 27px;
  }
  .firefighter-section {
    padding: 15px;
  }
  .maintenance-alert {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .maintenance-alert-link {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
  }
  .maintenance-alert form,
  .maintenance-alert form .button {
    width: 100%;
  }
  .flagged-resolution-form,
  .flagged-resolution-form .button {
    width: 100%;
  }
  .firefighter-vehicle-list,
  .firefighter-quick-links {
    grid-template-columns: 1fr;
  }
  .workspace .bm-navigation nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 390px) {
  .firefighter-status {
    max-width: 75px;
    text-align: center;
  }
  .firefighter-vehicle {
    gap: 8px;
    padding: 11px 9px;
  }
  .firefighter-vehicle .vehicle-symbol {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }
  .firefighter-vehicle-action {
    font-size: 11px;
  }
}
@media (max-width: 900px) {
  .workspace .mobile-filter-panel {
    border: 1px solid #dce4ed;
    border-radius: 12px;
    background: #fff;
    margin: 18px 0;
  }
  .workspace .mobile-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    margin: 0;
    color: #1b3b56;
    background: transparent;
    text-align: left;
    padding: 14px 16px;
  }
  .workspace .mobile-filter-toggle:after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
  }
  .workspace .mobile-filter-panel.is-open > .mobile-filter-toggle:after {
    content: '−';
  }
  .workspace .mobile-filter-panel > .filters {
    margin: 0;
    border: 0;
    border-radius: 0 0 12px 12px;
  }
  .workspace .mobile-filter-panel:not(.is-open) > .filters {
    display: none;
  }
}
.operational-product-cards {
  display: none;
}
@media (max-width: 900px) {
  .workspace .daily-checklist-panel {
    padding: 14px;
    margin: 18px 0;
  }
  .workspace .daily-checklist-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 10px;
    font-size: 13px;
  }
  .workspace .daily-checklist-row .status {
    max-width: 140px;
    white-space: normal;
    text-align: center;
  }
  .workspace .daily-checklist-row small {
    grid-column: 2 / -1;
  }
  .workspace .material-container {
    padding: 0 8px;
    border-left-width: 3px;
  }
  .workspace .container-items {
    margin: 0 2px 8px;
    padding: 10px;
  }
  .workspace .bundle-heading small {
    font-size: 11px;
  }
  .workspace .seal-input input {
    width: 100%;
    min-height: 48px;
  }
  .workspace .operational-product-table {
    display: none;
  }
  .workspace .operational-product-cards {
    display: grid;
    gap: 11px;
  }
  .workspace .operational-product-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid #dce5ee;
    border-left: 3px solid var(--blue);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px #12375d08;
  }
  .workspace .operational-product-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }
  .workspace .operational-product-heading > div {
    min-width: 0;
  }
  .workspace .operational-product-heading h2 {
    margin: 0 0 5px;
    font-size: 17px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }
  .workspace .operational-product-category {
    color: #65798c;
    font-size: 12px;
  }
  .workspace .operational-product-heading .status {
    flex: 0 0 auto;
    font-size: 11px;
  }
  .workspace .operational-product-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 12px;
    margin: 13px 0;
    padding: 11px 0;
    border-top: 1px solid #edf1f5;
    border-bottom: 1px solid #edf1f5;
  }
  .workspace .operational-product-facts > div {
    display: grid;
    gap: 3px;
    min-width: 0;
  }
  .workspace .operational-product-facts span {
    color: #738397;
    font-size: 11px;
    line-height: 1.3;
  }
  .workspace .operational-product-facts strong {
    color: #183b5d;
    font-size: 14px;
    overflow-wrap: anywhere;
  }
  .workspace .operational-product-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 12px;
  }
  .workspace .operational-product-actions .button {
    min-height: 42px;
    padding: 9px 12px;
    font-size: 13px;
  }
  .workspace .operational-product-actions form {
    margin: 0;
  }
  .workspace .operational-product-actions .text-button {
    min-height: 42px;
    padding: 8px 3px;
  }
  .workspace .operational-product-actions .muted {
    flex-basis: 100%;
    margin: 0;
    font-size: 12px;
  }
}
