:root {
  --mc-red: #d71919;
  --mc-red-dark: #a80f0f;
  --mc-yellow: #f5c400;
  --mc-black: #0a0a0b;
  --mc-sidebar: #111214;
  --mc-sidebar-soft: #1b1c20;
  --mc-white: #ffffff;
  --mc-bg: #f4f5f7;
  --mc-text: #202124;
  --mc-muted: #70757d;
  --mc-border: #e3e5e8;
  --mc-success: #138a4a;
  --mc-warning: #c68100;
  --mc-danger: #c62828;
  --mc-radius: 14px;
  --mc-sidebar-width: 260px;
  --mc-shadow: 0 12px 32px rgba(20, 23, 30, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--mc-text);
  background: var(--mc-bg);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.admin-shell {
  min-height: 100vh;
}

.admin-sidebar {
  position: fixed;
  z-index: 100;
  inset: 0 auto 0 0;
  width: var(--mc-sidebar-width);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 18% 3%,
      rgba(215, 25, 25, 0.18),
      transparent 25%
    ),
    linear-gradient(180deg, #111923 0%, #0d1620 100%);
  color: #fff;
  box-shadow: 10px 0 30px rgba(8, 15, 24, 0.12);
  transition:
    transform 220ms ease,
    width 220ms ease;
}

.admin-brand {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand-link {
  min-width: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.admin-brand-logo {
  width: 190px;
  max-width: 100%;
  height: 68px;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.admin-sidebar-close {
  width: 38px;
  height: 38px;
  display: none;
  flex: 0 0 38px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.admin-sidebar-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-navigation {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 8px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.admin-navigation::-webkit-scrollbar {
  width: 6px;
}

.admin-navigation::-webkit-scrollbar-track {
  background: transparent;
}

.admin-navigation::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
}

.admin-nav-link,
.admin-nav-group-summary {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  list-style: none;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.admin-nav-group-summary::-webkit-details-marker {
  display: none;
}

.admin-nav-link:hover,
.admin-nav-group-summary:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.admin-nav-link.is-active,
.admin-nav-group-summary.is-active {
  background: linear-gradient(135deg, #ef2634, #d71919);
  color: #fff;
  box-shadow: 0 8px 20px rgba(215, 25, 25, 0.22);
}

.admin-nav-link.is-active:hover,
.admin-nav-group-summary.is-active:hover {
  transform: none;
}

.admin-nav-icon {
  width: 23px;
  height: 23px;
  display: grid;
  flex: 0 0 23px;
  place-items: center;
}

.admin-nav-icon svg,
.admin-nav-arrow {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-nav-text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-nav-arrow {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  opacity: 0.76;
  transition: transform 160ms ease;
}

.admin-nav-group[open] > .admin-nav-group-summary .admin-nav-arrow {
  transform: rotate(90deg);
}

.admin-nav-group {
  margin: 2px 0;
}

.admin-nav-submenu {
  display: grid;
  gap: 2px;
  padding: 4px 0 7px 42px;
}

.admin-nav-sublink {
  position: relative;
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 7px 10px 7px 16px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.admin-nav-sublink::before {
  content: "";
  position: absolute;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
}

.admin-nav-sublink:hover,
.admin-nav-sublink.is-active {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.admin-nav-sublink.is-active::before {
  background: var(--mc-red);
  box-shadow: 0 0 0 4px rgba(215, 25, 25, 0.15);
}

.admin-sidebar-support {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 10px 14px 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-sidebar-support-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  color: #fff;
}

.admin-sidebar-support-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-sidebar-support-copy {
  min-width: 0;
}

.admin-sidebar-support-copy strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.8rem;
}

.admin-sidebar-support-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.68rem;
  line-height: 1.45;
}

.admin-sidebar-support-button {
  grid-column: 1 / -1;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mc-yellow);
  border-radius: 8px;
  color: var(--mc-yellow);
  font-size: 0.74rem;
  font-weight: 900;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.admin-sidebar-support-button:hover {
  background: var(--mc-yellow);
  color: #111;
}

.admin-sidebar-legal {
  display: grid;
  gap: 2px;
  padding: 8px 18px 14px;
  color: rgba(255, 255, 255, 0.74);
}

.admin-sidebar-legal strong {
  font-size: 0.68rem;
}

.admin-sidebar-legal small {
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.62rem;
}

.admin-sidebar-footer {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.12);
}

.admin-sidebar-footer div {
  min-width: 0;
  display: grid;
}

.admin-sidebar-footer strong,
.admin-sidebar-footer small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sidebar-footer strong {
  font-size: 0.78rem;
}

.admin-sidebar-footer small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
}

.admin-user-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--mc-red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(215, 25, 25, 0.24);
}

.admin-main {
  min-height: 100vh;
  margin-left: var(--mc-sidebar-width);
}

/* =========================================================
   TOPBAR FINAL — MOCKUP MOTOKIDS
   ========================================================= */

.admin-topbar {
  position: sticky;
  z-index: 80;
  top: 0;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--mc-border);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 10px rgba(20, 23, 30, 0.03);
  backdrop-filter: blur(14px);
}

.admin-topbar-left {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 14px;
}

.admin-topbar-heading {
  min-width: 0;
}

.admin-topbar-heading h1,
.admin-topbar-heading p {
  margin: 0;
}

.admin-topbar-heading h1 {
  overflow: hidden;
  color: #111827;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-topbar-heading p {
  margin-top: 3px;
  overflow: hidden;
  color: var(--mc-muted);
  font-size: 0.76rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex: 0 0 42px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--mc-border);
  border-radius: 10px;
  background: #fff;
  color: #172033;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.admin-menu-toggle:hover {
  border-color: rgba(215, 25, 25, 0.4);
  background: #fff5f5;
  color: var(--mc-red);
}

.admin-menu-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-topbar-actions {
  min-width: 0;
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.admin-search {
  width: min(320px, 30vw);
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 5px 0 13px;
  border: 1px solid var(--mc-border);
  border-radius: 10px;
  background: #f8f9fb;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.admin-search:focus-within {
  border-color: rgba(215, 25, 25, 0.52);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(215, 25, 25, 0.08);
}

.admin-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
  font-size: 0.82rem;
}

.admin-search input::placeholder {
  color: #8b93a1;
}

.admin-search-button {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5f6877;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.admin-search-button:hover {
  background: #fff;
  color: var(--mc-red);
}

.admin-search-button svg,
.admin-icon-button svg,
.admin-profile-arrow,
.admin-profile-dropdown-link svg,
.admin-profile-logout svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-icon-button {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--mc-border);
  border-radius: 10px;
  background: #fff;
  color: #263043;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.admin-icon-button:hover {
  border-color: rgba(215, 25, 25, 0.38);
  background: #fff5f5;
  color: var(--mc-red);
  transform: translateY(-1px);
}

.admin-notification-count {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--mc-red);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
}

.admin-profile-menu {
  position: relative;
  flex: 0 0 auto;
}

.admin-profile-menu > summary {
  list-style: none;
}

.admin-profile-menu > summary::-webkit-details-marker {
  display: none;
}

.admin-profile-summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px 4px 4px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #172033;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.admin-profile-summary:hover,
.admin-profile-menu[open] > .admin-profile-summary {
  border-color: var(--mc-border);
  background: #f8f9fb;
}

.admin-profile-copy {
  min-width: 0;
  max-width: 155px;
  display: grid;
  text-align: left;
}

.admin-profile-copy strong,
.admin-profile-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-profile-copy strong {
  font-size: 0.76rem;
}

.admin-profile-copy small {
  color: var(--mc-muted);
  font-size: 0.66rem;
}

.admin-profile-arrow {
  width: 16px;
  height: 16px;
  color: #7a8391;
  transition: transform 160ms ease;
}

.admin-profile-menu[open] .admin-profile-arrow {
  transform: rotate(180deg);
}

.admin-profile-dropdown {
  position: absolute;
  z-index: 120;
  right: 0;
  top: calc(100% + 10px);
  width: 280px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--mc-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(20, 23, 30, 0.16);
}

.admin-profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px;
}

.admin-profile-dropdown-header > div {
  min-width: 0;
}

.admin-profile-dropdown-header strong,
.admin-profile-dropdown-header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-profile-dropdown-header strong {
  color: #172033;
  font-size: 0.82rem;
}

.admin-profile-dropdown-header small {
  margin-top: 2px;
  color: var(--mc-muted);
  font-size: 0.68rem;
}

.admin-profile-dropdown-divider {
  height: 1px;
  margin: 7px 0;
  background: var(--mc-border);
}

.admin-profile-dropdown-link,
.admin-profile-logout {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #263043;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.admin-profile-dropdown-link:hover {
  background: #f5f6f8;
  color: #111827;
}

.admin-profile-logout {
  color: var(--mc-red);
}

.admin-profile-logout:hover {
  background: #fff1f1;
}

.admin-logout-form {
  margin: 0;
}

.admin-user-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mc-red), #f02b2b);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(215, 25, 25, 0.22);
}

.admin-menu-toggle:focus-visible,
.admin-search-button:focus-visible,
.admin-icon-button:focus-visible,
.admin-profile-summary:focus-visible,
.admin-profile-dropdown-link:focus-visible,
.admin-profile-logout:focus-visible {
  outline: 3px solid rgba(215, 25, 25, 0.18);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  .admin-search {
    width: min(250px, 26vw);
  }

  .admin-profile-copy {
    max-width: 120px;
  }
}

@media (max-width: 980px) {
  .admin-search {
    display: none;
  }
}

@media (max-width: 850px) {
  .admin-menu-toggle {
    display: grid;
  }
}

@media (max-width: 620px) {
  .admin-topbar {
    min-height: 72px;
    gap: 10px;
    padding: 10px 14px;
  }

  .admin-topbar-heading p {
    display: none;
  }

  .admin-topbar-heading h1 {
    font-size: 1.05rem;
  }

  .admin-topbar-actions {
    gap: 6px;
  }

  .admin-icon-button {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .admin-profile-copy,
  .admin-profile-arrow {
    display: none;
  }

  .admin-profile-summary {
    min-height: 40px;
    padding: 1px;
  }

  .admin-profile-dropdown {
    right: -2px;
    width: min(280px, calc(100vw - 28px));
  }
}

@media (max-width: 420px) {
  .admin-topbar-heading {
    max-width: 130px;
  }

  .admin-topbar-actions > .admin-icon-button:nth-of-type(2) {
    display: none;
  }
}

.admin-content {
  padding: 30px;
}

.admin-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.admin-page-heading h2,
.admin-page-heading p {
  margin: 0;
}

.admin-page-heading h2 {
  margin-bottom: 6px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.admin-page-heading > div > p:last-child {
  color: var(--mc-muted);
}

.admin-page-eyebrow {
  color: var(--mc-red);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-primary-button,
.admin-secondary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.admin-primary-button {
  border: 1px solid var(--mc-red);
  background: linear-gradient(135deg, var(--mc-red), #f02b2b);
  color: #fff;
}

.admin-secondary-button {
  border: 1px solid var(--mc-border);
  background: #fff;
  color: var(--mc-text);
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.admin-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
  background: #fff;
  box-shadow: var(--mc-shadow);
}

.admin-stat-icon {
  width: 48px;
  height: 48px;
  display: grid;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 13px;
  background: #fff1f1;
  color: var(--mc-red);
  font-size: 0.7rem;
  font-weight: 900;
}

.admin-stat-card p,
.admin-stat-card strong,
.admin-stat-card small {
  display: block;
  margin: 0;
}

.admin-stat-card p {
  color: var(--mc-muted);
  font-size: 0.72rem;
}

.admin-stat-card strong {
  margin: 3px 0;
  font-size: 1.22rem;
}

.admin-stat-card small {
  color: #979ba1;
  font-size: 0.66rem;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.admin-panel {
  min-width: 0;
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius);
  background: #fff;
  box-shadow: var(--mc-shadow);
}

.admin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--mc-border);
}

.admin-panel-heading h3,
.admin-panel-heading p {
  margin: 0;
}

.admin-panel-heading h3 {
  margin-top: 3px;
  font-size: 1rem;
}

.admin-panel-heading > a {
  color: var(--mc-red);
  font-size: 0.74rem;
  font-weight: 900;
  text-decoration: none;
}

.admin-empty-state {
  display: grid;
  min-height: 310px;
  place-items: center;
  align-content: center;
  padding: 35px;
  text-align: center;
}

.admin-empty-state > span {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1f2f4;
  color: var(--mc-muted);
  font-size: 1.5rem;
}

.admin-empty-state h4 {
  margin: 16px 0 5px;
}

.admin-empty-state p {
  max-width: 340px;
  margin: 0 0 18px;
  color: var(--mc-muted);
  font-size: 0.82rem;
}

.admin-empty-state-small {
  min-height: 310px;
}

.admin-alert {
  padding: 12px 14px;
  margin-bottom: 15px;
  border-radius: 8px;
  font-size: 0.8rem;
}

.admin-alert-success {
  background: #e4f7eb;
  color: #176437;
}

.admin-alert-error {
  background: #ffe5e5;
  color: #8d1717;
}

.admin-alert-warning {
  background: #fff2d5;
  color: #775000;
}

.admin-alert-info {
  background: #e6f1ff;
  color: #1c4f8b;
}


/* =========================================================
   RODAPÉ ADMINISTRATIVO
   ========================================================= */

.admin-footer {
  min-height: 62px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px 30px;
  border-top: 1px solid var(--mc-border);
  background: #fff;
  color: var(--mc-muted);
  font-size: 0.72rem;
}

.admin-footer-access,
.admin-footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-footer-access {
  justify-content: center;
}

.admin-footer-access svg,
.admin-footer-brand svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-footer-brand svg {
  color: var(--mc-red);
}

@media (max-width: 760px) {
  .admin-footer {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  .admin-footer-access,
  .admin-footer-brand {
    justify-content: center;
  }
}


/* =========================================================
   LOGIN MOTOKIDS
   ========================================================= */

.auth-body {
  min-height: 100vh;
  overflow-x: hidden;
  background: #f5f6f8;
}

.mk-login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns:
    minmax(360px, 38%)
    minmax(0, 62%);
  background: #f6f7f9;
}

.mk-login-showcase {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background: #07111a;
}

.mk-login-showcase-bg {
  position: absolute;
  z-index: 1;
  inset: 0;
  background-image: url("/assets/admin/images/login-rider.webp");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  transform: scale(1.015);
}

.mk-login-showcase-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(3, 10, 16, 0.82) 0%,
      rgba(3, 10, 16, 0.67) 34%,
      rgba(3, 10, 16, 0.2) 60%,
      rgba(3, 10, 16, 0.72) 100%
    ),
    linear-gradient(
      90deg,
      rgba(3, 10, 16, 0.18),
      rgba(3, 10, 16, 0.05)
    );
}

