:root {
  --maltez-navy: #003366;
  --maltez-navy-dark: #002d62;
  --maltez-orange: #f7941d;
  --maltez-orange-hover: #ff8c00;
  --maltez-bg: #f8f9fa;
  --maltez-radius: 10px;
  --maltez-shadow: 0 2px 12px rgba(0, 51, 102, 0.08);
  --mz-sidebar-w: 268px;
  --mz-sidebar-collapsed-w: 76px;
  --mz-strip-h: 56px;
  --mz-sidebar-bg: linear-gradient(180deg, #002d62 0%, #003366 45%, #0a4070 100%);
  --mz-transition: 0.22s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .mz-sidebar,
  .mz-content-wrap,
  .mz-sidebar-brand-text,
  .mz-nav-section-title,
  .mz-nav-link-text,
  .mz-sidebar-user-info,
  .mz-icon-chevron,
  .mz-sidebar-overlay {
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--maltez-bg);
  color: #1a1a2e;
  line-height: 1.5;
  min-height: 100vh;
}

body.mz-no-scroll {
  overflow: hidden;
}

a {
  color: var(--maltez-navy);
  text-decoration: none;
}
a:hover {
  color: var(--maltez-orange);
}

/* ——— App shell ——— */
.mz-app-shell {
  display: flex;
  min-height: 100vh;
}

.mz-app-shell-guest .mz-content-wrap {
  flex: 1;
  width: 100%;
  max-width: none;
}

.mz-sidebar-overlay {
  display: none;
}

/* ——— Sidebar ——— */
.mz-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: min(88vw, var(--mz-sidebar-w));
  max-width: var(--mz-sidebar-w);
  height: 100vh;
  height: 100dvh;
  background: var(--mz-sidebar-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 30, 60, 0.18);
  transition: transform var(--mz-transition), width var(--mz-transition);
  transform: translateX(-100%);
}

.mz-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.75rem 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.mz-sidebar-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.32rem;
  padding: 0.46rem 0.6rem 0.56rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.mz-switcher-link {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
  padding: 0.28rem 0.42rem;
  line-height: 1.1;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mz-switcher-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.mz-switcher-link--active {
  color: #fff;
  border-color: rgba(247, 148, 29, 0.55);
  background: rgba(247, 148, 29, 0.26);
}

.mz-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
  min-width: 0;
  flex: 1;
}
.mz-sidebar-brand:hover {
  color: #fff;
  text-decoration: none;
  opacity: 0.95;
}
.mz-sidebar-brand img {
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: contain;
}

.mz-sidebar-brand-text {
  overflow: hidden;
  transition: opacity var(--mz-transition), max-width var(--mz-transition);
}

.mz-sidebar-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.mz-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background var(--mz-transition);
}
.mz-icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.mz-icon-chevron {
  transition: transform var(--mz-transition);
}

body.mz-sidebar-collapsed .mz-icon-chevron {
  transform: rotate(180deg);
}

.mz-collapse-toggle {
  display: none;
}

.mz-sidebar-close-fab {
  display: inline-flex;
}

.mz-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem 0 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mz-sidebar-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.mz-nav-section {
  margin-bottom: 1.25rem;
}

.mz-nav-section-title {
  margin: 0 1rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  transition: opacity var(--mz-transition), height var(--mz-transition);
  overflow: hidden;
}

.mz-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mz-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem 0.55rem 0.85rem;
  margin: 0 0.5rem;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--mz-transition), color var(--mz-transition);
}
.mz-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}

.mz-nav-link.mz-nav-link--active {
  background: rgba(247, 148, 29, 0.22);
  box-shadow: inset 0 0 0 1px rgba(247, 148, 29, 0.4);
}
.mz-nav-link.mz-nav-link--active .mz-nav-link-icon {
  background: rgba(247, 148, 29, 0.35);
  color: #fff;
}

