/*
 * Estrutura visual base: layout, formulários, tabelas, cartões, diálogos e comportamento responsivo.
 */

:root {
  font-family:
    Segoe UI,
    Arial,
    sans-serif;
  color: #23334a;
  background: #f3f6fa;
  --blue: #004693;
  --orange: #f4a220;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: white;
  border-radius: 8px;
  padding: 10px 14px;
  color: #23334a;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--blue);
  background: var(--blue);
  border-radius: 8px;
  padding: 10px 14px;
  color: white;
  text-decoration: none;
}
.button:hover {
  background: #00336a;
}
button:hover {
  background: #eaf0f8;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.primary:hover {
  background: #00336a;
}
.danger {
  color: #b42318;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
}
input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid #b8d6f8;
  outline-offset: 2px;
}
input[type='checkbox'] {
  width: auto;
}
label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
}
h1 {
  font-size: 27px;
  margin: 0 0 8px;
  color: var(--blue);
}
h2 {
  color: var(--blue);
  font-size: 22px;
}
.muted {
  color: #65758b;
  font-size: 14px;
}
.login {
  max-width: 430px;
  margin: 8vh auto;
  background: white;
  padding: 35px;
  border: 1px solid #e1e7ef;
  border-radius: 18px;
  box-shadow: 0 12px 40px #1836520c;
}
.login img {
  width: 190px;
  display: block;
  margin: 0 auto 25px;
}
.login form {
  display: grid;
  gap: 20px;
}
.shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  background: white;
  padding: 24px 16px;
  border-right: 1px solid #e1e7ef;
}
aside img {
  width: 175px;
  margin: 5px 15px 30px;
}
nav {
  display: grid;
  gap: 6px;
}
nav button {
  text-align: left;
  border: 0;
}
nav button.active {
  background: #e5eef9;
  color: var(--blue);
  font-weight: 700;
  border-left: 3px solid var(--orange);
}
.main {
  padding: 28px;
  min-width: 0;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
header .actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.card {
  background: white;
  padding: 24px;
  border: 1px solid #e1e7ef;
  border-radius: 12px;
  margin-bottom: 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}
.stats strong {
  font-size: 30px;
  display: block;
  margin-top: 10px;
  color: var(--blue);
}
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.toolbar input {
  flex: 1;
  min-width: 200px;
}
.toolbar select {
  width: auto;
  min-width: 150px;
}
.table {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid #e8edf3;
}
th {
  color: #65758b;
  white-space: nowrap;
  font-size: 12px;
  text-transform: uppercase;
}
td button {
  padding: 7px 10px;
  margin: 3px;
}
.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 20px;
  background: #eef2f8;
  font-size: 12px;
  white-space: nowrap;
}
.available {
  background: #e1f5e8;
  color: #19703c;
}
.loaned {
  background: #fff1d3;
  color: #945c00;
}
.maintenance {
  background: #fee7e6;
  color: #a03025;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.wide {
  grid-column: 1/-1;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
}
.choices {
  max-height: 240px;
  overflow: auto;
  display: grid;
  gap: 10px;
  border: 1px solid #dde5ef;
  border-radius: 8px;
  padding: 12px;
}
dialog {
  border: 0;
  border-radius: 14px;
  max-width: 780px;
  width: calc(100% - 30px);
  max-height: 90vh;
  padding: 25px;
  box-shadow: 0 20px 60px #0003;
}
dialog::backdrop {
  background: #10243f80;
}
dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
.error {
  color: #b42318;
  padding: 10px 0;
  white-space: pre-wrap;
}
#toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 10;
  max-width: 450px;
  background: #174e34;
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  display: none;
}
.empty {
  padding: 25px;
  text-align: center;
  color: #65758b;
}
@media (max-width: 850px) {
  .shell {
    grid-template-columns: 1fr;
  }
  aside {
    padding: 12px;
  }
  aside img {
    width: 130px;
    margin: 5px;
  }
  nav {
    display: flex;
    overflow: auto;
  }
  nav button {
    white-space: nowrap;
  }
  .main {
    padding: 16px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  .login {
    margin: 30px 15px;
  }
}
[hidden] {
  display: none !important;
}
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 0 0 20px;
}
.pager {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  margin: 15px 0;
}
.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.details dt {
  font-size: 12px;
  text-transform: uppercase;
  color: #65758b;
  font-weight: 600;
}
.details dd {
  margin: 5px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.gallery {
  background: #f3f6fa;
  border-radius: 12px;
  text-align: center;
  padding: 16px;
}
.gallery img {
  height: 270px;
  width: 100%;
  object-fit: contain;
}
.gallery button {
  margin: 8px;
}
.gallery #imageCount {
  padding: 0 12px;
}
#scannerVideo {
  width: 100%;
  max-height: 350px;
  border-radius: 12px;
}
pre {
  white-space: pre-wrap;
  max-width: 400px;
  overflow-wrap: anywhere;
}
.label-card {
  width: 90mm;
  border: 1px solid #222;
  padding: 6mm;
  text-align: center;
}
.label-logo {
  width: 35mm;
}
.label-card h2 {
  margin: 3mm 0;
}
.qr {
  width: 32mm;
  height: 32mm;
}
.barcode {
  width: 70mm;
  max-height: 22mm;
  display: block;
  margin: auto;
}
#labelSheet {
  display: none;
}
@media (max-width: 600px) {
  .details {
    grid-template-columns: 1fr;
  }
  .pager {
    font-size: 12px;
    gap: 8px;
  }
}
@media print {
  body > * {
    display: none !important;
  }
  body > #labelSheet {
    display: block !important;
  }
  .label-card {
    break-inside: avoid;
  }
  body {
    background: white;
  }
  .label-card h2 {
    color: black;
  }
}
.romaneio-panel {
  position: fixed;
  inset: 0;
  background: #e8edf2;
  z-index: 100;
  overflow: auto;
  padding: 20px;
}
.romaneio-panel > .toolbar {
  max-width: 1100px;
  margin: 0 auto 20px;
}
.romaneio-page {
  background: white;
  color: #111;
  max-width: 1100px;
  margin: 0 auto 24px;
  padding: 35px;
}
.romaneio-logo {
  width: 160px;
}
.romaneio-barcode {
  width: 190px;
  height: 65px;
  object-fit: contain;
}
.romaneio-panel th,
.romaneio-panel td {
  white-space: normal;
}
.romaneio-panel small {
  display: block;
}
.signatures {
  display: flex;
  gap: 45px;
  margin: 90px 0 20px;
}
.signatures > div {
  flex: 1;
  border-top: 1px solid #111;
  text-align: center;
  padding-top: 10px;
}
.romaneio-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.romaneio-gallery img {
  width: 270px;
  height: 200px;
  object-fit: contain;
}
.photo-block {
  break-inside: avoid;
  margin-bottom: 25px;
}
@media print {
  body.romaneio-open > #root,
  body.romaneio-open > dialog,
  body.romaneio-open > #labelSheet,
  body.romaneio-open > #toast {
    display: none !important;
  }
  body.romaneio-open .romaneio-panel {
    display: block !important;
    position: static;
    overflow: visible;
    padding: 0;
    background: white;
  }
  body.romaneio-open .romaneio-page {
    margin: 0;
    padding: 8mm;
    max-width: none;
    box-shadow: none;
  }
  .no-print {
    display: none !important;
  }
  .romaneio-photos {
    break-before: page;
  }
  .romaneio-panel tr,
  .signatures {
    break-inside: avoid;
  }
  .romaneio-barcode {
    width: 45mm;
    height: 16mm;
  }
  .romaneio-panel .table {
    overflow: visible;
  }
  .romaneio-panel td {
    font-size: 10px;
  }
}