.mk-login-showcase-content {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding:
    clamp(30px, 4vw, 58px)
    clamp(28px, 4vw, 62px)
    32px;
}

.mk-login-logo {
  width: min(300px, 88%);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.mk-login-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.mk-login-welcome {
  max-width: 410px;
  margin-top: clamp(45px, 8vh, 90px);
}

.mk-login-welcome h1 {
  margin: 0 0 22px;
  font-size: clamp(2rem, 3.2vw, 3.55rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.mk-login-welcome p {
  max-width: 390px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.95rem, 1.25vw, 1.2rem);
  line-height: 1.65;
}

.mk-login-benefits {
  display: grid;
  gap: 18px;
  margin-top: auto;
  padding-top: 65px;
}

.mk-login-benefit {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.mk-login-benefit-icon {
  width: 54px;
  height: 54px;
  display: grid;
  flex: 0 0 54px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 10px;
  background: rgba(7, 17, 26, 0.46);
  color: #ffc400;
  font-size: 1.35rem;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.mk-login-benefit > div {
  min-width: 0;
}

.mk-login-benefit strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.93rem;
}

.mk-login-benefit p {
  max-width: 310px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  line-height: 1.5;
}

.mk-login-copyright {
  margin: 34px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
}

.mk-login-main {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    110px
    clamp(24px, 6vw, 90px)
    70px;
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(255, 255, 255, 0.98),
      rgba(246, 247, 249, 0.88) 55%,
      #f1f3f6 100%
    );
}

.mk-login-card {
  width: min(570px, 100%);
  padding:
    clamp(36px, 5vw, 66px)
    clamp(28px, 5vw, 62px);
  border: 1px solid rgba(225, 228, 233, 0.82);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow:
    0 26px 75px rgba(39, 50, 67, 0.12),
    0 4px 16px rgba(39, 50, 67, 0.04);
  backdrop-filter: blur(16px);
}

.mk-login-card-heading {
  margin-bottom: 42px;
}

.mk-login-card-heading h2 {
  margin: 0 0 12px;
  color: #0b111c;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.mk-login-card-heading p {
  margin: 0;
  color: #5e6878;
  font-size: 0.98rem;
}

.mk-login-form {
  display: grid;
  gap: 23px;
}

.mk-login-field {
  display: grid;
  gap: 9px;
}

.mk-login-field > label {
  color: #101724;
  font-size: 0.86rem;
  font-weight: 800;
}

.mk-login-input {
  position: relative;
  min-height: 58px;
  display: flex;
  align-items: center;
  border: 1px solid #cfd4db;
  border-radius: 10px;
  background: #fff;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.mk-login-input:focus-within {
  border-color: #e30613;
  box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.09);
}

.mk-login-input-icon {
  width: 54px;
  display: grid;
  flex: 0 0 54px;
  place-items: center;
  color: #162032;
  font-size: 1.17rem;
}

.mk-login-input input {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 10px 14px 10px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
  font-size: 0.94rem;
}

.mk-login-input input::placeholder {
  color: #778091;
}

.mk-login-input input[type="password"] {
  padding-right: 78px;
}

.mk-password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  min-height: 36px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #162032;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  transform: translateY(-50%);
}

.mk-password-toggle:hover {
  background: #f4f5f7;
  color: #e30613;
}

.mk-login-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -11px;
}

.mk-login-forgot-row a {
  color: #e30613;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.mk-login-forgot-row a:hover {
  text-decoration: underline;
}

.mk-login-remember {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #263043;
  font-size: 0.81rem;
  cursor: pointer;
}

.mk-login-remember input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.mk-login-checkmark {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid #cfd4db;
  border-radius: 5px;
  background: #fff;
  color: transparent;
  font-size: 0.82rem;
  font-weight: 900;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.mk-login-remember input:checked + .mk-login-checkmark {
  border-color: #e30613;
  background: #e30613;
  color: #fff;
}

.mk-login-remember input:focus-visible + .mk-login-checkmark {
  outline: 3px solid rgba(227, 6, 19, 0.18);
  outline-offset: 2px;
}

.mk-login-submit {
  min-height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
  padding: 0 22px;
  border: 0;
  border-radius: 9px;
  background:
    linear-gradient(
      135deg,
      #e40012 0%,
      #f20a18 55%,
      #df0010 100%
    );
  color: #fff;
  font-size: 0.98rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 11px 24px rgba(227, 6, 19, 0.18);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.mk-login-submit:hover {
  filter: brightness(1.035);
  transform: translateY(-1px);
  box-shadow: 0 14px 29px rgba(227, 6, 19, 0.24);
}

.mk-login-submit:active {
  transform: translateY(0);
  box-shadow: 0 7px 16px rgba(227, 6, 19, 0.16);
}

.mk-login-contact {
  margin: 42px 0 0;
  color: #5e6878;
  font-size: 0.8rem;
  text-align: center;
}

.mk-login-contact a {
  margin-left: 5px;
  color: #e30613;
  font-weight: 800;
  text-decoration: underline;
}

.mk-login-submit:focus-visible,
.mk-password-toggle:focus-visible,
.mk-login-forgot-row a:focus-visible,
.mk-login-contact a:focus-visible,
.mk-login-logo:focus-visible {
  outline: 3px solid rgba(227, 6, 19, 0.2);
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .mk-login-page {
    grid-template-columns:
      minmax(330px, 42%)
      minmax(0, 58%);
  }

  .mk-login-main {
    padding-right: 35px;
    padding-left: 35px;
  }

  .mk-login-card {
    padding: 42px 34px;
  }

  .mk-login-benefits {
    gap: 14px;
  }
}

@media (max-width: 850px) {
  .mk-login-page {
    grid-template-columns: 1fr;
  }

  .mk-login-showcase {
    display: none;
  }

  .mk-login-main {
    min-height: 100vh;
    padding:
      100px
      22px
      110px;
  }

  .mk-login-card {
    width: min(560px, 100%);
  }

}

@media (max-width: 560px) {
  .mk-login-main {
    display: block;
    padding:
      82px
      14px
      120px;
  }

  .mk-login-card {
    padding: 32px 20px;
    border-radius: 18px;
  }

  .mk-login-card-heading {
    margin-bottom: 30px;
  }

  .mk-login-card-heading h2 {
    font-size: 1.85rem;
  }

  .mk-login-card-heading p {
    font-size: 0.84rem;
  }

  .mk-login-form {
    gap: 19px;
  }

  .mk-login-input {
    min-height: 54px;
  }

  .mk-login-input input {
    min-height: 52px;
  }

  .mk-login-input-icon {
    width: 46px;
    flex-basis: 46px;
  }

  .mk-login-submit,
  .mk-login-contact {
    margin-top: 32px;
  }

}

/* =========================================================
   MELHORIAS DO LOGIN: ÍCONES, IDIOMA E SEGURANÇA
   ========================================================= */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  margin: -1px;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.mk-login-column {
  width: min(570px, 100%);
  display: grid;
  gap: 32px;
}

.mk-login-column .mk-login-card {
  width: 100%;
}

.mk-login-benefit-icon svg,
.mk-login-input-icon svg,
.mk-password-eye,
.mk-language-button svg,
.mk-login-security-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mk-login-benefit-icon svg {
  width: 25px;
  height: 25px;
}

.mk-password-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
}

.mk-password-toggle.is-visible .mk-password-eye {
  opacity: 0.55;
}

.mk-language-selector {
  position: absolute;
  z-index: 20;
  right: clamp(24px, 6vw, 80px);
  top: 27px;
}

.mk-language-button {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #101827;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.mk-language-button:hover,
.mk-language-button[aria-expanded="true"] {
  border-color: #dfe3e8;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(22, 32, 50, 0.07);
}

.mk-language-arrow {
  width: 17px !important;
  height: 17px !important;
  transition: transform 160ms ease;
}

.mk-language-button[aria-expanded="true"] .mk-language-arrow {
  transform: rotate(180deg);
}

.mk-language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 210px;
  overflow: hidden;
  padding: 7px;
  border: 1px solid #e0e4e9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(22, 32, 50, 0.13);
}

.mk-language-menu[hidden] {
  display: none;
}

.mk-language-option {
  width: 100%;
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #263043;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}

.mk-language-option:hover,
.mk-language-option.is-active {
  background: #fff1f2;
  color: #d71919;
}

.mk-language-option:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.mk-language-option small {
  color: #8a929e;
  font-size: 0.68rem;
  font-weight: 800;
}

.mk-login-security {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 13px;
  padding: 4px 20px 0;
  color: #182130;
  text-align: left;
}

.mk-login-security-icon {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  color: #f5b900;
}

.mk-login-security strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.87rem;
}

.mk-login-security p {
  max-width: 340px;
  margin: 0;
  color: #606a78;
  font-size: 0.74rem;
  line-height: 1.5;
}

.mk-language-button:focus-visible,
.mk-language-option:focus-visible,
.mk-login-submit:focus-visible,
.mk-password-toggle:focus-visible,
.mk-login-forgot-row a:focus-visible,
.mk-login-contact a:focus-visible,
.mk-login-logo:focus-visible {
  outline: 3px solid rgba(227, 6, 19, 0.2);
  outline-offset: 3px;
}

@media (max-width: 850px) {
  .mk-language-selector {
    right: 22px;
    top: 20px;
  }

  .mk-login-column {
    gap: 25px;
  }
}

@media (max-width: 560px) {
  .mk-language-selector {
    right: 14px;
    top: 14px;
  }

  .mk-language-button {
    min-height: 42px;
    padding: 0 9px;
    font-size: 0.78rem;
  }

  .mk-language-menu {
    width: 185px;
  }

  .mk-login-security {
    padding-inline: 8px;
  }
}

.admin-sidebar-overlay {
  display: none;
}

@media (max-width: 1100px) {
  .admin-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 850px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .admin-sidebar-close,
  .admin-menu-toggle {
    display: block;
  }

  .admin-main {
    margin-left: 0;
  }

  .admin-sidebar-overlay {
    position: fixed;
    z-index: 90;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.52);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 200ms ease,
      visibility 200ms ease;
  }

  .admin-sidebar-overlay.is-visible {
    opacity: 1;
    visibility: visible;
  }

  .admin-search,
  .admin-profile-copy {
    display: none;
  }

}

@media (max-width: 620px) {
  .admin-topbar {
    min-height: 72px;
    padding: 12px 15px;
  }

  .admin-topbar-left p {
    display: none;
  }

  .admin-topbar-left h1 {
    font-size: 1.06rem;
  }

  .admin-content {
    padding: 20px 14px;
  }

  .admin-page-heading {
    display: grid;
  }

  .admin-page-heading > .admin-primary-button {
    width: 100%;
  }

  .admin-stat-grid {
    grid-template-columns: 1fr;
  }

  .admin-stat-card {
    padding: 16px;
  }

}


@media (max-width: 850px) {
  .admin-sidebar {
    width: min(300px, 88vw);
  }

  .admin-brand-logo {
    width: 180px;
  }

  .admin-sidebar-close {
    display: grid;
  }
}

@media (max-width: 420px) {
  .admin-brand {
    min-height: 82px;
    padding-inline: 12px;
  }

  .admin-brand-logo {
    width: 165px;
    height: 60px;
  }

  .admin-sidebar-support {
    margin-inline: 10px;
  }
}


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}


/* =========================================================
   SIDEBAR FINAL — AJUSTES DO MOCKUP
   ========================================================= */

.admin-sidebar {
  width: 244px;
}

.admin-main {
  margin-left: 244px;
}

.admin-brand {
  min-height: 82px;
  padding: 10px 16px 8px;
}

.admin-brand-logo {
  width: 200px;
  height: 62px;
}

.admin-navigation {
  padding: 8px 8px 18px;
}

.admin-nav-link,
.admin-nav-group-summary {
  min-height: 43px;
  gap: 11px;
  padding: 9px 12px;
  border: 0;
  text-align: left;
}

.admin-nav-link.is-active,
.admin-nav-group-summary.is-active {
  background: linear-gradient(135deg, #ef2533, #d71919);
  box-shadow: 0 8px 18px rgba(215, 25, 25, 0.24);
}

.admin-nav-link-disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.admin-nav-link-disabled:hover {
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
}

.admin-nav-coming-soon {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid rgba(245, 196, 0, 0.42);
  border-radius: 999px;
  color: var(--mc-yellow);
  font-size: 0.55rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.admin-nav-submenu {
  padding-left: 41px;
}

.admin-sidebar-support {
  margin: 8px 16px 14px;
}

.admin-sidebar-legal {
  margin-top: auto;
  padding: 8px 18px 18px;
}

@media (max-width: 850px) {
  .admin-sidebar {
    width: min(300px, 88vw);
  }

  .admin-main {
    margin-left: 0;
  }
}

/* =========================================================
   DASHBOARD FINAL — MOCKUP MOTOKIDS
   ========================================================= */

.admin-content {
  padding: 22px 24px 30px;
}

.mk-dashboard {
  display: grid;
  gap: 18px;
}

.mk-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.mk-kpi-card {
  position: relative;
  min-width: 0;
  min-height: 158px;
  overflow: hidden;
  padding: 16px 16px 12px;
  border: 1px solid var(--mc-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 23, 30, 0.055);
}

.mk-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mk-kpi-icon {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 10px;
}

.mk-kpi-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mk-kpi-sales .mk-kpi-icon {
  background: #fff0f1;
  color: #df1424;
}

.mk-kpi-payments .mk-kpi-icon {
  background: #edf8f1;
  color: #17814a;
}

.mk-kpi-orders .mk-kpi-icon {
  background: #fff6dc;
  color: #b87800;
}

.mk-kpi-customers .mk-kpi-icon {
  background: #eef4ff;
  color: #2c67c7;
}

.mk-kpi-training .mk-kpi-icon {
  background: #f3efff;
  color: #7553c8;
}

.mk-kpi-trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 900;
}

.mk-kpi-trend.is-positive {
  background: #e8f7ee;
  color: #177443;
}

.mk-kpi-trend.is-negative {
  background: #fff0f0;
  color: #bb2020;
}

.mk-kpi-trend.is-neutral {
  background: #f1f2f4;
  color: #767d87;
}

.mk-kpi-content {
  position: relative;
  z-index: 2;
  margin-top: 12px;
}

.mk-kpi-content p,
.mk-kpi-content strong,
.mk-kpi-content small {
  display: block;
  margin: 0;
}

.mk-kpi-content p {
  color: var(--mc-muted);
  font-size: 0.69rem;
  font-weight: 700;
}

.mk-kpi-content strong {
  margin: 4px 0 3px;
  overflow: hidden;
  color: #111827;
  font-size: clamp(1.05rem, 1.55vw, 1.42rem);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mk-kpi-content small {
  color: #9298a2;
  font-size: 0.6rem;
  line-height: 1.35;
}

.mk-kpi-sparkline {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 94px;
  height: 34px;
  opacity: 0.58;
}

.mk-kpi-sparkline svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mk-kpi-sparkline path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
}

.mk-kpi-sales .mk-kpi-sparkline {
  color: #df1424;
}

.mk-kpi-payments .mk-kpi-sparkline {
  color: #17814a;
}

.mk-kpi-orders .mk-kpi-sparkline {
  color: #b87800;
}

.mk-kpi-customers .mk-kpi-sparkline {
  color: #2c67c7;
}

.mk-kpi-training .mk-kpi-sparkline {
  color: #7553c8;
}

.mk-dashboard-alert-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--mc-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(20, 23, 30, 0.04);
}