.mz-nav-link-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
  color: var(--maltez-orange);
}
.mz-nav-link-icon svg {
  stroke: currentColor;
}

.mz-nav-link-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--mz-transition), max-width var(--mz-transition);
}

.mz-nav-link-logout {
  margin-top: 0.25rem;
  border: 1px solid rgba(247, 148, 29, 0.35);
}
.mz-nav-link-logout .mz-nav-link-icon {
  background: rgba(247, 148, 29, 0.2);
}

.mz-sidebar-footer {
  flex-shrink: 0;
  padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.12);
}

.mz-sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
  padding: 0 0.35rem;
  min-width: 0;
}

.mz-sidebar-user-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--maltez-orange);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mz-sidebar-user-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  transition: opacity var(--mz-transition), max-width var(--mz-transition);
}

.mz-sidebar-user-email {
  font-size: 0.8rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
}

.mz-sidebar-user-role {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ——— Content area ——— */
.mz-content-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.mz-top-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--mz-strip-h);
  padding: 0 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 0 rgba(0, 51, 102, 0.04);
  position: sticky;
  top: 0;
  z-index: 50;
}

.mz-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 -0.35rem 0 -0.5rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--maltez-navy);
  cursor: pointer;
}
.mz-menu-btn:hover {
  background: rgba(0, 51, 102, 0.06);
}

.mz-top-strip-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--maltez-navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mz-main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

/* ——— Mobile drawer open ——— */
body.mz-sidebar-mobile-open .mz-sidebar-overlay {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(0, 20, 45, 0.5);
  backdrop-filter: blur(2px);
}

body.mz-sidebar-mobile-open .mz-sidebar {
  transform: translateX(0);
}

/* ——— Desktop layout ——— */
@media (min-width: 992px) {
  .mz-sidebar {
    transform: translateX(0);
    width: var(--mz-sidebar-w);
    max-width: none;
  }

  .mz-sidebar-overlay {
    display: none !important;
  }

  body.mz-sidebar-mobile-open .mz-sidebar-overlay {
    display: none !important;
  }

  .mz-menu-btn {
    display: none;
  }

  .mz-top-strip {
    display: none;
  }

  .mz-collapse-toggle {
    display: inline-flex;
  }

  .mz-sidebar-close-fab {
    display: none !important;
  }

  .mz-content-wrap {
    margin-left: var(--mz-sidebar-w);
    transition: margin-left var(--mz-transition);
  }

  body.mz-sidebar-collapsed .mz-content-wrap {
    margin-left: var(--mz-sidebar-collapsed-w);
  }

  body.mz-sidebar-collapsed .mz-sidebar {
    width: var(--mz-sidebar-collapsed-w);
  }

  body.mz-sidebar-collapsed .mz-sidebar-brand-text {
    opacity: 0;
    max-width: 0;
    pointer-events: none;
  }

  body.mz-sidebar-collapsed .mz-nav-section-title {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
  }

  body.mz-sidebar-collapsed .mz-nav-link {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: 0.35rem;
    margin-right: 0.35rem;
  }

  body.mz-sidebar-collapsed .mz-nav-link-text {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    pointer-events: none;
  }

  body.mz-sidebar-collapsed .mz-sidebar-user-info {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    pointer-events: none;
  }

  body.mz-sidebar-collapsed .mz-sidebar-user {
    justify-content: center;
    padding: 0;
  }

  body.mz-sidebar-collapsed .mz-sidebar-header {
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.35rem;
  }

  body.mz-sidebar-collapsed .mz-sidebar-switcher {
    display: none;
  }

  body.mz-sidebar-collapsed .mz-sidebar-brand {
    flex-direction: column;
    justify-content: center;
  }

  body.mz-sidebar-collapsed .mz-sidebar-header-actions {
    flex-direction: column;
  }
}

/* ——— Cards, tables, forms ——— */
.mz-card {
  background: #fff;
  border-radius: var(--maltez-radius);
  padding: 1.25rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--maltez-shadow);
}