.romaneio-barcode {
  width: 100%;
  max-width: 680px;
  height: 100px;
  object-fit: contain;
  background: #fff;
  padding: 10px;
}
.barcode-row td {
  text-align: center;
  padding: 12px;
}
.romaneio-panel .barcode-row small {
  font-size: 14px;
}
@media print {
  .romaneio-barcode {
    width: 170mm;
    max-width: 100%;
    height: 25mm;
    padding: 2mm;
  }
  .barcode-row td {
    padding: 2mm;
  }
  .romaneio-panel thead {
    display: table-header-group;
  }
}

.return-item {
  padding: 16px;
  border: 1px solid #dce5ed;
  border-radius: 10px;
  background: #f8fafc;
}
.return-item h3 {
  margin: 0 0 8px;
}
.return-item label {
  margin: 10px 0;
}
.return-item input[type='checkbox'],
[data-select-return] {
  width: 18px;
  height: 18px;
}

.dashboard-settings {
  margin-bottom: 20px;
}
.dashboard-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.dashboard-choices input {
  width: 18px;
  height: 18px;
}
.inventory-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.inventory-summary {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 4px 14px;
  text-align: center;
}
.inventory-summary strong {
  font-size: 22px;
  color: var(--blue);
}
.inventory-summary span {
  grid-row: 2;
  font-size: 12px;
  color: var(--muted);
}
.inventory-scan {
  margin: 18px 0;
  border-left: 4px solid var(--blue);
}
.inventory-scan input {
  min-width: min(420px, 100%);
}
.badge.inventory-found {
  background: #dff4e7;
  color: #24633b;
}
.badge.inventory-missing {
  background: #fde5e2;
  color: #9b2d24;
}
.badge.inventory-unexpected {
  background: #fff1d3;
  color: #945c00;
}
.badge.inventory-pending {
  background: #e5effa;
  color: #174f87;
}
.badge.maintenance-scheduled {
  background: #e5effa;
  color: #174f87;
}
.badge.maintenance-warning {
  background: #fff1d3;
  color: #945c00;
}
.badge.maintenance-overdue {
  background: #fde5e2;
  color: #9b2d24;
}
@media (max-width: 680px) {
  .inventory-header {
    align-items: stretch;
    flex-direction: column;
  }
  .inventory-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .inventory-summary span {
    grid-row: auto;
  }
}
.permission-group {
  border: 1px solid #dce5ed;
  border-radius: 10px;
  padding: 14px;
}
.permission-group legend {
  padding: 0 8px;
  font-weight: 700;
}
.pending-center {
  margin-top: 22px;
}
.executive-summary {
  margin-top: 20px;
}
.executive-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.executive-heading h2 {
  margin: 4px 0 14px;
}
.notification-bell {
  position: relative;
  min-width: 44px;
}
.notification-bell strong {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #c7352b;
  color: #fff;
  font-size: 11px;
  line-height: 20px;
}
.notification-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.notification-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.notification-item.unread {
  border-left: 4px solid var(--orange);
  background: #f8fafc;
}
.notification-item.read {
  opacity: 0.75;
}
.notification-item p {
  margin: 4px 0;
}
.notification-kind {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e5effa;
  color: var(--blue);
  font-weight: 700;
}
@media (max-width: 680px) {
  .notification-item {
    grid-template-columns: 36px 1fr;
  }
  .notification-item button {
    grid-column: 1/-1;
    width: 100%;
  }
}
.pending-center-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.pending-center-heading h2 {
  margin: 3px 0;
}
.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pending-total {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-weight: 700;
}
.user-action-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.user-action-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid #dce5ed;
  border-left: 4px solid var(--orange);
  border-radius: 10px;
  background: #f8fafc;
}
.action-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5effa;
  color: var(--blue);
  font-weight: 700;
}
.action-content p {
  margin: 5px 0;
}
.action-content small {
  color: var(--muted);
}
.pending-empty {
  margin-top: 16px;
  padding: 20px;
  border-radius: 10px;
  background: #edf8f1;
  color: #24633b;
  text-align: center;
}
.pending-empty p {
  margin: 5px 0 0;
}
@media (max-width: 680px) {
  .user-action-card {
    grid-template-columns: 34px 1fr;
  }
  .action-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

body,
button,
input,
textarea,
select,
table,
th,
td,
dialog,
.document-page {
  font-family: 'Poppins', sans-serif;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Days One', sans-serif;
  font-weight: 400;
}
.profile-account {
  margin-bottom: 20px;
}
.loan-location {
  background: #fff7e6;
  border-left: 4px solid #db9b24;
}
.return-attention {
  background: #fff7e6;
  box-shadow: inset 4px 0 0 var(--orange);
}
.return-alert {
  display: inline-block;
  margin-top: 6px;
  color: #a03025;
  font-weight: 700;
  font-size: 12px;
}
.badge.awaiting_almoxarifado {
  background: #fff1d3;
  color: #945c00;
}
.badge.awaiting_final_acceptance {
  background: #e5eef9;
  color: #004693;
}
.badge.rejected {
  background: #fee7e6;
  color: #a03025;
}
.badge.completed {
  background: #e1f5e8;
  color: #19703c;
}
.return-filters {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}
.request-tool-choice {
  align-items: flex-start;
  padding: 0.8rem;
  border: 1px solid var(--border, #d7dde5);
  border-radius: 0.65rem;
  margin: 0.35rem 0;
  background: var(--surface, #fff);
}
.request-tool-choice:has(input:checked) {
  border-color: #004693;
  box-shadow: 0 0 0 2px rgb(0 70 147 / 12%);
}
.request-tool-choice .badge.available {
  background: #e4f5ea;
  color: #176436;
}
.request-tool-choice .badge.maintenance {
  background: #fff0d6;
  color: #7a4b00;
}
.request-tool-choice .badge.loaned {
  background: #e8eef8;
  color: #244d85;
}