.mk-dashboard-alert-item {
  min-width: 0;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-right: 1px solid var(--mc-border);
  color: #273143;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.mk-dashboard-alert-item:last-child {
  border-right: 0;
}

.mk-dashboard-alert-item:hover {
  background: #fafbfc;
}

.mk-dashboard-alert-icon {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 9px;
  background: #f3f4f6;
  color: #697281;
}

.mk-dashboard-alert-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mk-alert-payment .mk-dashboard-alert-icon {
  background: #fff0f1;
  color: var(--mc-red);
}

.mk-alert-reservation .mk-dashboard-alert-icon {
  background: #fff7e2;
  color: #b67500;
}

.mk-alert-stock .mk-dashboard-alert-icon {
  background: #eef4ff;
  color: #2c67c7;
}

.mk-alert-delivery .mk-dashboard-alert-icon {
  background: #f2efff;
  color: #7553c8;
}

.mk-alert-message .mk-dashboard-alert-icon {
  background: #edf8f1;
  color: #17814a;
}

.mk-dashboard-alert-copy {
  min-width: 0;
  display: grid;
}

.mk-dashboard-alert-copy strong {
  color: #111827;
  font-size: 1rem;
  line-height: 1;
}

.mk-dashboard-alert-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--mc-muted);
  font-size: 0.62rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mk-dashboard-main-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.45fr)
    minmax(300px, 0.75fr);
  gap: 16px;
  align-items: stretch;
}

.mk-dashboard-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--mc-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 23, 30, 0.05);
}

.mk-dashboard-panel-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--mc-border);
}

.mk-dashboard-panel-header h2,
.mk-dashboard-panel-header p {
  margin: 0;
}

.mk-dashboard-panel-header h2 {
  color: #111827;
  font-size: 0.9rem;
  line-height: 1.25;
}

.mk-dashboard-panel-header p {
  margin-top: 3px;
  color: var(--mc-muted);
  font-size: 0.64rem;
}

.mk-dashboard-panel-header a {
  flex: 0 0 auto;
  color: var(--mc-red);
  font-size: 0.67rem;
  font-weight: 900;
  text-decoration: none;
}

.mk-dashboard-panel-header a:hover {
  text-decoration: underline;
}

.mk-dashboard-sales-chart {
  min-height: 330px;
}

.mk-dashboard-chart-container {
  position: relative;
  height: 250px;
  padding: 14px 16px 16px;
}

.mk-dashboard-chart-container canvas,
.mk-dashboard-donut canvas {
  width: 100% !important;
  height: 100% !important;
}

.mk-dashboard-table-wrap {
  min-height: 250px;
  overflow-x: auto;
}

.mk-dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.69rem;
}

.mk-dashboard-table th,
.mk-dashboard-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef0f2;
  text-align: left;
  white-space: nowrap;
}

.mk-dashboard-table th {
  color: #7b8390;
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mk-dashboard-table td {
  color: #394253;
}

.mk-dashboard-table tbody tr:last-child td {
  border-bottom: 0;
}

.mk-status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.59rem;
  font-weight: 900;
}

.mk-status-badge.is-success {
  background: #e7f7ed;
  color: #177443;
}

.mk-status-badge.is-warning {
  background: #fff5dc;
  color: #996700;
}

.mk-status-badge.is-danger {
  background: #fff0f0;
  color: #b72020;
}

.mk-status-badge.is-neutral {
  background: #f1f2f4;
  color: #69717d;
}

.mk-dashboard-empty {
  min-height: 250px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 24px;
  text-align: center;
}

.mk-dashboard-empty > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f2f3f5;
  color: #8a919c;
}

.mk-dashboard-empty > span svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mk-dashboard-empty strong {
  margin-top: 12px;
  color: #273143;
  font-size: 0.78rem;
}

.mk-dashboard-empty p {
  max-width: 300px;
  margin: 4px 0 0;
  color: var(--mc-muted);
  font-size: 0.67rem;
}

.mk-dashboard-empty-compact {
  min-height: 190px;
}

.mk-dashboard-donut-layout {
  min-height: 248px;
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(150px, 1.1fr);
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.mk-dashboard-donut {
  position: relative;
  height: 175px;
}

.mk-dashboard-legend {
  display: grid;
  gap: 10px;
}

.mk-dashboard-legend-item {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #4b5563;
  font-size: 0.65rem;
}

.mk-dashboard-legend-item strong {
  color: #111827;
  font-size: 0.67rem;
}

.mk-dashboard-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d71919;
}

.mk-dashboard-legend-item:nth-child(2) .mk-dashboard-legend-dot {
  background: #f5c400;
}

.mk-dashboard-legend-item:nth-child(3) .mk-dashboard-legend-dot {
  background: #2c67c7;
}

.mk-dashboard-legend-item:nth-child(4) .mk-dashboard-legend-dot {
  background: #7553c8;
}

.mk-dashboard-product-list,
.mk-dashboard-activity-list {
  min-height: 248px;
}

.mk-dashboard-product-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #eef0f2;
}

.mk-dashboard-product-item:last-child {
  border-bottom: 0;
}

.mk-dashboard-product-position {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff0f1;
  color: var(--mc-red);
  font-size: 0.66rem;
  font-weight: 900;
}

.mk-dashboard-product-item > div {
  min-width: 0;
}

.mk-dashboard-product-item strong,
.mk-dashboard-product-item small {
  display: block;
}

.mk-dashboard-product-item > div strong {
  overflow: hidden;
  color: #273143;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mk-dashboard-product-item small {
  margin-top: 2px;
  color: var(--mc-muted);
  font-size: 0.59rem;
}

.mk-dashboard-product-item > strong {
  color: #111827;
  font-size: 0.68rem;
  white-space: nowrap;
}

.mk-dashboard-activity-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #eef0f2;
}

.mk-dashboard-activity-item:last-child {
  border-bottom: 0;
}

.mk-dashboard-activity-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f2f3f5;
  color: #697281;
}

.mk-dashboard-activity-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mk-dashboard-activity-item > div {
  min-width: 0;
}

.mk-dashboard-activity-item strong {
  display: block;
  overflow: hidden;
  color: #273143;
  font-size: 0.69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mk-dashboard-activity-item p {
  margin: 3px 0 0;
  color: var(--mc-muted);
  font-size: 0.61rem;
  line-height: 1.35;
}

.mk-dashboard-activity-item > small {
  color: #9298a2;
  font-size: 0.57rem;
  white-space: nowrap;
}

@media (max-width: 1400px) {
  .mk-dashboard-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mk-dashboard-kpis .mk-kpi-card:nth-child(4),
  .mk-dashboard-kpis .mk-kpi-card:nth-child(5) {
    grid-column: span 1;
  }

  .mk-dashboard-alert-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mk-dashboard-alert-item {
    border-bottom: 1px solid var(--mc-border);
  }

  .mk-dashboard-alert-item:nth-child(3n) {
    border-right: 0;
  }
}

@media (max-width: 1100px) {
  .mk-dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .mk-dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mk-dashboard-alert-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mk-dashboard-alert-item:nth-child(3n) {
    border-right: 1px solid var(--mc-border);
  }

  .mk-dashboard-alert-item:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 720px) {
  .admin-content {
    padding: 16px 12px 24px;
  }

  .mk-dashboard {
    gap: 14px;
  }

  .mk-dashboard-kpis,
  .mk-dashboard-alert-strip {
    grid-template-columns: 1fr;
  }

  .mk-dashboard-alert-item {
    border-right: 0;
  }

  .mk-dashboard-panel-header {
    align-items: flex-start;
    padding: 13px 14px;
  }

  .mk-dashboard-donut-layout {
    grid-template-columns: 1fr;
  }

  .mk-dashboard-donut {
    height: 190px;
  }
}

@media (max-width: 480px) {
  .mk-kpi-card {
    min-height: 146px;
  }

  .mk-dashboard-panel-header {
    display: grid;
  }

  .mk-dashboard-product-item,
  .mk-dashboard-activity-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .mk-dashboard-product-item > strong,
  .mk-dashboard-activity-item > small {
    grid-column: 2;
    justify-self: start;
  }
}

/* =========================================================
   AJUSTE FINAL DO DASHBOARD AO MOCKUP
   ========================================================= */

.admin-content {
  padding: 16px 20px 24px;
}

.mk-dashboard {
  gap: 14px;
}

/* Cinco indicadores na mesma linha */
.mk-dashboard-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.mk-kpi-card {
  min-height: 148px;
  padding: 14px 14px 10px;
  border-radius: 11px;
}

.mk-kpi-icon {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 50%;
}

.mk-kpi-content {
  margin-top: 10px;
}

.mk-kpi-content p {
  font-size: 0.65rem;
  text-transform: uppercase;
}

.mk-kpi-content strong {
  font-size: clamp(1rem, 1.35vw, 1.35rem);
}

.mk-kpi-content small {
  font-size: 0.58rem;
}

.mk-kpi-sparkline {
  right: 10px;
  bottom: 7px;
  width: 96px;
  height: 30px;
}

/* Faixa de alertas igual ao mockup */
.mk-dashboard-alert-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-color: #f2d994;
  border-radius: 10px;
  background: #fffdf5;
  box-shadow: none;
}

.mk-dashboard-alert-item {
  min-height: 74px;
  padding: 11px 14px;
  background: transparent;
}

.mk-dashboard-alert-item:hover {
  background: #fff9e9;
}

.mk-dashboard-alert-copy strong {
  color: #111827;
  font-size: 0.92rem;
}

.mk-dashboard-alert-copy small {
  font-size: 0.61rem;
}

/* Três colunas, como no mockup */
.mk-dashboard-main-grid {
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1.2fr)
    minmax(0, 1.1fr);
  gap: 12px;
  align-items: stretch;
}

/* Cada conjunto de três painéis forma uma linha */
.mk-dashboard-panel {
  min-height: 285px;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(20, 23, 30, 0.035);
}

.mk-dashboard-sales-chart,
.mk-dashboard-recent-sales,
.mk-dashboard-payment-methods,
.mk-dashboard-products,
.mk-dashboard-order-status,
.mk-dashboard-activities {
  grid-column: span 1;
}

.mk-dashboard-panel-header {
  min-height: 58px;
  padding: 11px 14px;
}

.mk-dashboard-panel-header h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
}

.mk-dashboard-panel-header p {
  font-size: 0.58rem;
}

.mk-dashboard-panel-header a {
  font-size: 0.61rem;
}

/* Gráfico principal mais compacto */
.mk-dashboard-sales-chart {
  min-height: 285px;
}

.mk-dashboard-chart-container {
  height: 225px;
  padding: 10px 12px 14px;
}

/* Últimas vendas */
.mk-dashboard-table-wrap {
  min-height: 225px;
}

.mk-dashboard-table {
  font-size: 0.62rem;
}

.mk-dashboard-table th,
.mk-dashboard-table td {
  padding: 9px 10px;
}

/* Estados vazios menos altos */
.mk-dashboard-empty {
  min-height: 225px;
  padding: 18px;
}

.mk-dashboard-empty-compact {
  min-height: 220px;
}

.mk-dashboard-empty > span {
  width: 44px;
  height: 44px;
}

/* Gráficos circulares */
.mk-dashboard-donut-layout {
  min-height: 225px;
  grid-template-columns:
    minmax(115px, 0.9fr)
    minmax(135px, 1.1fr);
  gap: 10px;
  padding: 12px;
}

.mk-dashboard-donut {
  height: 170px;
}

.mk-dashboard-legend {
  gap: 8px;
}

.mk-dashboard-legend-item {
  font-size: 0.6rem;
}

/* Produtos e actividades */
.mk-dashboard-product-list,
.mk-dashboard-activity-list {
  min-height: 225px;
}

.mk-dashboard-product-item,
.mk-dashboard-activity-item {
  padding: 9px 13px;
}

/* Mantém o layout ajustado em monitores menores */
@media (max-width: 1350px) {
  .mk-dashboard-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mk-dashboard-main-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .mk-dashboard-alert-strip {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .mk-dashboard-kpis,
  .mk-dashboard-alert-strip,
  .mk-dashboard-main-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .admin-content {
    padding: 14px 10px 22px;
  }

  .mk-dashboard-kpis,
  .mk-dashboard-alert-strip,
  .mk-dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .mk-dashboard-panel {
    min-height: auto;
  }

  .mk-dashboard-donut-layout {
    grid-template-columns: 1fr;
  }
}

.mk-dashboard-alert-action {
  margin-top: 3px;
  color: #1264d8;
  font-size: 0.58rem;
  font-weight: 800;
}

.mk-dashboard-alert-item:hover
.mk-dashboard-alert-action {
  text-decoration: underline;
}

/* =========================================================
   MELHORIA DOS ALERTAS DO DASHBOARD
   ========================================================= */

.mk-dashboard-alert-item {
  min-height: 82px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.mk-dashboard-alert-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.mk-dashboard-alert-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.mk-dashboard-alert-copy small {
  margin: 0 0 2px;
  overflow: visible;
  color: #4b5563;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: initial;
  white-space: normal;
}

.mk-dashboard-alert-copy strong {
  margin: 0 0 2px;
  color: #111827;
  font-size: 0.9rem;
  line-height: 1.15;
}

.mk-dashboard-alert-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #0768d7;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1.3;
}

.mk-dashboard-alert-item:hover
.mk-dashboard-alert-action {
  color: #004fa9;
  text-decoration: underline;
}

.mk-dashboard-panel-header h2 {
  color: #111827;
  font-size: 0.82rem;
  font-weight: 900;
}

.mk-dashboard-panel-header p {
  color: #667085;
  font-size: 0.62rem;
}

.mk-dashboard-panel-header a {
  color: #e30613;
  font-size: 0.65rem;
  font-weight: 900;
}

.mk-dashboard-empty strong {
  color: #172033;
  font-size: 0.8rem;
}

.mk-dashboard-empty p {
  color: #667085;
  font-size: 0.66rem;
}

/* Percentagens das legendas dos gráficos */

.mk-dashboard-legend-item > strong {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-left: auto;
  color: #111827;
  font-size: 0.62rem;
  white-space: nowrap;
}

.mk-dashboard-legend-item > strong small {
  color: #667085;
  font-size: 0.57rem;
  font-weight: 600;
}

/* Data das últimas vendas */

.mk-dashboard-sale-date {
  color: #667085;
  font-size: 0.58rem;
  white-space: nowrap;
}

.mk-dashboard-table th:last-child,
.mk-dashboard-table td:last-child {
  text-align: right;
}

/* =========================================================
   RODAPÉ ADMINISTRATIVO — ESTILO DO MOCKUP
   ========================================================= */

.admin-footer {
  display: grid;
  grid-template-columns:
    minmax(130px, 0.7fr)
    minmax(320px, 1.6fr)
    minmax(280px, 1fr);
  align-items: center;
  min-height: 64px;
  padding: 0 28px;
  border-top: 1px solid #e4e7ec;
  background: #ffffff;
  color: #667085;
  font-size: 0.68rem;
}

.admin-footer-version {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #667085;
  white-space: nowrap;
}

.admin-footer-access {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  color: #667085;
}

.admin-footer-access svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-footer-access span {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-footer-access small {
  color: #7b8492;
  font: inherit;
}

.admin-footer-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  min-width: 0;
}

.admin-footer-language,
.admin-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #667085;
  white-space: nowrap;
}