@media (min-width: 768px) {
  .mz-card {
    padding: 1.35rem 1.5rem;
  }
}

/* ——— Títulos de página (unificados) ——— */
.mz-page-title {
  margin: 0;
  font-size: clamp(1.3rem, 3.1vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--maltez-navy);
}

.mz-page-lead {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #5c6570;
  max-width: 48rem;
}

.mz-page-header-block {
  margin-bottom: 1.35rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e8ecf1;
}

.mz-section-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--maltez-navy);
}

.mz-section-title + .mz-muted {
  margin-top: 0;
}

.mz-card h1:not(.mz-page-title),
.mz-card h2:not(.mz-section-title) {
  margin-top: 0;
  color: var(--maltez-navy);
}

.mz-btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: var(--maltez-radius);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  text-align: center;
}
.mz-btn-primary {
  background: var(--maltez-navy);
  color: #fff;
}
.mz-btn-primary:hover {
  background: var(--maltez-navy-dark);
  color: #fff;
  text-decoration: none;
}
.mz-btn-accent {
  background: var(--maltez-orange);
  color: #fff;
}
.mz-btn-accent:hover {
  background: var(--maltez-orange-hover);
  color: #fff;
  text-decoration: none;
}
.mz-btn-ghost {
  background: transparent;
  color: var(--maltez-navy);
  border: 2px solid var(--maltez-navy);
}
.mz-btn-ghost:hover {
  background: rgba(0, 51, 102, 0.06);
  text-decoration: none;
}

.mz-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}
table.mz-table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
  font-size: 0.875rem;
}
table.mz-table th,
table.mz-table td {
  padding: 0.65rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid #e8ecf1;
}
table.mz-table th {
  background: rgba(0, 51, 102, 0.06);
  color: var(--maltez-navy);
  font-weight: 600;
}

.mz-form p {
  margin-bottom: 1rem;
}
.mz-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--maltez-navy);
}
.mz-form input[type="text"],
.mz-form input[type="email"],
.mz-form input[type="number"],
.mz-form input[type="password"],
.mz-form input[type="search"],
.mz-form input[type="url"],
.mz-form select,
.mz-form textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cfd6e0;
  border-radius: var(--maltez-radius);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mz-form input:focus,
.mz-form select:focus,
.mz-form textarea:focus {
  outline: none;
  border-color: rgba(247, 148, 29, 0.65);
  box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.15);
}

@media (min-width: 480px) {
  .mz-form input[type="text"],
  .mz-form input[type="email"],
  .mz-form input[type="number"],
  .mz-form input[type="password"],
  .mz-form input[type="search"],
  .mz-form input[type="url"],
  .mz-form select,
  .mz-form textarea {
    max-width: 420px;
  }
}

