@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");
:root {
  font-family: Inter, system-ui, sans-serif;
  color: #1e3a5f;
  background: #f1f5f9;
  --bg: #f1f5f9;
  --card: #fff;
  --ink: #1e3a5f;
  --muted: #58677b;
  --line: #dde4ed;
  --red: #dc2626;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
body.dark {
  --bg: #101b2a;
  --card: #18283c;
  --ink: #e5edf7;
  --muted: #afbdd0;
  --line: #34465c;
  background: var(--bg);
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
.button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 11px 17px;
  font-weight: 600;
  cursor: pointer;
  background: var(--ink);
  color: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: #dc2626;
  color: white;
}
.success {
  background: #047857;
  color: white;
}
.secondary {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
}
.danger {
  background: #fee2e2;
  color: #991b1b;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}
.logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1.4px;
  color: var(--ink);
}
.logo b {
  color: #dc2626;
}
.sidebar {
  position: fixed;
  width: 240px;
  inset: 0 auto 0 0;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.sidebar small {
  display: block;
  color: var(--muted);
  margin: 7px 0 36px;
}
.navlink {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 13px;
  margin: 4px 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}
.navlink.active {
  background: #fee2e2;
  color: #b91c1c;
}
.sidebar footer {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.main {
  margin-left: 240px;
  padding: 28px 40px;
  max-width: 1600px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 12px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  font-size: 11px;
  color: var(--muted);
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 6px 0 8px;
  font-weight: 800;
}
h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 18px;
}
h3 {
  font-weight: 700;
  margin: 4px 0 8px;
}
p {
  line-height: 1.6;
}
.muted,
small {
  color: var(--muted);
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.grid {
  display: grid;
  gap: 20px;
}
.cols2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cols4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 5px 20px #172b4d05;
  margin-bottom: 20px;
}
.hero {
  background: #1e3a5f;
  color: white;
  position: relative;
  overflow: hidden;
  padding: 32px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hero p {
  color: #cbd7e9;
  max-width: 470px;
}
.hero-art {
  width: 130px;
  height: 130px;
  border: 1px solid #ffffff35;
  border-radius: 30px;
  display: grid;
  place-items: center;
  transform: rotate(-8deg);
  background: #ffffff0a;
}
.hero-art svg {
  width: 64px;
  height: 64px;
}
.kpi strong {
  font-size: 32px;
  display: block;
  margin: 14px 0 5px;
}
.kpi p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.iconbox {
  background: #fff1f2;
  color: #b91c1c;
  border-radius: 12px;
  padding: 12px;
  display: inline-flex;
}
.pill {
  display: inline-block;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 30px;
  background: #e2e8f0;
  color: #475569;
}
.conforme {
  background: #d1fae5;
  color: #065f46;
}
.atencao {
  background: #fef3c7;
  color: #92400e;
}
.naoConforme {
  background: #fee2e2;
  color: #991b1b;
}
.section {
  margin-top: 26px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 15px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 9px;
  padding: 11px;
  margin-top: 7px;
}
textarea {
  min-height: 95px;
}
input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  accent-color: #dc2626;
}
input[type="file"] {
  font-size: 13px;
}
.login {
  max-width: 460px;
  margin: 8vh auto;
  padding: 32px;
}
.login .logo {
  margin-bottom: 28px;
}
.notice {
  padding: 13px 16px;
  border-radius: 10px;
  background: #fffbeb;
  color: #854d0e;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.tablewrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 16px 10px;
  border-bottom: 1px solid var(--line);
}
td button {
  padding: 8px;
}
.empty {
  text-align: center;
  padding: 36px;
  color: var(--muted);
}
.bottomnav {
  display: none;
}
.badge {
  background: #dc2626;
  color: white;
  border-radius: 20px;
  padding: 2px 7px;
  font-size: 11px;
}
.checkitem {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.checkitem label {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.checkitem input[type="checkbox"] {
  appearance: none;
  flex-shrink: 0;
  width: 46px;
  height: 26px;
  border-radius: 20px;
  background: #b91c1c;
  position: relative;
  border: 0;
}
.checkitem input[type="checkbox"]:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  transition: transform 0.3s;
}
.checkitem input:checked {
  background: #047857;
}
.checkitem input:checked:before {
  transform: translateX(20px);
}
.checkitem:has(input:not(:checked)) {
  color: #b91c1c;
}
.checkitem textarea {
  margin-top: 14px;
}
.floor {
  position: relative;
  min-height: 370px;
  border: 3px solid var(--line);
  border-radius: 20px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 79px,
      var(--line) 80px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 79px,
      var(--line) 80px
    );
  margin: 20px 0;
}
.floor:before {
  content: "CORREDOR CENTRAL · POSIÇÕES ESQUEMÁTICAS";
  position: absolute;
  top: 47%;
  left: 5%;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
}
.pin {
  position: absolute;
  min-width: 44px;
  border-radius: 50%;
  border: 3px solid var(--card);
  padding: 8px;
  box-shadow: 0 3px 8px #0002;
}
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}
.tabs button {
  white-space: nowrap;
}
.photo {
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 12px;
}
.chart {
  height: 270px;
}
.chart canvas {
  max-height: 270px;
}
#reader {
  max-width: 600px;
  margin: auto;
  min-height: 230px;
  border: 2px solid #dc2626;
  border-radius: 16px;
  overflow: hidden;
}
#assinatura {
  width: 100%;
  height: 300px;
  background: white;
  border: 2px dashed #94a3b8;
  touch-action: none;
  border-radius: 12px;
}
#toasts {
  position: fixed;
  bottom: 95px;
  right: 20px;
  z-index: 100;
  max-width: calc(100% - 40px);
}
.toast {
  background: #1e3a5f;
  color: white;
  padding: 15px 22px;
  border-radius: 12px;
  margin-top: 8px;
  box-shadow: 0 8px 30px #0003;
}
dialog {
  width: min(560px, 94vw);
  border: 0;
  border-radius: 18px;
  padding: 28px;
  background: var(--card);
  color: var(--ink);
}
dialog::backdrop {
  background: #0f172a99;
}
#splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 25px;
  text-align: center;
  animation: fade 0.5s;
}
#splash .logo {
  font-size: 44px;
}
.loading {
  height: 4px;
  width: 180px;
  background: #dc2626;
  margin-top: 22px;
  animation: load 2s infinite;
  transform-origin: left;
}
.skip {
  position: fixed;
  top: -80px;
  z-index: 300;
  background: white;
  padding: 15px;
}
.skip:focus {
  top: 0;
}
svg {
  width: 20px;
  height: 20px;
}
.hide {
  display: none !important;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes load {
  from {
    transform: scaleX(0.1);
  }
  to {
    transform: scaleX(1);
  }
}
@media (max-width: 1023px) {
  .sidebar {
    display: none;
  }
  .main {
    margin: 0;
    padding: 24px 20px 100px;
  }
  .bottomnav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: var(--card);
    border-top: 1px solid var(--line);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .bottomnav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    text-decoration: none;
    min-width: 52px;
    min-height: 44px;
    padding: 5px;
  }
  .bottomnav .active {
    color: #dc2626;
  }
  .cols4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 639px) {
  .cols2 {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 24px;
  }
  .hero-art {
    display: none;
  }
  h1 {
    font-size: 25px;
  }
  .card {
    padding: 19px;
  }
  .topbar {
    margin-bottom: 20px;
  }
  .login {
    margin: 25px 15px;
  }
  .kpi strong {
    font-size: 27px;
  }
  .main {
    padding: 20px 16px 100px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  body > *:not(#modal) {
    display: none;
  }
  dialog {
    position: static;
    border: 0;
  }
  dialog button {
    display: none;
  }
}
body h1 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 6px 0 12px;
}
body h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 18px;
}
body h3 {
  font-weight: 700;
  margin: 4px 0 8px;
}
body p {
  margin: 0 0 16px;
  line-height: 1.6;
}
body button,
body .button {
  padding: 11px 17px;
  min-height: 44px;
}
body input,
body select,
body textarea {
  padding: 11px;
}
body .topbar > .row {
  flex-wrap: nowrap;
}
body .hero h1 {
  font-size: 32px;
  max-width: 500px;
}
body .hero .primary {
  margin-top: 5px;
}
body #toasts .toast:not(:last-child) {
  display: none;
}
@media (max-width: 639px) {
  body h1 {
    font-size: 25px;
  }
  body .hero h1 {
    font-size: 28px;
  }
  body .topbar {
    gap: 8px;
  }
  body .topbar .button {
    padding: 10px;
  }
  body .topbar .eyebrow {
    font-size: 9px;
  }
}