.admin-footer-language svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-footer-brand svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #ed1c24;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-footer-separator {
  width: 1px;
  height: 20px;
  background: #e4e7ec;
}

/* Rodapé fixado naturalmente ao fundo quando há pouco conteúdo */

.admin-main {
  min-height: 100vh;
}

.admin-content {
  flex: 1 0 auto;
}

.admin-footer {
  flex: 0 0 auto;
}

/* Responsividade */

@media (max-width: 1100px) {
  .admin-footer {
    grid-template-columns:
      minmax(100px, 0.6fr)
      minmax(220px, 1.3fr)
      minmax(220px, 1fr);
    padding-inline: 20px;
  }

  .admin-footer-right {
    gap: 12px;
  }
}

@media (max-width: 820px) {
  .admin-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 22px;
    min-height: 84px;
    padding: 14px 18px;
    text-align: center;
  }

  .admin-footer-version,
  .admin-footer-access,
  .admin-footer-right {
    justify-content: center;
  }

  .admin-footer-access {
    order: 3;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .admin-footer-right {
    flex-wrap: wrap;
    justify-content: center;
  }

  .admin-footer-separator {
    display: none;
  }

  .admin-footer-access span {
    white-space: normal;
  }
}

/* =========================================================
   MĆ“DULO DE VENDAS
   ========================================================= */

.sales-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sales-page-heading h1 {
  margin: 0;
  color: #111827;
  font-size: 1.55rem;
  line-height: 1.2;
}

.sales-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  color: #667085;
  font-size: 0.72rem;
}

.sales-breadcrumb a {
  color: #667085;
  text-decoration: none;
}

.sales-breadcrumb a:hover {
  color: #d71919;
}

.sales-breadcrumb strong {
  color: #475467;
  font-weight: 600;
}

.sales-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.sales-kpi-card {
  display: flex;
  align-items: center;
  min-height: 116px;
  padding: 16px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(16, 24, 40, 0.03);
}

.sales-kpi-icon {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  place-items: center;
  border-radius: 50%;
}

.sales-kpi-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-kpi-card.is-red .sales-kpi-icon {
  background: #fde8ea;
  color: #e21d2b;
}

.sales-kpi-card.is-yellow .sales-kpi-icon {
  background: #fff4d8;
  color: #f0a400;
}

.sales-kpi-card.is-blue .sales-kpi-icon {
  background: #e7f0ff;
  color: #1e6bd6;
}

.sales-kpi-card.is-purple .sales-kpi-icon {
  background: #f1e9fb;
  color: #8a45c8;
}

.sales-kpi-card.is-green .sales-kpi-icon {
  background: #e7f6eb;
  color: #1f9d4b;
}

.sales-kpi-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  margin-left: 14px;
}

.sales-kpi-body > span {
  color: #475467;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sales-kpi-body > strong {
  margin-top: 4px;
  color: #101828;
  font-size: 1.22rem;
  line-height: 1.2;
  white-space: nowrap;
}

.sales-kpi-body small {
  margin-top: 7px;
  color: #667085;
  font-size: 0.65rem;
}

.sales-kpi-body small b {
  margin-right: 4px;
}

.sales-kpi-body .is-positive {
  color: #0a9b50;
}

.sales-kpi-body .is-negative {
  color: #d71919;
}

.sales-filter-card {
  padding: 15px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
}

.sales-filter-form {
  display: grid;
  grid-template-columns:
    minmax(240px, 1.3fr)
    repeat(5, minmax(140px, 1fr))
    auto;
  gap: 12px;
  align-items: center;
}

.sales-filter-form input,
.sales-filter-form select,
.sales-filter-form button,
.sales-new-button {
  min-height: 42px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font: inherit;
  font-size: 0.72rem;
}

.sales-filter-form input,
.sales-filter-form select {
  width: 100%;
  padding: 0 12px;
}

.sales-date-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
}

.sales-date-range input {
  min-width: 0;
  border: 0;
}

.sales-date-range span {
  color: #98a2b3;
}

.sales-new-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 130px;
  padding: 0 16px;
  border-color: #d71919;
  background: #d71919;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.sales-new-button:hover {
  background: #b91515;
}

.sales-more-filters {
  grid-column: 1 / 2;
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  cursor: pointer;
}

.sales-table-card {
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
}

.sales-table-wrap {
  overflow-x: auto;
}

.sales-table {
  width: 100%;
  min-width: 1220px;
  border-collapse: collapse;
  color: #344054;
  font-size: 0.69rem;
}

.sales-table th {
  padding: 12px;
  border-bottom: 1px solid #e4e7ec;
  background: #f9fafb;
  color: #344054;
  font-size: 0.64rem;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.sales-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #eef0f3;
  vertical-align: middle;
  white-space: nowrap;
}

.sales-table tbody tr:hover {
  background: #fcfcfd;
}

.sales-checkbox-cell {
  width: 34px;
  text-align: center !important;
}

.sales-reference {
  color: #e21d2b;
  font-weight: 800;
  text-decoration: none;
}

.sales-customer {
  display: flex;
  flex-direction: column;
}

.sales-customer strong {
  color: #111827;
  font-size: 0.7rem;
}

.sales-customer small,
.sales-payment-cell small {
  margin-top: 3px;
  color: #667085;
  font-size: 0.62rem;
}

.sales-origin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.sales-origin > span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 900;
}

.sales-origin.is-web > span {
  color: #344054;
}

.sales-origin.is-whatsapp > span {
  color: #0aa85f;
}

.sales-origin.is-phone > span {
  color: #7f56d9;
}

.sales-origin.is-store > span {
  color: #f79009;
}

.sales-origin.is-instagram > span {
  color: #e1306c;
}

.sales-origin.is-facebook > span {
  color: #1877f2;
}

.sales-origin.is-referral > span {
  color: #12b76a;
}

.sales-date {
  color: #475467;
}

.sales-paid {
  color: #0a9b50;
}

.sales-balance {
  color: #d71919;
}

.sales-zero {
  color: #101828;
}

.sales-payment-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.sales-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.61rem;
  font-weight: 700;
}

.sales-status-badge.is-success {
  background: #e7f7eb;
  color: #138a42;
}

.sales-status-badge.is-warning {
  background: #fff4d6;
  color: #c87500;
}

.sales-status-badge.is-info {
  background: #e7f1ff;
  color: #1265c7;
}

.sales-status-badge.is-purple {
  background: #f3e8ff;
  color: #7f36b4;
}

.sales-status-badge.is-danger {
  background: #fde8e8;
  color: #d71919;
}

.sales-status-badge.is-neutral {
  background: #eef1f5;
  color: #475467;
}

.sales-actions-heading {
  text-align: center !important;
}

.sales-actions {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.sales-actions a,
.sales-actions button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #dfe3e8;
  border-radius: 7px;
  background: #fff;
  color: #475467;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.sales-actions a:hover,
.sales-actions button:hover {
  border-color: #f2b9bd;
  color: #d71919;
}

.sales-empty-state {
  padding: 60px 20px;
  text-align: center;
}

.sales-empty-state strong {
  color: #111827;
}

.sales-empty-state p {
  margin: 7px 0 0;
  color: #667085;
}

.sales-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 12px 16px;
  color: #475467;
  font-size: 0.68rem;
}