/* Formulários de operações (cadastros rápidos no estoque) */
.mz-form--ops {
  max-width: 38rem;
}
.mz-form--ops > p {
  margin: 0 0 1rem;
  padding: 1.05rem 1.2rem;
  background: linear-gradient(165deg, #ffffff 0%, #f6f8fb 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 51, 102, 0.06);
}
.mz-form--ops > p:last-of-type {
  margin-bottom: 0.25rem;
}
.mz-form--ops label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.mz-form--ops input[type="text"],
.mz-form--ops input[type="email"],
.mz-form--ops input[type="date"],
.mz-form--ops input[type="number"],
.mz-form--ops input[type="password"],
.mz-form--ops input[type="search"],
.mz-form--ops input[type="url"],
.mz-form--ops select,
.mz-form--ops textarea {
  max-width: none;
  width: 100%;
  padding: 0.72rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 11px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 51, 102, 0.04);
}
.mz-form--ops select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
}
.mz-form--ops textarea {
  min-height: 6.5rem;
  resize: vertical;
}
.mz-form--ops p .helptext,
.mz-form--ops p > span.mz-muted {
  display: block;
  margin-top: 0.45rem;
  line-height: 1.4;
}
.mz-form--ops input:focus,
.mz-form--ops select:focus,
.mz-form--ops textarea:focus {
  outline: none;
  border-color: var(--maltez-orange);
  box-shadow: 0 0 0 4px rgba(247, 148, 29, 0.2), inset 0 1px 2px rgba(0, 51, 102, 0.04);
}
.mz-form--ops input[type="date"] {
  height: 42px;
  min-height: 42px;
  font-size: 0.95rem;
}
.mz-form--ops .mz-actions {
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid #e8ecf1;
}
.mz-form--ops ul:not(.errorlist) {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}
.mz-form--ops ul:not(.errorlist) li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.45rem;
  border-radius: 10px;
  border: 1px solid #e8ecf1;
  background: rgba(255, 255, 255, 0.95);
}
.mz-form--ops ul:not(.errorlist) li:last-child {
  margin-bottom: 0;
}
.mz-form--ops ul:not(.errorlist) li label {
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.9rem;
  color: #1a1a2e;
  margin: 0;
  cursor: pointer;
}
.mz-form--ops input[type="radio"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--maltez-orange);
  width: 1.1rem;
  height: 1.1rem;
}
.mz-card--op {
  overflow: hidden;
}

.mz-form ul.errorlist {
  color: #b00020;
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
}

.mz-messages {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.mz-messages li {
  padding: 0.65rem 1rem;
  border-radius: var(--maltez-radius);
  margin-bottom: 0.35rem;
}
.mz-msg-success {
  background: #e8f5e9;
  color: #1b5e20;
}
.mz-msg-error {
  background: #ffebee;
  color: #b71c1c;
}
.mz-msg-warning {
  background: #fff8e1;
  color: #e65100;
}

.mz-login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  background: linear-gradient(160deg, var(--maltez-bg) 0%, #e8eef5 100%);
}
.mz-login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 45, 98, 0.12);
}
@media (min-width: 480px) {
  .mz-login-card {
    padding: 2rem;
  }
}

.mz-login-card .mz-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--maltez-navy);
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.mz-login-card .mz-brand:hover {
  text-decoration: none;
  color: var(--maltez-navy-dark);
}
.mz-login-card .mz-brand img {
  height: 48px;
  width: auto;
  border-radius: 10px;
}

.mz-muted {
  color: #5c6570;
  font-size: 0.9rem;
}

.mz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Acoes em tabelas: botoes menores e padronizados */
.mz-table-actions {
  margin-top: 0;
  gap: 0.35rem;
  flex-wrap: nowrap;
}
.mz-table-actions form {
  margin: 0;
}
.mz-table-actions .mz-btn {
  min-height: 32px;
  height: 32px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
@media (max-width: 680px) {
  .mz-table-actions {
    flex-wrap: wrap;
  }
  .mz-table-actions .mz-btn {
    min-height: 30px;
    height: 30px;
    font-size: 0.78rem;
    padding: 0.3rem 0.6rem;
  }
}

.mz-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}
.mz-page-head .mz-page-title {
  flex: 1;
  min-width: 0;
}
.mz-page-head + .mz-page-lead {
  margin-bottom: 1rem;
}

.mz-page-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

a.mz-user-link {
  font-weight: 600;
  color: var(--maltez-navy);
}
a.mz-user-link:hover {
  color: var(--maltez-orange);
}

.mz-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.mz-toolbar-row .mz-search-bar {
  flex: 1;
  margin-bottom: 0;
  min-width: 200px;
}
.mz-btn-pdf {
  flex-shrink: 0;
}