.sales-pagination {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sales-pagination a,
.sales-pagination span {
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #e4e7ec;
  border-radius: 7px;
  color: #475467;
  text-decoration: none;
}

.sales-pagination a.is-active {
  border-color: #d71919;
  background: #d71919;
  color: #fff;
}

.sales-pagination a.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

@media (max-width: 1450px) {
  .sales-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sales-filter-form {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .sales-new-button {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .sales-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-more-filters {
    grid-column: auto;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .sales-kpi-grid,
  .sales-filter-form {
    grid-template-columns: 1fr;
  }

  .sales-page-heading h1 {
    font-size: 1.3rem;
  }

  .sales-date-range {
    grid-template-columns: 1fr;
  }

  .sales-date-range span {
    display: none;
  }

  .sales-table-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .sales-pagination {
    flex-wrap: wrap;
  }
}

/* =========================================================
   CORRECÇÃO FINAL — ÍCONES DAS ACÇÕES DE VENDAS
   ========================================================= */

.sales-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.sales-actions > a,
.sales-actions > button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  padding: 0;
  place-items: center;
  border: 1px solid #dfe3e8;
  border-radius: 7px;
  background: #ffffff;
  color: #667085;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

/*
 * Remove qualquer preenchimento preto aplicado
 * no SVG ou nos seus elementos internos.
 */
.sales-actions > a svg,
.sales-actions > a svg *,
.sales-actions > button svg {
  display: block;
  width: 15px;
  height: 15px;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.7 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

/* Ícone visualizar */
.sales-actions > a:first-child {
  color: #2563eb !important;
  background: #eff6ff;
  border-color: #dbeafe;
}

.sales-actions > a:first-child:hover,
.sales-actions > a:first-child:focus-visible {
  color: #1d4ed8 !important;
  background: #dbeafe;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

/* Ícone documento */
.sales-actions > a:nth-child(2) {
  color: #475467 !important;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.sales-actions > a:nth-child(2):hover,
.sales-actions > a:nth-child(2):focus-visible {
  color: #111827 !important;
  background: #eef2f6;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

/* Botão de mais opções */
.sales-actions > button {
  color: #667085 !important;
  background: #ffffff;
  border-color: #e4e7ec;
}

/*
 * Apenas os três círculos do ícone de opções
 * devem ficar preenchidos.
 */
.sales-actions > button svg {
  fill: none !important;
  stroke: none !important;
}

.sales-actions > button svg * {
  fill: currentColor !important;
  stroke: none !important;
}

.sales-actions > button:hover,
.sales-actions > button:focus-visible {
  color: #d71919 !important;
  background: #fff1f2;
  border-color: #fecdd3;
  transform: translateY(-1px);
}

.sales-actions > a:focus-visible,
.sales-actions > button:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.24);
  outline-offset: 2px;
}

/* =========================================================
   BREADCRUMB DO TOPBAR
   ========================================================= */

.admin-topbar-breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  overflow: hidden;
  color: #70757d;
  font-size: 0.7rem;
  line-height: 1.35;
  white-space: nowrap;
}

.admin-topbar-breadcrumb a {
  color: #70757d;
  text-decoration: none;
  transition: color 160ms ease;
}

.admin-topbar-breadcrumb a:hover,
.admin-topbar-breadcrumb a:focus-visible {
  color: #d71919;
}

.admin-topbar-breadcrumb span {
  flex: 0 0 auto;
  color: #a0a6af;
}

.admin-topbar-breadcrumb strong {
  min-width: 0;
  overflow: hidden;
  color: #475467;
  font-weight: 700;
  text-overflow: ellipsis;
}

@media (max-width: 620px) {
  .admin-topbar-breadcrumb {
    max-width: 180px;
    font-size: 0.64rem;
  }

  .admin-topbar-breadcrumb a:first-child,
  .admin-topbar-breadcrumb a:first-child + span {
    display: none;
  }
}

/* =========================================================
   ÍCONES SVG DAS ORIGENS DAS VENDAS
   ========================================================= */

.sales-origin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.sales-origin-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 6px;
  background: #f3f4f6;
  color: #667085;
}

.sales-origin-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-origin.is-web .sales-origin-icon {
  background: #eef2f6;
  color: #344054;
}

.sales-origin.is-whatsapp .sales-origin-icon {
  background: #e8f8ef;
  color: #12a05c;
}

.sales-origin.is-phone .sales-origin-icon {
  background: #f2ecff;
  color: #7f56d9;
}

.sales-origin.is-store .sales-origin-icon {
  background: #fff3df;
  color: #f79009;
}

.sales-origin.is-instagram .sales-origin-icon {
  background: #fff0f5;
  color: #d63384;
}

.sales-origin.is-facebook .sales-origin-icon {
  background: #edf4ff;
  color: #1877f2;
}

.sales-origin.is-referral .sales-origin-icon {
  background: #eaf8ee;
  color: #1d9b50;
}

.sales-origin.is-default .sales-origin-icon {
  background: #f2f4f7;
  color: #667085;
}

/* =========================================================
   ÍCONES SVG DAS ORIGENS DAS VENDAS
   ========================================================= */

.sales-origin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.sales-origin-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 6px;
  background: #f3f4f6;
  color: #667085;
}

.sales-origin-icon svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sales-origin.is-web .sales-origin-icon {
  background: #eef2f6;
  color: #344054;
}

.sales-origin.is-whatsapp .sales-origin-icon {
  background: #e8f8ef;
  color: #12a05c;
}

.sales-origin.is-phone .sales-origin-icon {
  background: #f2ecff;
  color: #7f56d9;
}

.sales-origin.is-store .sales-origin-icon {
  background: #fff3df;
  color: #f79009;
}

.sales-origin.is-instagram .sales-origin-icon {
  background: #fff0f5;
  color: #d63384;
}

.sales-origin.is-facebook .sales-origin-icon {
  background: #edf4ff;
  color: #1877f2;
}

.sales-origin.is-referral .sales-origin-icon {
  background: #eaf8ee;
  color: #1d9b50;
}

.sales-origin.is-default .sales-origin-icon {
  background: #f2f4f7;
  color: #667085;
}

.sales-more-filters svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================================
   NOVA VENDA
   ========================================================= */
.sale-create-page{margin:-16px -20px -24px;background:#f7f8fa}.sale-create-form{min-width:0}.sale-create-header{position:sticky;z-index:40;top:82px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 24px;border-bottom:1px solid var(--mc-border);background:rgba(255,255,255,.98);backdrop-filter:blur(12px)}.sale-create-header h1,.sale-create-header p{margin:0}.sale-create-header h1{color:#111827;font-size:1.45rem}.sale-create-header p{margin-top:4px;color:var(--mc-muted);font-size:.75rem}.sale-create-header-actions{display:flex;align-items:center;gap:12px}.sale-create-cancel,.sale-create-save,.sale-secondary-button,.sale-add-product{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 16px;border-radius:8px;font-size:.75rem;font-weight:800;text-decoration:none;cursor:pointer}.sale-create-cancel,.sale-secondary-button,.sale-add-product{border:1px solid #dfe3e8;background:#fff;color:#263043}.sale-create-save{border:1px solid var(--mc-red);background:linear-gradient(135deg,#eb1424,#d71919);color:#fff;box-shadow:0 8px 18px rgba(215,25,25,.18)}.sale-create-save svg,.sale-secondary-button svg,.sale-add-product svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.sale-create-layout{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:16px;padding:16px 20px 28px}.sale-create-main{min-width:0;display:grid;gap:16px}.sale-step{overflow:hidden;border:1px solid var(--mc-border);border-radius:12px;background:#fff}.sale-step-header{display:flex;align-items:center;gap:10px;padding:15px 16px 10px}.sale-step-header>span{width:25px;height:25px;display:grid;flex:0 0 25px;place-items:center;border-radius:50%;background:var(--mc-red);color:#fff;font-size:.68rem;font-weight:900}.sale-step-header h2{margin:0;color:#111827;font-size:.88rem}.sale-step-body{padding:8px 16px 16px}.sale-customer-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}.sale-field{display:grid;gap:7px;min-width:0}.sale-field>span{color:#475467;font-size:.68rem;font-weight:700}.sale-field>span b{color:var(--mc-red)}.sale-field input,.sale-field select,.sale-field textarea,.sale-product-choice select,.sale-money-input,.sale-percent-input{width:100%;border:1px solid #dfe3e8;border-radius:8px;background:#fff;color:#263043;font-size:.72rem}.sale-field input,.sale-field select,.sale-product-choice select{min-height:40px;padding:0 11px}.sale-field textarea{min-height:64px;padding:10px 11px;resize:vertical}.sale-field input:focus,.sale-field select:focus,.sale-field textarea:focus,.sale-product-choice select:focus,.sale-money-input:focus-within,.sale-percent-input:focus-within{border-color:rgba(215,25,25,.5);outline:0;box-shadow:0 0 0 3px rgba(215,25,25,.08)}.sale-items-body{padding-inline:0}.sale-items-table-wrap{overflow-x:auto;border-top:1px solid #eef0f2;border-bottom:1px solid #eef0f2}.sale-items-table{width:100%;min-width:900px;border-collapse:collapse;font-size:.68rem}.sale-items-table th,.sale-items-table td{padding:11px 12px;border-bottom:1px solid #eef0f2;text-align:left;vertical-align:middle}.sale-items-table th{background:#fafbfc;color:#344054;font-size:.61rem;font-weight:900;text-transform:uppercase}.sale-items-table tbody tr:last-child td{border-bottom:0}.sale-product-choice{display:grid;grid-template-columns:48px minmax(0,1fr);gap:10px;align-items:center;min-width:250px}.sale-product-thumb{width:48px;height:48px;display:grid;place-items:center;border:1px solid #e4e7ec;border-radius:8px;background:#f8f9fb;color:var(--mc-red)}.sale-product-thumb svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.sale-product-choice label{min-width:0;display:grid}.sale-product-choice small{margin-top:4px;color:var(--mc-muted);font-size:.59rem}.sale-money-input,.sale-percent-input{display:flex;align-items:center;overflow:hidden}.sale-money-input input,.sale-percent-input input{min-width:0;flex:1;min-height:40px;padding:0 10px;border:0;outline:0;background:transparent}.sale-money-input span,.sale-percent-input span{flex:0 0 auto;padding:0 10px;color:#475467;font-size:.66rem}.sale-quantity-control{display:grid;grid-template-columns:32px 42px 32px;overflow:hidden;border:1px solid #dfe3e8;border-radius:8px}.sale-quantity-control button,.sale-quantity-control input{height:40px;border:0;background:#fff;text-align:center}.sale-quantity-control button{color:#667085;cursor:pointer}.sale-quantity-control input{border-right:1px solid #eef0f2;border-left:1px solid #eef0f2}.sale-item-subtotal{color:#111827;white-space:nowrap}.sale-delete-item{width:34px;height:34px;display:grid;place-items:center;border:1px solid #fde0e2;border-radius:7px;background:#fff;color:var(--mc-red);cursor:pointer}.sale-delete-item svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.sale-add-product{margin:12px auto 0}.sale-grid-4{display:grid;grid-template-columns:1fr 1fr .95fr 1.2fr;gap:14px}.sale-grid-3{display:grid;grid-template-columns:1fr .95fr 1.3fr;gap:14px}.sale-field-full{margin-top:12px}.sale-create-sidebar{min-width:0;display:grid;align-content:start;gap:14px}.sale-summary-card{padding:18px;border:1px solid var(--mc-border);border-radius:12px;background:#fff}.sale-summary-card h2{margin:0 0 16px;color:#111827;font-size:.88rem}.sale-summary-card dl{display:grid;gap:13px;margin:0}.sale-summary-card dl>div,.sale-summary-items,.sale-summary-total{display:flex;align-items:center;justify-content:space-between;gap:14px}.sale-summary-card dt,.sale-summary-card dd{margin:0;color:#475467;font-size:.69rem}.sale-summary-card dd{color:#111827;text-align:right}.sale-summary-total{margin-top:16px;padding-top:14px;border-top:1px solid #e9ebee}.sale-summary-total strong{font-size:.9rem}.sale-summary-total b{font-size:1.05rem}.sale-summary-items{margin-top:15px;color:#667085;font-size:.68rem}.sale-create-notice{display:flex;align-items:flex-start;gap:10px;padding:15px;border-radius:10px;background:#eaf3ff;color:#1265c7}.sale-create-notice svg{width:17px;height:17px;flex:0 0 17px;margin-top:1px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.sale-create-notice p{margin:0;font-size:.68rem;line-height:1.5}@media(max-width:1250px){.sale-create-layout{grid-template-columns:1fr}.sale-create-sidebar{grid-template-columns:repeat(2,minmax(0,1fr))}.sale-create-notice{grid-column:1/-1}.sale-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:780px){.sale-create-page{margin:-16px -12px -24px}.sale-create-header{top:72px;align-items:flex-start;padding:14px}.sale-create-header-actions{flex-direction:column-reverse;align-items:stretch}.sale-create-layout{padding:12px}.sale-customer-row,.sale-grid-3,.sale-grid-4,.sale-create-sidebar{grid-template-columns:1fr}.sale-create-notice{grid-column:auto}.sale-secondary-button{width:100%}}@media(max-width:520px){.sale-create-header{position:static;display:grid}.sale-create-header-actions{display:grid;grid-template-columns:1fr 1fr}}

/* =========================================================
   CORRECÇÃO FINAL — NOVA VENDA
   Normaliza tamanhos, alinhamentos e responsividade.
   ========================================================= */

/* Impede que os campos cresçam além do padrão visual. */
.sale-create-page input,
.sale-create-page select,
.sale-create-page textarea,
.sale-create-page button {
  font-size: 0.72rem;
}

.sale-field,
.sale-product-choice,
.sale-product-select-wrap {
  min-width: 0;
}

/* Altura padrão para inputs e selects. */
.sale-field input,
.sale-field select,
.sale-product-choice select,
.sale-product-select,
.sale-money-input,
.sale-percent-input {
  height: 40px;
  min-height: 40px;
  max-height: 40px;
}

/* Textareas ficam maiores, mas controlados. */
.sale-field textarea {
  width: 100%;
  min-height: 72px;
  max-height: 140px;
  padding: 10px 11px;
  line-height: 1.4;
  resize: vertical;
}

/* Evita que grids estiquem os campos verticalmente. */
.sale-grid-3,
.sale-grid-4,
.sale-customer-row {
  align-items: start;
}

.sale-grid-3 > .sale-field,
.sale-grid-4 > .sale-field,
.sale-customer-row > .sale-field {
  align-self: start;
}

/* Campo de observações de pagamento não deve ficar exagerado. */
.sale-grid-4 .sale-field textarea {
  height: 72px;
  min-height: 72px;
}

/* Campos de observações da entrega e gerais. */
.sale-field-full textarea {
  min-height: 78px;
}

/* Selector de produto alinhado com os outros campos. */
.sale-product-choice {
  grid-template-columns: 44px minmax(190px, 1fr);
  align-items: center;
}

.sale-product-thumb {
  width: 44px;
  height: 44px;
}

.sale-product-thumb svg {
  width: 24px;
  height: 24px;
}

.sale-product-choice label,
.sale-product-select-wrap {
  display: grid;
  min-width: 0;
  gap: 4px;
  align-content: center;
}

.sale-product-choice select,
.sale-product-select {
  width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 0 34px 0 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-product-choice small {
  min-height: 14px;
  margin-top: 0;
  line-height: 1.25;
}

/* Tabela mais equilibrada e próxima do mockup. */
.sale-items-table {
  min-width: 960px;
  table-layout: fixed;
}

.sale-items-table th:nth-child(1),
.sale-items-table td:nth-child(1) {
  width: 34%;
}

.sale-items-table th:nth-child(2),
.sale-items-table td:nth-child(2) {
  width: 15%;
}

.sale-items-table th:nth-child(3),
.sale-items-table td:nth-child(3) {
  width: 13%;
}

.sale-items-table th:nth-child(4),
.sale-items-table td:nth-child(4) {
  width: 14%;
}

.sale-items-table th:nth-child(5),
.sale-items-table td:nth-child(5) {
  width: 15%;
}

.sale-items-table th:nth-child(6),
.sale-items-table td:nth-child(6) {
  width: 9%;
  text-align: center;
}

.sale-items-table td {
  vertical-align: middle;
}

/* Campos monetários uniformes. */
.sale-money-input,
.sale-percent-input {
  display: flex;
  width: 100%;
  overflow: hidden;
}

.sale-money-input input,
.sale-percent-input input {
  width: 100%;
  height: 38px;
  min-height: 38px;
  padding: 0 9px;
}

.sale-money-input span,
.sale-percent-input span {
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 0 8px;
  border-left: 1px solid #eef0f2;
  background: #fafbfc;
  white-space: nowrap;
}

/* Quantidade com tamanho compacto. */
.sale-quantity-control {
  width: 108px;
  margin-inline: auto;
  grid-template-columns: 32px 44px 32px;
}

.sale-quantity-control button,
.sale-quantity-control input {
  width: 100%;
  height: 38px;
  min-height: 38px;
}

/* Remove setas nativas exageradas dos campos numéricos. */
.sale-create-page input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.sale-create-page input[type="number"]::-webkit-inner-spin-button,
.sale-create-page input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

/* Centraliza correctamente o botão Adicionar produto. */
.sale-add-product {
  width: max-content;
  min-width: 150px;
  margin: 14px auto 0;
}

/* Botões superiores com dimensões iguais. */
.sale-create-cancel,
.sale-create-save {
  min-width: 116px;
  height: 40px;
  min-height: 40px;
}

/* Cartões laterais não devem esticar. */
.sale-create-sidebar {
  align-self: start;
}

.sale-summary-card {
  min-width: 0;
}

.sale-summary-card dd {
  max-width: 58%;
  overflow-wrap: anywhere;
}

/* Melhor foco e acessibilidade. */
.sale-create-page input:focus-visible,
.sale-create-page select:focus-visible,
.sale-create-page textarea:focus-visible,
.sale-create-page button:focus-visible,
.sale-create-page a:focus-visible {
  outline: 3px solid rgba(215, 25, 25, 0.16);
  outline-offset: 2px;
}

/* Evita que campos readonly pareçam editáveis. */
.sale-create-page input[readonly] {
  background: #f8f9fb;
  color: #475467;
  cursor: not-allowed;
}

/* Responsividade intermédia. */
@media (max-width: 1450px) {
  .sale-create-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .sale-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sale-grid-4 .sale-field:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 1180px) {
  .sale-create-layout {
    grid-template-columns: 1fr;
  }

  .sale-create-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sale-create-notice {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .sale-grid-3,
  .sale-grid-4,
  .sale-customer-row,
  .sale-create-sidebar {
    grid-template-columns: 1fr;
  }

  .sale-grid-4 .sale-field:last-child,
  .sale-create-notice {
    grid-column: auto;
  }

  .sale-create-header {
    gap: 12px;
  }

  .sale-create-header-actions {
    width: 100%;
    flex-direction: row;
  }

  .sale-create-cancel,
  .sale-create-save {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .sale-create-header-actions {
    grid-template-columns: 1fr;
  }

  .sale-create-cancel,
  .sale-create-save {
    width: 100%;
  }
}

/* =========================================================
   AJUSTES FINAIS — CLIENTE E ADICIONAR PRODUTO
   ========================================================= */

/* Alinha o botão Novo cliente com o select de cliente */
.sale-customer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.sale-customer-row .sale-field {
  min-width: 0;
}

.sale-customer-row .sale-field select {
  width: 100%;
  height: 40px;
  min-height: 40px;
}

.sale-customer-row .sale-secondary-button {
  height: 40px;
  min-height: 40px;
  margin: 0;
  align-self: end;
  white-space: nowrap;
}

/* Centraliza realmente o botão Adicionar produto */
.sale-items-body {
  display: flex;
  flex-direction: column;
}

.sale-add-product {
  display: inline-flex;
  width: auto;
  min-width: 160px;
  align-self: center;
  justify-content: center;
  margin: 14px auto 0;
}

/* Mantém alinhamento correcto em ecrãs pequenos */
@media (max-width: 780px) {
  .sale-customer-row {
    grid-template-columns: 1fr;
  }

  .sale-customer-row .sale-secondary-button {
    width: 100%;
  }

  .sale-add-product {
    width: min(100%, 220px);
  }
}

/* =========================================================
   NOVA VENDA — COMPORTAMENTO DOS ITENS
   ========================================================= */

.sale-delete-item:disabled,
.sale-delete-item[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.38;
}

.sale-delete-item:not(:disabled):hover {
  border-color: #f4b9bd;
  background: #fff3f4;
}

.sale-add-product:hover {
  transform: translateY(-1px);
}

.sale-add-product:active {
  transform: translateY(0);
}

/* Actualização suave dos filtros de vendas */
.sales-kpi-grid,
.sales-table-card {
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.sales-kpi-grid.is-loading,
.sales-table-card.is-loading {
  opacity: 0.45;
  pointer-events: none;
}

.sales-table-card.is-loading {
  transform: translateY(2px);
}

.sales-filter-form[aria-busy="true"] {
  cursor: progress;
}

.sales-more-filters {
  display: none;
}


/* DETALHES DA VENDA*/
.sale-detail-page {
  display: grid;
  gap: 16px;
  margin: -22px -24px -30px;
  padding: 0 18px 92px;
  background: #f7f8fa;
}
.sale-detail-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 8px 14px;
  border-bottom: 1px solid #e7e9ed;
  background: #fff;
}
.sale-detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #697386;
  font-size: 0.68rem;
}
.sale-detail-breadcrumb a {
  text-decoration: none;
}
.sale-detail-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.sale-detail-title-row h1 {
  margin: 0;
  color: #101828;
  font-size: clamp(1.35rem, 2.3vw, 1.8rem);
}
.sale-detail-hero p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 0.74rem;
}
.sale-detail-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sale-detail-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
}
.sale-detail-button.is-light {
  background: #fff;
  color: #253047;
}
.sale-detail-button.is-primary {
  border-color: #e30613;
  background: #e30613;
  color: #fff;
}
.sale-detail-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}
.sale-detail-tabs {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 0 8px;
  border-bottom: 1px solid #e7e9ed;
  background: #fff;
}
.sale-detail-tabs a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border-bottom: 2px solid transparent;
  color: #475467;
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
}
.sale-detail-tabs a:hover,
.sale-detail-tabs a.is-active {
  border-bottom-color: #e30613;
  color: #e30613;
}
.sale-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}
.sale-detail-main,
.sale-detail-side {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 16px;
}
.sale-detail-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.sale-detail-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.035);
}
.sale-detail-card h2 {
  margin: 0;
  color: #111827;
  font-size: 0.82rem;
}
.sale-detail-card-title,
.sale-detail-card-heading-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.sale-detail-card-heading-row {
  justify-content: space-between;
}
.sale-detail-card-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 0.72rem;
}
.sale-detail-card-icon.is-blue {
  background: #eaf3ff;
  color: #1265c7;
}
.sale-detail-card-icon.is-yellow {
  background: #fff6dc;
  color: #b87800;
}
.sale-detail-card-icon.is-purple {
  background: #f2edff;
  color: #7553c8;
}
.sale-detail-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 800;
}
.sale-detail-badge.is-success {
  background: #e5f7eb;
  color: #147542;
}
.sale-detail-badge.is-warning {
  background: #fff4d9;
  color: #9a6500;
}
.sale-detail-badge.is-info {
  background: #eaf3ff;
  color: #1265c7;
}
.sale-detail-badge.is-purple {
  background: #f2edff;
  color: #7553c8;
}
.sale-detail-badge.is-danger {
  background: #fff0f0;
  color: #c62828;
}
.sale-detail-badge.is-neutral {
  background: #f1f3f5;
  color: #667085;
}
.sale-detail-list {
  display: grid;
  gap: 13px;
  margin: 16px 0 0;
}
.sale-detail-list > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.sale-detail-list dt,
.sale-detail-list dd {
  margin: 0;
  font-size: 0.68rem;
}
.sale-detail-list dt {
  color: #667085;
}
.sale-detail-list dd {
  max-width: 58%;
  color: #111827;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}
.sale-detail-list .is-red,
.sale-detail-table .is-red {
  color: #e30613;
}
.sale-detail-customer {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}
.sale-detail-customer > strong {
  font-size: 1.04rem;
}
.sale-detail-customer p {
  margin: 0;
  color: #3f4857;
  font-size: 0.7rem;
}
.sale-detail-financial dl {
  display: grid;
  gap: 11px;
  margin: 16px 0 0;
}
.sale-detail-financial dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.sale-detail-financial dt,
.sale-detail-financial dd {
  margin: 0;
  font-size: 0.68rem;
}
.sale-detail-financial .is-total {
  margin-top: 4px;
  padding-top: 11px;
  border-top: 1px solid #e7e9ed;
  font-weight: 900;
}
.sale-detail-financial-highlight {
  display: grid;
  gap: 8px;
  margin-top: 13px;
  padding: 10px;
  border: 1px solid #bde8ca;
  border-radius: 8px;
  background: #eefbf2;
}
.sale-detail-financial-highlight > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #147542;
  font-size: 0.67rem;
}
.sale-detail-products {
  padding: 0;
  overflow: hidden;
}
.sale-detail-products > .sale-detail-card-title {
  padding: 14px 16px;
  border-bottom: 1px solid #e7e9ed;
}
.sale-detail-table-wrap {
  overflow-x: auto;
}
.sale-detail-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}
.sale-detail-table th,
.sale-detail-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf0f3;
  color: #344054;
  font-size: 0.68rem;
  text-align: left;
}
.sale-detail-table th {
  background: #fafbfc;
  color: #667085;
  font-size: 0.62rem;
}
.sale-detail-product-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sale-detail-product-thumb {
  width: 46px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f4f5f7;
  font-size: 1.25rem;
}
.sale-detail-product-name strong,
.sale-detail-product-name small {
  display: block;
}
.sale-detail-product-name small {
  color: #7b8492;
  font-size: 0.58rem;
}
.sale-detail-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.sale-detail-note,
.sale-detail-empty {
  margin: 14px 0 0;
  color: #5d6675;
  font-size: 0.68rem;
  line-height: 1.55;
}
.sale-detail-payment-method {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid #e7e9ed;
  border-radius: 9px;
}
.sale-detail-payment-method > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #e7e9ed;
  border-radius: 50%;
  color: #e30613;
}
.sale-detail-payment-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.sale-detail-payment-list article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid #edf0f3;
  border-radius: 8px;
}
.sale-detail-payment-list strong,
.sale-detail-payment-list small,
.sale-detail-payment-list time {
  display: block;
  font-size: 0.62rem;
}
.sale-detail-timeline {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.sale-detail-timeline article {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
}
.sale-detail-timeline article > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.58rem;
  font-weight: 900;
}
.sale-detail-timeline .is-success {
  background: #e5f7eb;
  color: #147542;
}
.sale-detail-timeline .is-info {
  background: #eaf3ff;
  color: #1265c7;
}
.sale-detail-timeline .is-neutral {
  background: #f1f3f5;
  color: #667085;
}
.sale-detail-timeline strong,
.sale-detail-timeline small {
  display: block;
}
.sale-detail-timeline strong {
  font-size: 0.65rem;
}
.sale-detail-timeline small {
  color: #8a929e;
  font-size: 0.57rem;
}
.sale-detail-summary-bar {
  position: fixed;
  z-index: 55;
  right: 0;
  bottom: 0;
  left: 244px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid #e2e6eb;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -8px 24px rgba(16, 24, 40, 0.06);
}
.sale-detail-summary-bar > div {
  min-width: 0;
  padding: 12px 18px;
  border-right: 1px solid #edf0f3;
}
.sale-detail-summary-bar span,
.sale-detail-summary-bar strong {
  display: block;
}
.sale-detail-summary-bar span {
  color: #7a8391;
  font-size: 0.6rem;
}
.sale-detail-summary-bar strong {
  margin-top: 2px;
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sale-detail-summary-bar .is-success strong {
  color: #138a4a;
}
.sale-detail-summary-bar .is-danger strong {
  color: #d71919;
}
.sale-detail-summary-bar .is-info strong {
  color: #1265c7;
}
.sale-detail-summary-bar .is-warning strong {
  color: #9a6500;
}
@media (max-width: 1250px) {
  .sale-detail-layout {
    grid-template-columns: 1fr;
  }
  .sale-detail-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1050px) {
  .sale-detail-top-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sale-detail-financial {
    grid-column: 1/-1;
  }
  .sale-detail-summary-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 850px) {
  .sale-detail-page {
    margin: -20px -14px -24px;
    padding-bottom: 24px;
  }
  .sale-detail-summary-bar {
    position: static;
    left: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sale-detail-side {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .sale-detail-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .sale-detail-hero-actions {
    width: 100%;
  }
  .sale-detail-button {
    flex: 1 1 140px;
  }
  .sale-detail-top-grid,
  .sale-detail-notes-grid {
    grid-template-columns: 1fr;
  }
  .sale-detail-financial {
    grid-column: auto;
  }
}
@media (max-width: 480px) {
  .sale-detail-page {
    padding-inline: 10px;
  }
  .sale-detail-summary-bar {
    grid-template-columns: 1fr;
  }
}

/* SVGs dos detalhes da venda */
.sale-detail-card-icon svg,
.sale-detail-inline-icon svg,
.sale-detail-product-thumb svg,
.sale-detail-payment-method > span svg,
.sale-detail-timeline article > span svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sale-detail-inline-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  flex: 0 0 18px;
  place-items: center;
  color: #667085;
}

.sale-detail-product-thumb svg {
  width: 28px;
  height: 28px;
}

.sale-detail-payment-method > span svg {
  width: 22px;
  height: 22px;
}

.sale-detail-timeline article > span svg {
  width: 13px;
  height: 13px;
}

/* =========================================================
   DOCUMENTO DA VENDA
   ========================================================= */
.sale-document-page { display:grid; gap:16px; }
.sale-document-toolbar { display:flex; justify-content:flex-end; gap:10px; }
.sale-document-button { min-height:42px; display:inline-flex; align-items:center; justify-content:center; padding:0 16px; border:1px solid var(--mc-border); border-radius:9px; font-size:.75rem; font-weight:800; text-decoration:none; cursor:pointer; }
.sale-document-button.is-light { background:#fff; color:#273143; }
.sale-document-button.is-primary { border-color:var(--mc-red); background:var(--mc-red); color:#fff; }
.sale-document-sheet { width:min(980px,100%); margin:0 auto; padding:34px; border:1px solid var(--mc-border); border-radius:14px; background:#fff; box-shadow:var(--mc-shadow); }
.sale-document-header { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; padding-bottom:22px; border-bottom:2px solid #15171b; }
.sale-document-brand { display:flex; align-items:center; gap:16px; }
.sale-document-brand img { width:150px; max-height:72px; object-fit:contain; object-position:left center; }
.sale-document-brand strong,.sale-document-brand span { display:block; }
.sale-document-brand strong { color:#111827; font-size:1rem; }
.sale-document-brand span { margin-top:3px; color:var(--mc-muted); font-size:.72rem; }
.sale-document-reference { display:grid; gap:3px; text-align:right; }
.sale-document-reference small { color:var(--mc-muted); font-size:.62rem; }
.sale-document-reference strong { color:var(--mc-red); font-size:1.12rem; }
.sale-document-reference span { color:#263043; font-size:.72rem; }
.sale-document-info-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; margin-top:26px; }
.sale-document-info-grid section,.sale-document-notes,.sale-document-totals { padding:18px; border:1px solid var(--mc-border); border-radius:10px; }
.sale-document-sheet h2 { margin:0 0 14px; color:#111827; font-size:.84rem; }
.sale-document-sheet dl { display:grid; gap:10px; margin:0; }
.sale-document-sheet dl>div { display:flex; justify-content:space-between; gap:16px; }
.sale-document-sheet dt,.sale-document-sheet dd { margin:0; font-size:.7rem; }
.sale-document-sheet dt { color:var(--mc-muted); }
.sale-document-sheet dd { color:#111827; font-weight:700; text-align:right; }
.sale-document-items { margin-top:24px; overflow-x:auto; }
.sale-document-items table { width:100%; min-width:720px; border-collapse:collapse; }
.sale-document-items th,.sale-document-items td { padding:11px 10px; border-bottom:1px solid var(--mc-border); font-size:.68rem; text-align:left; vertical-align:top; }
.sale-document-items th { background:#f7f8fa; color:#5f6877; }
.sale-document-items td:last-child,.sale-document-items th:last-child { text-align:right; }
.sale-document-bottom-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(280px,.7fr); gap:24px; margin-top:24px; }
.sale-document-notes p { margin:0 0 10px; color:#4f5968; font-size:.68rem; line-height:1.55; }
.sale-document-totals .is-total { margin-top:4px; padding-top:10px; border-top:1px solid var(--mc-border); }
.sale-document-totals .is-total dt,.sale-document-totals .is-total dd { color:#111827; font-size:.9rem; font-weight:900; }
.sale-document-footer { display:flex; justify-content:space-between; gap:20px; margin-top:28px; padding-top:16px; border-top:1px solid var(--mc-border); color:var(--mc-muted); font-size:.66rem; }
.sale-document-footer p { margin:0; }
@media (max-width:760px) {
	.sale-document-sheet {
		padding: 20px;
	}

	.sale-document-header,.sale-document-footer {
		flex-direction: column;
	}

	.sale-document-reference {
		text-align: left;
	}

	.sale-document-info-grid,.sale-document-bottom-grid {
		grid-template-columns: 1fr;
	}
}

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  html,
  body {
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
    color: #202124 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  /*
   * Oculta apenas a estrutura administrativa.
   */
  .admin-sidebar,
  .admin-sidebar-overlay,
  .admin-topbar,
  .admin-footer,
  .sale-document-toolbar,
  .no-print {
    display: none !important;
  }

  .admin-shell,
  .admin-main,
  .admin-content {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
  }

  /*
   * Área principal do documento.
   */
  .sale-document-page {
    width: 100% !important;
    max-width: none !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  .sale-document-sheet {
    width: 100% !important;
    max-width: none !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 24px !important;
    overflow: visible !important;
    border: 1px solid #e3e5e8 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  /*
   * Cabeçalho: força logótipo e referência
   * a permanecerem na mesma linha.
   */
  .sale-document-header {
    width: 100% !important;
    display: grid !important;
    grid-template-columns:
      minmax(0, 1fr)
      minmax(190px, 230px) !important;
    align-items: start !important;
    gap: 24px !important;
    padding: 0 0 20px !important;
    border-bottom: 2px solid #15171b !important;
  }

  .sale-document-brand {
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
  }

  .sale-document-brand img {
    width: 145px !important;
    height: 66px !important;
    max-width: 145px !important;
    max-height: 66px !important;
    display: block !important;
    object-fit: contain !important;
    object-position: left center !important;
  }

  .sale-document-brand > div {
    min-width: 0 !important;
  }

  .sale-document-brand strong {
    display: block !important;
    color: #111827 !important;
    font-size: 12pt !important;
    line-height: 1.25 !important;
  }

  .sale-document-brand span {
    display: block !important;
    margin-top: 4px !important;
    color: #70757d !important;
    font-size: 8.5pt !important;
  }

  .sale-document-reference {
    min-width: 190px !important;
    display: grid !important;
    justify-items: end !important;
    gap: 3px !important;
    text-align: right !important;
  }

  .sale-document-reference small {
    color: #70757d !important;
    font-size: 7.5pt !important;
  }

  .sale-document-reference strong {
    display: block !important;
    color: #d71919 !important;
    font-size: 13pt !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
  }

  .sale-document-reference span {
    color: #263043 !important;
    font-size: 8.5pt !important;
    white-space: nowrap !important;
  }

  /*
   * Cartões Cliente e Venda.
   */
  .sale-document-info-grid {
    width: 100% !important;
    display: grid !important;
    grid-template-columns:
      repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
    margin-top: 22px !important;
  }

  .sale-document-info-grid section,
  .sale-document-notes,
  .sale-document-totals {
    min-width: 0 !important;
    padding: 16px !important;
    overflow: hidden !important;
    border: 1px solid #e3e5e8 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
  }

  .sale-document-sheet h2 {
    margin: 0 0 13px !important;
    color: #111827 !important;
    font-size: 10pt !important;
    line-height: 1.3 !important;
  }

  .sale-document-sheet dl {
    display: grid !important;
    gap: 9px !important;
    margin: 0 !important;
  }

  .sale-document-sheet dl > div {
    display: grid !important;
    grid-template-columns:
      minmax(90px, 0.8fr)
      minmax(0, 1.2fr) !important;
    align-items: start !important;
    gap: 12px !important;
  }

  .sale-document-sheet dt,
  .sale-document-sheet dd {
    margin: 0 !important;
    font-size: 8.2pt !important;
    line-height: 1.35 !important;
  }

  .sale-document-sheet dt {
    color: #70757d !important;
  }

  .sale-document-sheet dd {
    color: #111827 !important;
    font-weight: 700 !important;
    text-align: right !important;
    overflow-wrap: anywhere !important;
  }

  /*
   * Tabela de produtos.
   */
  .sale-document-items {
    width: 100% !important;
    margin-top: 22px !important;
    overflow: visible !important;
  }

  .sale-document-items table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }

  .sale-document-items th,
  .sale-document-items td {
    padding: 9px 8px !important;
    border-bottom: 1px solid #e3e5e8 !important;
    font-size: 7.8pt !important;
    line-height: 1.35 !important;
    vertical-align: top !important;
  }

  .sale-document-items th {
    background: #f7f8fa !important;
    color: #5f6877 !important;
    font-weight: 700 !important;
  }

  .sale-document-items th:nth-child(1),
  .sale-document-items td:nth-child(1) {
    width: 28% !important;
  }

  .sale-document-items th:nth-child(2),
  .sale-document-items td:nth-child(2) {
    width: 8% !important;
    text-align: center !important;
  }

  .sale-document-items th:nth-child(3),
  .sale-document-items td:nth-child(3),
  .sale-document-items th:nth-child(4),
  .sale-document-items td:nth-child(4),
  .sale-document-items th:nth-child(5),
  .sale-document-items td:nth-child(5) {
    width: 16% !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  .sale-document-items th:nth-child(6),
  .sale-document-items td:nth-child(6) {
    width: 16% !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  /*
   * Entrega e resumo financeiro.
   */
  .sale-document-bottom-grid {
    width: 100% !important;
    display: grid !important;
    grid-template-columns:
      minmax(0, 1.35fr)
      minmax(245px, 0.65fr) !important;
    align-items: stretch !important;
    gap: 20px !important;
    margin-top: 22px !important;
  }

  .sale-document-notes p {
    margin: 0 0 9px !important;
    color: #4f5968 !important;
    font-size: 8pt !important;
    line-height: 1.5 !important;
  }

  .sale-document-totals dl > div {
    grid-template-columns:
      minmax(80px, 1fr)
      minmax(120px, auto) !important;
  }

  .sale-document-totals .is-total {
    margin-top: 4px !important;
    padding-top: 10px !important;
    border-top: 1px solid #e3e5e8 !important;
  }

  .sale-document-totals .is-total dt,
  .sale-document-totals .is-total dd {
    color: #111827 !important;
    font-size: 11pt !important;
    font-weight: 900 !important;
  }

  /*
   * Rodapé.
   */
  .sale-document-footer {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    margin-top: 24px !important;
    padding-top: 14px !important;
    border-top: 1px solid #e3e5e8 !important;
    color: #70757d !important;
    font-size: 7.5pt !important;
  }

  .sale-document-footer p {
    margin: 0 !important;
  }

  /*
   * Não aplica os layouts mobile durante a impressão.
   */
  .sale-document-header,
  .sale-document-footer {
    flex-direction: initial !important;
  }

  /*
   * Evita cortes incorrectos.
   */
  .sale-document-header,
  .sale-document-info-grid,
  .sale-document-info-grid section,
  .sale-document-items tr,
  .sale-document-bottom-grid,
  .sale-document-notes,
  .sale-document-totals,
  .sale-document-footer {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /*
   * Não imprime endereços dos links.
   */
  a,
  a:visited {
    color: inherit !important;
    text-decoration: none !important;
  }

  a[href]::after {
    content: none !important;
  }
}

/* =========================================================
   PÁGINA DE REGISTO DE PAGAMENTO — MOTOKIDS
   ========================================================= */

.sale-payment-page {
  display: grid;
  gap: 14px;
  margin: -22px -24px -30px;
  padding: 0 16px 32px;
  background: #f7f8fa;
}

/* =========================================================
   CABEÇALHO
   ========================================================= */

.sale-payment-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 8px 14px;
  border-bottom: 1px solid #e4e7ec;
  background: #fff;
}

.sale-payment-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
  color: #667085;
  font-size: 0.68rem;
}

.sale-payment-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.sale-payment-breadcrumb a:hover {
  color: var(--mc-red);
}

.sale-payment-breadcrumb strong {
  color: #344054;
}

.sale-payment-top h1 {
  margin: 0;
  color: #101828;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.2;
}

.sale-payment-top p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 0.74rem;
}

.sale-payment-top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.sale-payment-top-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.sale-payment-top-button:hover {
  transform: translateY(-1px);
}

.sale-payment-top-button.is-light {
  background: #fff;
  color: #344054;
}

.sale-payment-top-button.is-light:hover {
  border-color: rgba(215, 25, 25, 0.35);
  background: #fff6f6;
  color: var(--mc-red);
}

.sale-payment-top-button.is-primary {
  border-color: var(--mc-red);
  background: linear-gradient(
    135deg,
    #eb1523,
    var(--mc-red)
  );
  color: #fff;
  box-shadow: 0 8px 18px rgba(215, 25, 25, 0.18);
}

.sale-payment-top-button.is-primary:hover {
  box-shadow: 0 11px 24px rgba(215, 25, 25, 0.24);
}

/* =========================================================
   ESTRUTURA PRINCIPAL
   ========================================================= */

.sale-payment-layout {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    350px;
  gap: 16px;
}

.sale-payment-form,
.sale-payment-sidebar {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
}

/* =========================================================
   SECÇÕES E CARTÕES
   ========================================================= */

.sale-payment-section,
.sale-payment-summary-card {
  overflow: hidden;
  border: 1px solid #e1e5ea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(16, 24, 40, 0.03);
}

.sale-payment-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #edf0f3;
}

.sale-payment-section-title > span {
  width: 25px;
  height: 25px;
  display: grid;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--mc-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
}

.sale-payment-section-title h2,
.sale-payment-summary-card h2,
.sale-payment-summary-card h3 {
  margin: 0;
  color: #111827;
  font-size: 0.8rem;
}

.sale-payment-section-body {
  padding: 16px;
}

.sale-payment-summary-card {
  padding: 16px;
}

.sale-payment-summary-card h2 {
  margin-bottom: 18px;
}

.sale-payment-summary-card h3 {
  margin-bottom: 14px;
}

/* =========================================================
   CAMPOS DO FORMULÁRIO
   ========================================================= */

.sale-payment-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.sale-payment-field {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.sale-payment-field > span,
.sale-payment-choice-label {
  color: #273143;
  font-size: 0.68rem;
  font-weight: 800;
}

.sale-payment-field b {
  color: var(--mc-red);
}

.sale-payment-field input,
.sale-payment-field select,
.sale-payment-field textarea,
.sale-payment-internal-notes {
  width: 100%;
  min-width: 0;
  border: 1px solid #d8dde5;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  outline: 0;
  font-size: 0.75rem;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.sale-payment-field input,
.sale-payment-field select {
  min-height: 40px;
  padding: 0 11px;
}

.sale-payment-field select {
  cursor: pointer;
}

.sale-payment-field textarea,
.sale-payment-internal-notes {
  min-height: 92px;
  padding: 11px;
  line-height: 1.5;
  resize: vertical;
}

.sale-payment-field input:focus,
.sale-payment-field select:focus,
.sale-payment-field textarea:focus,
.sale-payment-internal-notes:focus {
  border-color: rgba(215, 25, 25, 0.52);
  box-shadow: 0 0 0 3px rgba(215, 25, 25, 0.08);
}

.sale-payment-field input[readonly] {
  background: #f7f8fa;
  color: #475467;
  cursor: default;
}

.sale-payment-field-full {
  grid-column: 1 / -1;
}

/* =========================================================
   CONFIRMAÇÃO: TOTAL OU PARCIAL
   ========================================================= */

.sale-payment-confirm-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.2fr)
    minmax(250px, 0.8fr);
  gap: 24px;
}

.sale-payment-choice-group {
  display: grid;
  gap: 11px;
}

.sale-payment-radio {
  display: grid;
  grid-template-columns:
    18px
    minmax(0, 1fr);
  gap: 10px;
  cursor: pointer;
}

.sale-payment-radio input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.sale-payment-radio > span {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1px solid #bfc6d1;
  border-radius: 50%;
  background: #fff;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.sale-payment-radio input:checked + span {
  border: 5px solid var(--mc-red);
}

.sale-payment-radio input:focus-visible + span {
  outline: 3px solid rgba(215, 25, 25, 0.18);
  outline-offset: 2px;
}

.sale-payment-radio strong,
.sale-payment-radio small {
  display: block;
}

.sale-payment-radio strong {
  color: #273143;
  font-size: 0.72rem;
}

.sale-payment-radio small {
  margin-top: 2px;
  color: #7a8391;
  font-size: 0.62rem;
  line-height: 1.4;
}

/* =========================================================
   AVISOS
   ========================================================= */

.sale-payment-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid;
  border-radius: 8px;
}

.sale-payment-alert p {
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.5;
}

.sale-payment-alert.is-warning {
  border-color: #f0d39b;
  background: #fff9eb;
  color: #8b6200;
}

.sale-payment-alert.is-info {
  border-color: #bfd8ff;
  background: #eef5ff;
  color: #1f5da7;
}

.sale-payment-internal-notes {
  margin-top: 10px;
}

/* =========================================================
   RESUMO LATERAL
   ========================================================= */

.sale-payment-summary-card dl {
  display: grid;
  gap: 17px;
  margin: 0;
}

.sale-payment-summary-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.sale-payment-summary-card dt,
.sale-payment-summary-card dd {
  margin: 0;
  font-size: 0.7rem;
}

.sale-payment-summary-card dt {
  color: #475467;
}

.sale-payment-summary-card dd {
  color: #111827;
  font-weight: 700;
  text-align: right;
}

.sale-payment-summary-card .is-success {
  color: #138a4a;
}

.sale-payment-summary-card .is-danger {
  color: #d71919;
}

.sale-payment-summary-divider {
  height: 1px;
  margin: 20px 0;
  background: #e7e9ed;
}

/* =========================================================
   PREVISÃO DO SALDO
   ========================================================= */

.sale-payment-balance-preview {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid;
  border-radius: 8px;
  font-size: 0.72rem;
}

.sale-payment-balance-preview span,
.sale-payment-balance-preview strong {
  display: block;
}

.sale-payment-balance-preview.is-paid {
  border-color: #b7e2c5;
  background: #eefbf2;
  color: #147542;
}

.sale-payment-balance-preview.is-pending {
  border-color: #f0d39b;
  background: #fff9eb;
  color: #8b6200;
}

.sale-payment-result-message {
  display: grid;
  gap: 11px;
  margin-top: 16px;
  padding: 13px;
  border: 1px solid;
  border-radius: 8px;
}

.sale-payment-result-message strong,
.sale-payment-result-message small {
  display: block;
}

.sale-payment-result-message strong {
  font-size: 0.7rem;
}

.sale-payment-result-message small {
  margin-top: 2px;
  font-size: 0.61rem;
  line-height: 1.4;
}

.sale-payment-result-message.is-success {
  border-color: #b7e2c5;
  background: #eefbf2;
  color: #147542;
}

.sale-payment-result-message.is-warning {
  border-color: #f0d39b;
  background: #fff9eb;
  color: #8b6200;
}

/* =========================================================
   HISTÓRICO DE PAGAMENTOS
   ========================================================= */

.sale-payment-empty-history {
  display: grid;
  justify-items: center;
  padding: 28px 12px;
  color: #667085;
  text-align: center;
}

.sale-payment-empty-history p,
.sale-payment-empty-history small {
  margin: 0;
}

.sale-payment-empty-history p {
  color: #344054;
  font-size: 0.7rem;
}

.sale-payment-empty-history small {
  margin-top: 4px;
  font-size: 0.61rem;
}

.sale-payment-history-list {
  display: grid;
  gap: 10px;
}

.sale-payment-history-list article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0f3;
}

.sale-payment-history-list article:last-child {
  border-bottom: 0;
}

.sale-payment-history-list strong,
.sale-payment-history-list span,
.sale-payment-history-list small {
  display: block;
}

.sale-payment-history-list strong {
  color: #111827;
  font-size: 0.7rem;
}

.sale-payment-history-list span,
.sale-payment-history-list small {
  color: #7a8391;
  font-size: 0.61rem;
}

.sale-payment-history-list small {
  text-align: right;
}

/* =========================================================
   ESTADOS DE INTERACÇÃO
   ========================================================= */

.sale-payment-top-button:focus-visible,
.sale-payment-field input:focus-visible,
.sale-payment-field select:focus-visible,
.sale-payment-field textarea:focus-visible,
.sale-payment-internal-notes:focus-visible {
  outline: 3px solid rgba(215, 25, 25, 0.16);
  outline-offset: 2px;
}

/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 1180px) {
  .sale-payment-layout {
    grid-template-columns: 1fr;
  }

  .sale-payment-sidebar {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 950px) {
  .sale-payment-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .sale-payment-page {
    margin: -20px -14px -24px;
  }
}

@media (max-width: 700px) {
  .sale-payment-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .sale-payment-top-actions {
    width: 100%;
  }

  .sale-payment-top-button {
    flex: 1 1 150px;
  }

  .sale-payment-grid,
  .sale-payment-confirm-grid,
  .sale-payment-sidebar {
    grid-template-columns: 1fr;
  }

  .sale-payment-field-full {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  .sale-payment-page {
    padding-inline: 10px;
  }

  .sale-payment-top-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sale-payment-top-button {
    width: 100%;
  }

  .sale-payment-summary-card dl > div {
    align-items: flex-start;
  }
}

.sale-detail-button.is-paid {
  border-color: #b7e2c5;
  background: #eefbf2;
  color: #147542;
  cursor: default;
  pointer-events: none;
}

/* =========================================================
   ALTERAÇÃO DO ESTADO DA VENDA
   ========================================================= */

.sale-status-form {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 13px;
  border: 1px solid #e2e6eb;
  border-radius: 10px;
  background: #fff;
}

.sale-status-field {
  min-width: 210px;
  display: grid;
  flex: 1 1 230px;
  gap: 6px;
}

.sale-status-field > span {
  color: #344054;
  font-size: 0.7rem;
  font-weight: 800;
}

.sale-status-field select {
  width: 100%;
  min-height: 40px;
  padding: 0 36px 0 11px;
  border: 1px solid #d8dde5;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 0.75rem;
  outline: none;
  cursor: pointer;
}

.sale-status-field select:focus {
  border-color: rgba(215, 25, 25, 0.5);
  box-shadow: 0 0 0 3px rgba(215, 25, 25, 0.08);
}

.sale-status-submit {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #d71919;
  border-radius: 8px;
  background: #d71919;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.sale-status-submit:hover {
  background: #bd1212;
  box-shadow: 0 8px 18px rgba(215, 25, 25, 0.2);
  transform: translateY(-1px);
}

.sale-status-closed {
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 700;
}

.sale-status-closed.is-completed {
  border-color: #b7e2c5;
  background: #eefbf2;
  color: #147542;
}

.sale-status-closed.is-cancelled {
  border-color: #f0b9b9;
  background: #fff1f1;
  color: #b42318;
}

@media (max-width: 600px) {
  .sale-status-form {
    align-items: stretch;
    flex-direction: column;
  }

  .sale-status-field,
  .sale-status-submit {
    width: 100%;
  }
}


/* =========================================================
   ACTUALIZAÇÃO DO ESTADO DA ENTREGA
   ========================================================= */

.delivery-status-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e7e9ed;
}

.delivery-status-field {
  display: grid;
  gap: 7px;
}

.delivery-status-field > span {
  color: #344054;
  font-size: 0.68rem;
  font-weight: 800;
}

.delivery-status-field select {
  width: 100%;
  min-height: 40px;
  padding: 0 36px 0 11px;
  border: 1px solid #d8dde5;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 0.74rem;
  outline: none;
  cursor: pointer;
}

.delivery-status-field select:focus {
  border-color: rgba(215, 25, 25, 0.5);
  box-shadow: 0 0 0 3px rgba(215, 25, 25, 0.08);
}

.delivery-status-submit {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #d71919;
  border-radius: 8px;
  background: #d71919;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.delivery-status-submit:hover {
  background: #bd1212;
  box-shadow: 0 8px 18px rgba(215, 25, 25, 0.2);
  transform: translateY(-1px);
}

.delivery-status-help {
  margin: 9px 0 0;
  padding: 9px 10px;
  border: 1px solid #f0d39b;
  border-radius: 7px;
  background: #fff9eb;
  color: #8b6200;
  font-size: 0.64rem;
  line-height: 1.5;
}

.delivery-status-closed {
  margin-top: 17px;
  padding: 11px 12px;
  border: 1px solid;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.5;
}

.delivery-status-closed.is-completed {
  border-color: #b7e2c5;
  background: #eefbf2;
  color: #147542;
}

.delivery-status-closed.is-cancelled {
  border-color: #f0b9b9;
  background: #fff1f1;
  color: #b42318;
}

/* =========================================================
   HISTÓRICO COMPLETO DA VENDA
   ========================================================= */

.sale-history-card {
  overflow: visible;
}

.sale-history-timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.sale-history-timeline::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 18px;
  width: 2px;
  background: #e7e9ed;
}

.sale-history-event {
  position: relative;
  display: grid;
  grid-template-columns:
    38px
    minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 20px;
}

.sale-history-event:last-child {
  padding-bottom: 0;
}

.sale-history-event-icon {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #eef1f5;
  color: #667085;
}

.sale-history-event-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sale-history-event-content {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #e5e8ed;
  border-radius: 9px;
  background: #fff;
}

.sale-history-event-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sale-history-event-heading strong {
  color: #1d2939;
  font-size: 0.71rem;
}

.sale-history-event-heading time {
  flex: 0 0 auto;
  color: #7a8391;
  font-size: 0.59rem;
  white-space: nowrap;
}

.sale-history-event-content p {
  margin: 5px 0;
  color: #475467;
  font-size: 0.65rem;
  line-height: 1.5;
}

.sale-history-event-content small {
  display: block;
  color: #98a2b3;
  font-size: 0.59rem;
}

.sale-history-event.is-payment
.sale-history-event-icon {
  background: #eefbf2;
  color: #138a4a;
}

.sale-history-event.is-delivery
.sale-history-event-icon {
  background: #eef5ff;
  color: #2468b4;
}

.sale-history-event.is-sale_status
.sale-history-event-icon {
  background: #f4f0ff;
  color: #7653c7;
}

.sale-history-event.is-created
.sale-history-event-icon {
  background: #fff6e5;
  color: #b77900;
}

.sale-history-event.is-info
.sale-history-event-icon {
  background: #eef5ff;
  color: #2468b4;
}

@media (max-width: 560px) {
  .sale-history-event-heading {
    flex-direction: column;
    gap: 3px;
  }

  .sale-history-event-heading time {
    white-space: normal;
  }
}

.sale-detail-tabs a {
  position: relative;
  color: #667085;
  text-decoration: none;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.sale-detail-tabs a:hover {
  color: #d71919;
}

.sale-detail-tabs a.is-active {
  color: #d71919;
  font-weight: 800;
}

.sale-detail-tabs a.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: #d71919;
}

#resumo,
#pagamentos,
#entrega,
#cliente,
#produtos,
#notas,
#historico {
  scroll-margin-top: 130px;
}

/* =========================================================
   MODAL DE CONFIRMAÇÃO DO SISTEMA
   ========================================================= */

.system-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

.system-confirm-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.system-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
}

.system-confirm-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  padding: 26px;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  background: #fff;
  box-shadow:
    0 25px 70px rgba(15, 23, 42, 0.28);
  text-align: center;
  transform: translateY(14px) scale(0.98);
  transition:
    transform 180ms ease;
}

.system-confirm-modal.is-open
.system-confirm-dialog {
  transform: translateY(0) scale(1);
}

.system-confirm-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #667085;
  font-size: 1.35rem;
  cursor: pointer;
}

.system-confirm-close:hover {
  background: #f2f4f7;
  color: #111827;
}

.system-confirm-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff4e5;
  color: #b76e00;
  font-size: 1.35rem;
  font-weight: 900;
}

.system-confirm-dialog h2 {
  margin: 0;
  color: #101828;
  font-size: 1.15rem;
}

.system-confirm-dialog p {
  margin: 10px 0 22px;
  color: #667085;
  font-size: 0.82rem;
  line-height: 1.55;
}

.system-confirm-actions {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.system-confirm-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.system-confirm-button:hover {
  transform: translateY(-1px);
}

.system-confirm-button.is-cancel {
  border-color: #d8dde5;
  background: #fff;
  color: #344054;
}

.system-confirm-button.is-cancel:hover {
  background: #f8fafc;
}

.system-confirm-button.is-confirm {
  background: #d71919;
  color: #fff;
  box-shadow:
    0 8px 18px rgba(215, 25, 25, 0.2);
}

.system-confirm-button.is-confirm:hover {
  background: #bd1212;
}

.system-confirm-button.is-confirm.is-danger {
  background: #b42318;
}

.system-confirm-button.is-confirm.is-danger:hover {
  background: #912018;
}

body.has-system-modal {
  overflow: hidden;
}

@media (max-width: 480px) {
  .system-confirm-dialog {
    padding: 24px 18px 18px;
  }

  .system-confirm-actions {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   RECIBO DE PAGAMENTO
   ========================================================= */

.payment-receipt-page {
  min-height: 100%;
  padding: 20px;
  background: #f4f6f8;
}

.payment-receipt-toolbar {
  width: min(100%, 920px);
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto 14px;
}

.payment-receipt-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid #d8dde5;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.payment-receipt-button.is-light {
  background: #fff;
  color: #344054;
}

.payment-receipt-button.is-primary {
  border-color: #d71919;
  background: #d71919;
  color: #fff;
}

.payment-receipt-sheet {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 32px;
  border: 1px solid #e3e6ea;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.payment-receipt-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 2px solid #16181d;
}

.payment-receipt-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.payment-receipt-brand img {
  width: 145px;
  max-height: 70px;
  object-fit: contain;
  object-position: left center;
}

.payment-receipt-brand strong,
.payment-receipt-brand span {
  display: block;
}

.payment-receipt-brand strong {
  color: #111827;
  font-size: 1rem;
}

.payment-receipt-brand span {
  margin-top: 4px;
  color: #667085;
  font-size: 0.75rem;
}

.payment-receipt-reference {
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
}

.payment-receipt-reference small {
  color: #667085;
  font-size: 0.68rem;
}

.payment-receipt-reference strong {
  color: #d71919;
  font-size: 1rem;
  white-space: nowrap;
}

.payment-receipt-reference span {
  color: #344054;
  font-size: 0.72rem;
}

.payment-receipt-intro {
  padding: 24px 0 8px;
}

.payment-receipt-intro h1 {
  margin: 0;
  color: #101828;
  font-size: 1.45rem;
}

.payment-receipt-intro p {
  max-width: 680px;
  margin: 8px 0 0;
  color: #667085;
  font-size: 0.78rem;
  line-height: 1.6;
}

.payment-receipt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.payment-receipt-card,
.payment-receipt-summary,
.payment-receipt-notes {
  padding: 17px;
  border: 1px solid #e3e6ea;
  border-radius: 10px;
  background: #fff;
}

.payment-receipt-card h2,
.payment-receipt-summary h2,
.payment-receipt-notes h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 0.82rem;
}

.payment-receipt-card dl,
.payment-receipt-summary dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.payment-receipt-card dl > div,
.payment-receipt-summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.payment-receipt-card dt,
.payment-receipt-card dd,
.payment-receipt-summary dt,
.payment-receipt-summary dd {
  margin: 0;
  font-size: 0.72rem;
}

.payment-receipt-card dt,
.payment-receipt-summary dt {
  color: #667085;
}

.payment-receipt-card dd,
.payment-receipt-summary dd {
  color: #111827;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.payment-receipt-amount {
  display: grid;
  justify-items: center;
  gap: 5px;
  margin-top: 20px;
  padding: 24px;
  border: 1px solid #f0bebe;
  border-radius: 12px;
  background: #fff6f6;
  text-align: center;
}

.payment-receipt-amount span {
  color: #7a3030;
  font-size: 0.75rem;
  font-weight: 700;
}

.payment-receipt-amount strong {
  color: #d71919;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}

.payment-receipt-amount small {
  color: #7a3030;
  font-size: 0.67rem;
}

.payment-receipt-summary {
  margin-top: 18px;
}

.payment-receipt-summary .is-balance {
  margin-top: 3px;
  padding-top: 11px;
  border-top: 1px solid #e5e7eb;
}

.payment-receipt-summary .is-success {
  color: #147542;
}

.payment-receipt-summary .is-danger {
  color: #b42318;
}

.payment-receipt-notes {
  margin-top: 18px;
}

.payment-receipt-notes p {
  margin: 0;
  color: #475467;
  font-size: 0.72rem;
  line-height: 1.6;
}

.payment-receipt-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid #e3e6ea;
  color: #667085;
  font-size: 0.65rem;
}

.payment-receipt-footer p {
  margin: 0;
}

@media (max-width: 700px) {
  .payment-receipt-page {
    padding: 10px;
  }

  .payment-receipt-sheet {
    padding: 20px;
  }

  .payment-receipt-header,
  .payment-receipt-grid {
    grid-template-columns: 1fr;
  }

  .payment-receipt-reference {
    justify-items: start;
    text-align: left;
  }

  .payment-receipt-footer {
    flex-direction: column;
    gap: 5px;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  .admin-sidebar,
  .admin-sidebar-overlay,
  .admin-topbar,
  .admin-footer,
  .payment-receipt-toolbar,
  .no-print {
    display: none !important;
  }

  html,
  body,
  .admin-shell,
  .admin-main,
  .admin-content,
  .payment-receipt-page {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .payment-receipt-sheet {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 24px !important;
    border: 1px solid #e3e6ea !important;
    border-radius: 12px !important;
    box-shadow: none !important;
  }

  .payment-receipt-header,
  .payment-receipt-grid,
  .payment-receipt-amount,
  .payment-receipt-summary,
  .payment-receipt-notes,
  .payment-receipt-footer {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  a[href]::after {
    content: none !important;
  }
}

.sale-detail-payment-receipt-link {
  display: inline-flex;
  margin-top: 5px;
  color: #d71919;
  font-size: 0.62rem;
  font-weight: 800;
  text-decoration: none;
}

.sale-detail-payment-receipt-link:hover {
  text-decoration: underline;
}

.sale-detail-payment-receipt-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(215, 25, 25, 0.18);
  background: linear-gradient(180deg, #fff5f5 0%, #ffeaea 100%);
  color: #c62828;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(215, 25, 25, 0.08);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.sale-detail-payment-receipt-link:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #ffe7e7 0%, #ffdede 100%);
  border-color: rgba(215, 25, 25, 0.35);
  color: #a91515;
  box-shadow: 0 12px 24px rgba(215, 25, 25, 0.14);
}

.sale-detail-payment-receipt-link:focus-visible {
  outline: 3px solid rgba(215, 25, 25, 0.18);
  outline-offset: 2px;
}

.sale-detail-payment-receipt-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sale-detail-payment-receipt-link span {
  display: inline-block;
}