.mz-dashboard-filter {
  margin-bottom: 1.35rem;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, rgba(0, 51, 102, 0.05), rgba(247, 148, 29, 0.07));
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.mz-dashboard-filter-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
}
.mz-dashboard-filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}
.mz-dashboard-filter-select {
  padding: 0.55rem 0.9rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font: inherit;
  min-width: 8.5rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mz-dashboard-filter-select:focus {
  outline: none;
  border-color: rgba(247, 148, 29, 0.75);
  box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.15);
}
.mz-dashboard-filter-hint {
  margin: 0.7rem 0 0;
  font-size: 0.86rem;
  color: #5c6570;
  line-height: 1.4;
}

.mz-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}
.mz-search-bar input[type="search"] {
  flex: 1;
  min-width: 160px;
  max-width: 320px;
  padding: 0.62rem 0.95rem;
  border: 2px solid #e2e8f0;
  border-radius: 11px;
  font: inherit;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 51, 102, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mz-search-bar select {
  min-width: 170px;
  max-width: 230px;
  padding: 0.62rem 0.95rem;
  border: 2px solid #e2e8f0;
  border-radius: 11px;
  font: inherit;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 51, 102, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mz-search-bar select:focus {
  outline: none;
  border-color: rgba(247, 148, 29, 0.75);
  box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.15), inset 0 1px 2px rgba(0, 51, 102, 0.04);
}
.mz-search-bar input[type="date"] {
  min-width: 150px;
  max-width: 200px;
  padding: 0.62rem 0.95rem;
  border: 2px solid #e2e8f0;
  border-radius: 11px;
  font: inherit;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 51, 102, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mz-search-bar input[type="search"]:focus {
  outline: none;
  border-color: rgba(247, 148, 29, 0.75);
  box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.15), inset 0 1px 2px rgba(0, 51, 102, 0.04);
}
.mz-search-bar input[type="date"]:focus {
  outline: none;
  border-color: rgba(247, 148, 29, 0.75);
  box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.15), inset 0 1px 2px rgba(0, 51, 102, 0.04);
}

/* Barra unificada de filtros (Ativos > Movimentacoes) */
.mz-asset-filterbar {
  margin-bottom: 1rem;
  padding: 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 51, 102, 0.04), rgba(247, 148, 29, 0.06));
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(170px, 1fr) minmax(150px, 0.9fr) minmax(150px, 0.9fr) auto auto auto;
  gap: 0.6rem;
  align-items: center;
}
.mz-asset-filterbar input[type="search"],
.mz-asset-filterbar input[type="date"],
.mz-asset-filterbar select {
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0.62rem 0.95rem;
  border: 2px solid #e2e8f0;
  border-radius: 11px;
  font: inherit;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 51, 102, 0.04);
}
.mz-asset-filterbar input:focus,
.mz-asset-filterbar select:focus {
  outline: none;
  border-color: rgba(247, 148, 29, 0.75);
  box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.15), inset 0 1px 2px rgba(0, 51, 102, 0.04);
}
.mz-asset-filterbar .mz-btn {
  height: 42px;
  min-height: 42px;
  min-width: 122px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.mz-asset-filterbar--inventory {
  grid-template-columns: minmax(240px, 1.8fr) minmax(200px, 1fr) auto auto auto;
}
.mz-asset-filterbar--acquisition {
  grid-template-columns: minmax(240px, 1.8fr) minmax(170px, 1fr) minmax(170px, 1fr) auto auto auto;
}
.mz-asset-filterbar--dash {
  grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) auto auto;
}

@media (max-width: 1160px) {
  .mz-asset-filterbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .mz-asset-filterbar--inventory {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mz-asset-filterbar--acquisition {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mz-asset-filterbar--dash {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .mz-asset-filterbar {
    grid-template-columns: 1fr;
  }
  .mz-asset-filterbar .mz-btn {
    width: 100%;
  }
}

/* Barra de filtros da tela de movimentacoes */
.mz-stock-mov-filterbar {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 51, 102, 0.04), rgba(247, 148, 29, 0.06));
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.75rem;
}
.mz-stock-mov-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  grid-column: span 3;
}
.mz-stock-mov-field--search {
  grid-column: span 3;
}
.mz-stock-mov-field label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.mz-stock-mov-field input,
.mz-stock-mov-field select {
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0.62rem 0.95rem;
  border: 2px solid #e2e8f0;
  border-radius: 11px;
  font: inherit;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 51, 102, 0.04);
}
.mz-stock-mov-field input:focus,
.mz-stock-mov-field select:focus {
  outline: none;
  border-color: rgba(247, 148, 29, 0.75);
  box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.15), inset 0 1px 2px rgba(0, 51, 102, 0.04);
}
.mz-stock-mov-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: end;
}
.mz-stock-mov-actions .mz-btn {
  height: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
}
@media (max-width: 991px) {
  .mz-stock-mov-field,
  .mz-stock-mov-field--search {
    grid-column: span 6;
  }
}
@media (max-width: 680px) {
  .mz-stock-mov-filterbar {
    grid-template-columns: 1fr;
  }
  .mz-stock-mov-field,
  .mz-stock-mov-field--search,
  .mz-stock-mov-actions {
    grid-column: auto;
  }
  .mz-stock-mov-actions .mz-btn {
    width: 100%;
    justify-content: center;
  }
}

.mz-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e8ecf1;
}
.mz-pagination-info {
  font-size: 0.9rem;
  color: #5c6570;
}

.mz-current-possession-section {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e8ecf1;
}

.mz-dialog {
  border: none;
  border-radius: 14px;
  padding: 0;
  max-width: calc(100vw - 2rem);
  width: 400px;
  box-shadow: 0 16px 48px rgba(0, 30, 60, 0.25);
}
.mz-dialog::backdrop {
  background: rgba(0, 20, 45, 0.45);
}
.mz-dialog-panel {
  padding: 1.35rem 1.5rem;
}
.mz-dialog-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--maltez-navy);
}
.mz-dialog-message {
  margin: 0 0 1.25rem;
  color: #1a1a2e;
  line-height: 1.45;
}
.mz-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.mz-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.mz-kpi {
  background: linear-gradient(135deg, rgba(0, 51, 102, 0.06), rgba(247, 148, 29, 0.08));
  border-radius: var(--maltez-radius);
  padding: 1rem;
  text-align: center;
  border: 1px solid #e8ecf1;
}
.mz-kpi-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--maltez-navy);
}
.mz-kpi-label {
  font-size: 0.78rem;
  color: #5c6570;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mz-chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 900px) {
  .mz-chart-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.mz-chart-card .mz-section-title {
  margin-bottom: 0.25rem;
}
.mz-chart-canvas-wrap {
  position: relative;
  height: 240px;
  margin-top: 0.5rem;
}
.mz-chart-canvas-wrap--sm {
  height: 220px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.mz-form ul:not(.errorlist) {
  list-style: none;
  padding-left: 0;
  margin: 0.35rem 0 0;
}
.mz-form ul:not(.errorlist) li {
  margin-bottom: 0.35rem;
}
.mz-form input[type="radio"] {
  margin-right: 0.35rem;
  vertical-align: middle;
}

.mz-tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}
.mz-tag-open {
  background: rgba(0, 51, 102, 0.12);
  color: var(--maltez-navy);
}
.mz-tag-done {
  background: rgba(46, 125, 50, 0.15);
  color: #1b5e20;
}

.mz-badge-inactive {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.12rem 0.46rem;
  border-radius: 999px;
  border: 1.5px solid #d32f2f;
  color: #d32f2f;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
  vertical-align: middle;
}

.mz-inventory-total {
  margin: 0.75rem 0 1rem;
  font-size: 0.95rem;
  color: var(--maltez-navy, #003366);
}

.mz-section-title--spaced {
  margin-top: 1.5rem;
}

.mz-select-filter-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
}

.mz-select-filter-wrap .mz-select-filter-input {
  width: 100%;
  max-width: 32rem;
}

.mz-form--ops select.mz-filterable-select {
  max-height: 16rem;
}
