:root {
  --bg: #ffffff;
  --accent: #ff8210;
  --accent-light: #fff4e8;
  --text: #1a1a1a;
  --danger: #a3382f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #f7d183;
}

html {
  background: var(--accent);
}

body {
  margin: 0;
  padding: 0;
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  min-height: 100vh;
  background: #f7d183;
  color: var(--text);
}

body.home {
  background-color: #f8fafc;
  color: #0b1c30;
  font-family: "Segoe UI", Arial, sans-serif;
}

body.tracking-page {
  background-color: #f7d183;
}

body.commission-page {
  background-color: #f7d183;
}

body.budget-page {
  background-color: #f7d183;
}

body.login-page {
  background: #f8fafc;
  color: #0b1c30;
  font-family: "Segoe UI", Arial, sans-serif;
}

body.home .container {
  padding-top: 48px;
}

body.home .container.with-sidebar {
  margin-left: max(72px, calc(72px + (100vw - 1500px) / 2));
}

body.home .sidebar {
  border-right-color: #e2e8f0;
  background: #ffffff;
  box-shadow: 4px 0 18px rgba(15, 23, 42, 0.04);
}

body.home .avatar {
  border-radius: 8px;
  background: var(--accent);
}

body.home .profile-name {
  color: #0b1c30;
}

body.home .profile-role {
  color: #64748b;
}

body.home .nav-link,
body.home .icon {
  color: #5c6880;
}

body.home .nav-link:hover,
body.home .nav-link.active {
  background: #fff2e8;
  color: var(--accent);
}

body.home .nav-link:hover .icon,
body.home .nav-link.active .icon {
  color: var(--accent);
}

body.home .hero {
  background: rgba(255, 255, 255, 0.9);
  border-color: #ffd9bb;
  box-shadow: 0 18px 40px rgba(255, 130, 16, 0.08);
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: #fff6eb;
  border-right: 1px solid #f2d2b5;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: width 0.2s ease-in-out;
  z-index: 10;
  overflow: hidden;
}

.sidebar.is-collapsed {
  width: 72px;
  padding: 16px 10px;
}

.sidebar.is-collapsed .label {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(8px);
  transition:
    max-width 0.2s ease-in-out,
    opacity 0.15s ease-in-out,
    transform 0.2s ease-in-out;
}

.sidebar.is-collapsed .nav-link {
  justify-content: flex-start;
  padding: 12px 16px;
}

.sidebar.is-collapsed .icon {
  margin: 0;
}

.sidebar.is-collapsed .sidebar-profile {
  justify-content: flex-start;
  width: 100%;
  padding: 0 4px;
}

.sidebar.is-collapsed .sidebar-profile > div:last-child {
  max-width: 0;
  opacity: 0;
  transform: translateX(8px);
}

.sidebar:hover {
  width: 260px;
}

.sidebar:hover .sidebar-profile > div:last-child {
  max-width: 180px;
  opacity: 1;
  transform: translateX(0);
}

.sidebar:hover .label {
  max-width: 180px;
  opacity: 1;
  transform: translateX(0);
}

body.sidebar-left-aligned .sidebar.is-collapsed:hover .nav-link {
  justify-content: flex-start;
  padding: 12px 16px;
  text-align: left;
}

body.sidebar-left-aligned .sidebar.is-collapsed:hover .icon {
  margin: 0;
  flex: 0 0 20px;
}

body.sidebar-left-aligned .sidebar.is-collapsed:hover .label {
  text-align: left;
}

body.sidebar-left-aligned .sidebar.is-collapsed:hover .sidebar-profile {
  justify-content: flex-start;
  padding: 0 4px;
}

body.sidebar-left-aligned .sidebar.is-collapsed:hover .sidebar-nav,
body.sidebar-left-aligned .sidebar.is-collapsed:hover .sidebar-footer {
  justify-items: stretch;
}

body.sidebar-left-aligned .sidebar.is-collapsed:hover .sidebar-logout,
body.sidebar-left-aligned .sidebar.is-collapsed:hover .nav-button {
  width: 100%;
}

.sidebar-profile {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  height: 44px;
  min-height: 44px;
  overflow: hidden;
}

.sidebar-profile > div:last-child {
  min-width: 0;
  max-width: 180px;
  overflow: hidden;
  transition:
    max-width 0.2s ease-in-out,
    opacity 0.15s ease-in-out,
    transform 0.2s ease-in-out;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: 0 0 40px;
  margin-left: 2px;
}

.profile-name {
  font-weight: 700;
  white-space: nowrap;
}

.profile-role {
  font-size: 12px;
  color: #8a4b08;
  white-space: nowrap;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #8a4b08;
  font-weight: 600;
  white-space: nowrap;
  min-width: 0;
  transition:
    background-color 0.15s ease-in-out,
    color 0.15s ease-in-out;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: #8a4b08;
}

.icon svg {
  width: 20px;
  height: 20px;
}

.nav-link span:not(.icon) {
  display: inline-block;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background: #ffe3c7;
  color: #8a4b08;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.sidebar-logout {
  margin: 0;
}

/* Sits in the sidebar's bottom padding, so it adds no height to a menu that
   already fills short screens. Left edge matches the menu labels. */
.sidebar-version {
  position: absolute;
  bottom: 4px;
  left: 56px;
  margin: 0;
  color: #6b7280;
  font-size: 11px;
  line-height: 14px;
  white-space: nowrap;
  pointer-events: none;
}

.sidebar.is-collapsed:not(:hover) .sidebar-version {
  left: 0;
  right: 0;
  text-align: center;
}

.nav-button {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
}

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.with-sidebar {
  margin-left: 72px;
  padding-left: 24px;
}

.container.with-sidebar {
  max-width: 1500px;
  margin-left: calc(72px + (100vw - 1500px) / 2);
  padding-left: 24px;
  padding-right: 24px;
  min-height: 100vh;
}

.hero {
  padding: 40px;
  background: var(--accent-light);
  border-radius: 12px;
  border: 1px solid #ffd3ad;
  text-align: center;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 16px;
}

/* O titulo continua acessivel a leitores de tela; a logo ja mostra a marca. */
.hero-brand h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hero-logo {
  width: min(280px, 70vw);
  height: auto;
  object-fit: contain;
}

.login-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.login-frame {
  display: grid;
  gap: 24px;
  width: min(440px, 100%);
}

.login-card {
  width: 100%;
  padding: 40px;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  text-align: center;
}

.login-logo {
  width: min(230px, 78%);
  height: auto;
  object-fit: contain;
}

.login-subtitle {
  margin: 0;
  color: #334155;
  font-size: 16px;
  line-height: 1.5;
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 32px;
  padding: 14px 16px;
  border: 1px solid rgba(249, 115, 22, 0.26);
  border-radius: 6px;
  background: rgba(249, 115, 22, 0.06);
  color: #584237;
  font-size: 14px;
  line-height: 20px;
}

.login-alert.alert-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.login-alert-icon {
  display: inline-grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #f97316;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.login-alert.alert-error .login-alert-icon {
  background: #dc2626;
}

.login-form {
  display: grid;
  gap: 24px;
}

.login-field {
  display: grid;
  gap: 8px;
  color: #0b1c30;
  font-size: 14px;
  font-weight: 600;
  line-height: 16px;
}

.login-field input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  background: #ffffff;
  color: #0b1c30;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-field input::placeholder {
  color: #94a3b8;
}

.login-field input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 1px #f97316;
}

.login-submit {
  min-height: 48px;
  margin-top: 8px;
  padding: 14px 20px;
  border: 1px solid #f97316;
  border-radius: 6px;
  background: #f97316;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 18px;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.login-submit:hover {
  border-color: #dd5f08;
  background: #dd5f08;
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.18);
}

.login-submit:focus-visible {
  outline: 3px solid rgba(249, 115, 22, 0.28);
  outline-offset: 2px;
}

.login-help {
  margin: 0;
  padding: 0 16px;
  text-align: center;
  font-size: 13px;
  line-height: 20px;
  color: #64748b;
}

@media (max-width: 520px) {
  .login-shell {
    align-items: center;
    padding: 24px 16px;
  }

  .login-card {
    padding: 32px 24px;
  }

  .login-header,
  .login-alert {
    margin-bottom: 24px;
  }

  .login-logo {
    width: min(220px, 82%);
  }
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.page-actions form {
  margin: 0;
}

.home-track-header {
  justify-content: center;
  width: 100%;
  text-align: center;
  margin-top: 70px;
}

.home-track-header h2 {
  width: 100%;
  margin: 0;
  text-align: center;
}

.home-services-header {
  max-width: 980px;
  margin: 0 auto 40px;
  text-align: center;
}

.home-services-logo {
  display: block;
  width: min(250px, 62vw);
  height: auto;
  margin: 0 auto 18px;
}

.home-services-header h1 {
  margin: 0;
  color: #0b1c30;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
}

.home-services-header p {
  max-width: 720px;
  margin: 14px auto 0;
  color: #8a4b08;
  font-size: 16px;
  line-height: 1.55;
}

.home-services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
}

.home-service-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  min-height: 0;
  gap: 14px 12px;
  align-content: start;
  padding: 24px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #ffffff;
  color: #0b1c30;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

button.home-service-card {
  width: 100%;
  border-color: #eef2f7;
  font: inherit;
  cursor: pointer;
}

.home-service-card:hover,
.home-service-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255, 130, 16, 0.48);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
  outline: none;
}

.home-service-icon {
  display: grid;
  grid-column: 1;
  grid-row: 1;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 8px;
  background: #fff2e8;
  color: var(--accent);
}

.home-service-icon svg {
  width: 22px;
  height: 22px;
}

.home-service-card strong {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  min-width: 0;
  margin: 0;
  color: #0b1c30;
  font-size: 22px;
  line-height: 1.25;
}

.home-service-card small {
  grid-column: 1 / -1;
  grid-row: 2;
  color: #5f514a;
  font-size: 14px;
  line-height: 1.5;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.tool-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #ffffff;
}

.tool-card-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.tool-card-header h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.tool-card-header p {
  margin: 0;
  color: #666666;
  line-height: 1.45;
}

.tool-form {
  margin: 0;
}

.tool-download-button {
  justify-content: center;
  border-color: #15803d;
  background: #16a34a;
  color: #ffffff;
}

.tool-download-button:hover {
  background: #15803d;
  color: #ffffff;
}

.code-association-table-container {
  border: 1px solid #dedede;
  border-radius: 8px;
}

.code-association-table th:last-child,
.code-association-table td:last-child {
  width: 310px;
  text-align: center;
}

.code-association-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.code-association-actions form {
  margin: 0;
}

.code-association-dialog {
  width: min(640px, calc(100vw - 32px));
}

@media (max-width: 820px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .code-association-table th:last-child,
  .code-association-table td:last-child {
    width: auto;
    min-width: 270px;
  }
}

.home-service-link {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: start;
  color: var(--accent);
  font-weight: 800;
}

.home-quick-track-dialog {
  width: min(540px, calc(100vw - 32px));
}

.home-quick-carrier-select,
.home-quick-form label,
.home-create-form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.home-quick-carrier-select {
  max-width: 100%;
  margin-bottom: 18px;
}

.home-quick-form {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 12px;
  max-width: 100%;
  margin: 0;
}

.home-quick-form .btn {
  grid-column: 1 / -1;
  min-height: 42px;
  width: 100%;
  justify-self: stretch;
}

.home-quick-panel {
  display: grid;
  gap: 16px;
}

.home-quick-panel[hidden] {
  display: none !important;
}

.home-quick-result {
  margin: 0;
  border-radius: 16px;
  border: 1px solid #f2d2b5;
  background: #fffaf4;
}

.home-quick-result h4 {
  margin: 0 0 10px;
  font-size: 18px;
}

.home-create-details {
  padding: 14px;
  border: 1px solid #f2d2b5;
  border-radius: 16px;
  background: #fffdf9;
}

.home-create-details summary {
  display: inline-flex;
  width: auto;
  min-width: 160px;
  justify-content: center;
  list-style: none;
  cursor: pointer;
}

.home-create-details summary::-webkit-details-marker {
  display: none;
}

.home-create-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: none;
  margin: 16px 0 0;
}

.home-create-form .btn {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .home-services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .home-services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-service-card {
    min-height: 0;
    padding: 22px;
  }

  .home-quick-form,
  .home-create-form {
    grid-template-columns: 1fr;
  }

  .home-quick-form .btn,
  .home-create-form .btn {
    width: 100%;
  }
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  white-space: nowrap;
}

.table th,
.table td {
  border: 1px solid #f2d2b5;
  padding: 10px;
  text-align: center;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.actions .btn {
  min-width: 96px;
}

.table th:last-child,
.table td:last-child {
  width: 225px;
}

.actions form {
  margin: 0;
}

.table-container {
  width: 100%;
  overflow-x: auto;
}

.form {
  display: grid;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}

.form-inline {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

label {
  display: grid;
  gap: 6px;
}

input,
select,
textarea {
  padding: 8px;
  border: 1px solid #f2d2b5;
  border-radius: 6px;
  font-size: 14px;
}

.btn {
  padding: 8px 14px;
  border: 1px solid var(--accent);
  background: var(--bg);
  color: var(--accent);
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  text-align: center;
  line-height: 1.2;
  min-height: 38px;
}

.btn.primary {
  background: #ff8210;
  color: #ffffff;
  border-color: #ff8210;
  box-shadow: none;
  padding: 12px 18px;
}

.btn.primary:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.btn.primary:active {
  transform: translateY(0);
}

.btn.danger {
  background: #fef2f2;
  border-color: #e53935;
  color: #b71c1c;
}

.btn.danger:hover {
  background: #fde7e7;
  border-color: #d32f2f;
}

.btn.danger.solid {
  background: #e53935;
  border-color: #e53935;
  color: #ffffff;
}

.btn.danger.solid:hover {
  background: #d32f2f;
  border-color: #d32f2f;
}

.btn.small {
  padding: 6px 12px;
  font-size: 12px;
  min-width: 96px;
  min-height: 32px;
  line-height: 1;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.form .btn {
  width: 100%;
}

.page-header .btn {
  min-width: 180px;
}

.filter-form .btn {
  min-width: 160px;
}

.track-form {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto 20px;
}

.track-input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #f2d2b5;
  border-radius: 10px;
  font-size: 14px;
  background: #ffffff;
}

.track-btn {
  min-width: 160px;
  min-height: 42px;
}

.settings-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #f2d2b5;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(255, 130, 16, 0.08);
}

.settings-section-header h3,
.settings-card h4,
.settings-card h5 {
  margin: 0 0 8px;
}

.settings-tabs {
  display: flex;
  gap: 14px;
  border-bottom: 1px solid #e3d7ca;
  margin-bottom: 22px;
  padding-bottom: 2px;
  overflow-x: auto;
}

.settings-tab {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #111111;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 2px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.settings-tab:hover {
  color: #111111;
}

.withdrawal-manual-items {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.withdrawal-manual-item {
  display: grid;
  grid-template-columns: 1fr 2fr 120px 140px;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid #ffd2ad;
  border-radius: 8px;
  background: #fffdf9;
}

.withdrawals-page .tracking-table-container {
  display: none;
}

.withdrawal-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.withdrawal-card,
.withdrawal-empty-state {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 122, 20, 0.28);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 14px 32px rgba(88, 47, 0, 0.08);
}

.withdrawal-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.withdrawal-card-header h3 {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.withdrawal-card-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.withdrawal-card-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 244, 229, 0.72);
}

.withdrawal-card-field span {
  color: #934100;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.withdrawal-card-field strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.withdrawal-card-span,
.withdrawal-card-action {
  grid-column: 1 / -1;
}

.withdrawal-card-action {
  justify-self: stretch;
}

.inline-checkbox {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
}

.withdrawal-signature-shell {
  max-width: 760px;
  margin: 0 auto;
}

.withdrawal-signature-form {
  display: grid;
  gap: 14px;
}

.withdrawal-signature-ready {
  margin: 0;
}

.signature-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  padding: 0;
}

.signature-modal.is-open {
  display: block;
}

.signature-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.68);
}

.signature-modal-dialog {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #fffaf3;
  border-radius: 0;
  padding:
    max(12px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior: none;
}

.signature-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.signature-modal-header,
.signature-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.signature-modal-header p {
  margin: 4px 0 0;
  font-weight: 700;
  color: #8a3b00;
}

.signature-pad {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  border: 2px dashed #ff7a14;
  border-radius: 8px;
  background: #ffffff;
  touch-action: none;
}

@media (max-width: 760px) {
  .withdrawal-manual-item {
    grid-template-columns: 1fr;
  }

  .withdrawal-card-grid,
  .withdrawal-card-body,
  .withdrawal-card-header {
    grid-template-columns: 1fr;
  }

  .signature-modal-header,
  .signature-modal-actions {
    align-items: stretch;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .signature-modal-dialog {
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
    gap: 8px;
  }

  .signature-modal-header h3,
  .signature-modal-header p {
    margin: 0;
  }

  .signature-modal-header .tracking-modal-kicker {
    display: none;
  }

  .signature-modal-actions .btn {
    padding: 10px 14px;
  }
}

.settings-tab.is-active {
  color: #ff8210;
  border-bottom-color: #ff8210;
}

.settings-section {
  display: none;
  gap: 14px;
}

.settings-section.is-active {
  display: grid;
}

.settings-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.settings-section-header p {
  margin: 0;
  color: #8a4b08;
}

.settings-email-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.settings-email-form .settings-section-header {
  align-items: center;
  flex-wrap: wrap;
}

.settings-email-form .settings-section-header > div {
  flex: 1 1 320px;
  min-width: 0;
}

.settings-email-form .settings-section-header .btn {
  flex-shrink: 0;
}

.settings-notification-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

.settings-notification-options-paired {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-notification-option {
  min-width: 0;
}

.settings-notification-option .settings-card-toolbar h4 {
  margin: 0;
}

.settings-notification-option .settings-cutoff-fields {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.settings-notification-option .settings-inline-switch {
  min-height: 36px;
  white-space: nowrap;
}

.settings-cutoff-note {
  margin: 0;
}

@media (max-width: 900px) {
  .settings-notification-options-paired {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .settings-email-form .settings-section-header .btn {
    width: 100%;
  }

  .settings-notification-option .settings-cutoff-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.settings-grid-form {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: end;
}

.settings-grid-span-all {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.settings-card-toolbar p {
  margin: 4px 0 0;
  color: #8a4b08;
  font-size: 13px;
  line-height: 1.4;
}

.settings-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.settings-muted {
  margin: 4px 0 0;
  color: #8a4b08;
  font-size: 13px;
}

.settings-form {
  max-width: none;
  margin: 0;
}

.settings-form-compact {
  margin-top: 18px;
}

.settings-actions-row {
  display: flex;
  align-items: flex-end;
}

.profile-table td {
  text-align: center;
}

.settings-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border: 1px solid #e8ded3;
  border-radius: 12px;
  background: #fffaf4;
}

.settings-switch-row span {
  display: grid;
  gap: 4px;
}

.settings-switch-row small {
  color: #7f6a58;
  font-size: 12px;
  line-height: 1.4;
}

.settings-inline-switch {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 40px;
  font-weight: 700;
}

.settings-capability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.settings-capability-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #f2d2b5;
  border-radius: 14px;
  background: #fffaf4;
}

.settings-capability-card strong {
  color: #8a4b08;
}

.settings-capability-card span {
  color: #5f5f5f;
  font-size: 13px;
  line-height: 1.45;
}

.profile-matrix-table th,
.profile-matrix-table td {
  white-space: normal;
}

.settings-entity-table th:last-child,
.settings-entity-table td:last-child {
  width: 140px;
  text-align: center;
}

.settings-entity-table .actions {
  justify-content: center;
}

.profile-name-cell {
  min-width: 220px;
}

.profile-summary-cell {
  min-width: 120px;
}

.profile-summary-cell strong,
.profile-summary-cell span {
  display: block;
}

.profile-summary-cell span {
  font-size: 12px;
  color: #7f6a58;
  margin-top: 4px;
}

.settings-profile-form {
  margin-top: 18px;
}

.settings-modal-open {
  overflow: hidden;
}

.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.settings-modal.is-open {
  display: flex;
}

.settings-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.48);
}

.settings-modal-dialog {
  position: relative;
  width: min(760px, calc(100vw - 32px));
  max-height: 90vh;
  overflow: auto;
  border: 1px solid #f2d2b5;
  border-radius: 18px;
  background: #fffaf4;
  box-shadow: 0 24px 70px rgba(26, 26, 26, 0.22);
  padding: 26px;
}

.settings-modal-dialog-wide {
  width: min(1020px, calc(100vw - 32px));
}

.settings-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #fff1e4;
  color: #8a4b08;
  cursor: pointer;
  font-weight: 800;
}

.settings-modal-header {
  margin-bottom: 18px;
}

.settings-modal-header span {
  display: block;
  color: #a4550a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-modal-header h3 {
  margin: 5px 42px 0 0;
  font-size: 26px;
}

.settings-modal-actions,
.settings-modal-secondary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.settings-modal-secondary {
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #f2d2b5;
}

.settings-modal-secondary .inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.settings-modal-secondary input {
  min-height: 36px;
}

.settings-profile-modal-form {
  display: grid;
  gap: 16px;
}

.settings-permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 26px;
  flex: 0 0 46px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d6dbe3;
  transition: all 0.2s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.switch input:checked + .switch-slider {
  background: #ff8210;
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

.commission-shell {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

.commission-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #f2d2b5;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(255, 130, 16, 0.08);
  margin-bottom: 20px;
}

.commission-subtitle {
  margin: 0 0 14px;
  color: #8a4b08;
  line-height: 1.5;
}

.commission-warning-banner {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-left: 4px solid #ff8210;
  background: #fff4e8;
  color: #8a4b08;
  border-radius: 10px;
}

.commission-form,
.commission-targets-form {
  max-width: none;
  margin: 0;
}

.commission-close-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.commission-close-actions form {
  margin: 0;
}

.commission-table th,
.commission-table td {
  white-space: normal;
}

.commission-revenue-table thead th {
  background: #143949;
  color: #ffffff;
  border-color: #0f2a36;
  font-weight: 700;
}

.commission-revenue-table thead th:first-child {
  background: #f7f1e8;
  color: #1a1a1a;
  border-color: #f2d2b5;
}

.commission-revenue-table thead th:nth-last-child(2) {
  background: #5d98d3;
  color: #ffffff;
}

.commission-revenue-table thead th:last-child {
  background: #f7f1e8;
  color: #1a1a1a;
  border-color: #f2d2b5;
}

.commission-revenue-row td:first-child {
  background: #e9a372;
  color: #ffffff;
  font-weight: 700;
}

.commission-revenue-row td:nth-child(2),
.commission-revenue-row td:nth-child(3),
.commission-revenue-row td:nth-child(4) {
  background: #edf2f8;
}

.commission-revenue-row td:nth-last-child(2) {
  background: #eef6ff;
}

.commission-revenue-row td:last-child {
  background: #f8fbff;
  color: #5b6b76;
}

.commission-revenue-total td:first-child {
  background: #5d98d3;
  color: #ffffff;
  font-weight: 700;
}

.commission-revenue-total td:nth-child(2),
.commission-revenue-total td:nth-child(3),
.commission-revenue-total td:nth-child(4) {
  background: #eef8d8;
  font-weight: 700;
}

.commission-revenue-total td:nth-last-child(2) {
  background: #2c6f3c;
  color: #ffffff;
  font-weight: 700;
}

.commission-revenue-total td:last-child {
  background: #f7f1e8;
  color: #5b6b76;
}

.commission-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.commission-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.commission-preview-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.commission-preview-pill {
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid #f2d2b5;
  border-radius: 12px;
  background: #fffaf4;
  text-align: left;
}

.commission-preview-pill span,
.commission-preview-pill strong {
  display: block;
}

.commission-preview-pill span {
  font-size: 12px;
  color: #8a4b08;
}

.commission-preview-pill strong {
  margin-top: 4px;
  font-size: 18px;
}

.commission-preview-meta {
  margin-bottom: 14px;
}

.commission-total-pill {
  display: grid;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #f2d2b5;
  background: #fff8f1;
  min-width: 150px;
}

.commission-status-cell {
  min-width: 110px;
}

.commission-status-value {
  font-weight: 700;
  margin-bottom: 8px;
}

.commission-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(138, 75, 8, 0.12);
  margin-bottom: 8px;
}

.commission-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd19c, #ff8210);
}

.commission-progress-abaixo {
  background: linear-gradient(90deg, #ffb4b0, #d55d50);
}

.commission-progress-faixa-1 {
  background: linear-gradient(90deg, #ffe2a5, #e3aa24);
}

.commission-progress-faixa-2 {
  background: linear-gradient(90deg, #ffe5a2, #c98e00);
}

.commission-progress-faixa-3 {
  background: linear-gradient(90deg, #bde9b0, #2f8b3a);
}

.commission-progress-sem-meta {
  background: linear-gradient(90deg, #d7d7d7, #a4a4a4);
}

.commission-status-hint,
.commission-status-gap {
  font-size: 12px;
  line-height: 1.35;
}

.commission-status-hint {
  font-weight: 700;
  margin-bottom: 2px;
}

.commission-status-gap {
  color: #6b5a49;
}

.commission-status-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  gap: 20px;
  align-items: start;
}

.commission-status-layout-single {
  grid-template-columns: minmax(0, 1fr);
}

.commission-status-panel {
  background: #fffaf4;
  border: 1px solid #f2d2b5;
  border-radius: 14px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.commission-status-main {
  min-width: 0;
}

.commission-status-layout-single .commission-status-main th,
.commission-status-layout-single .commission-status-main td {
  min-width: 0;
  width: auto;
}

.commission-status-equal-col {
  width: auto;
}

.commission-status-main .table,
.commission-status-targets .table {
  width: 100%;
  background: transparent;
  table-layout: fixed;
}

.commission-status-main th,
.commission-status-main td,
.commission-status-targets th,
.commission-status-targets td {
  padding: 7px 8px;
}

.commission-status-main tbody tr,
.commission-status-targets tbody tr {
  height: 58px;
}

.commission-status-main th,
.commission-status-main td {
  min-width: 110px;
}

.commission-status-targets th,
.commission-status-targets td {
  width: 33.33%;
}

.commission-status-cell.abaixo {
  background: #fff1f1;
  color: #a3382f;
}

.commission-status-cell.faixa-1 {
  background: #fff6dd;
  color: #9a6b00;
}

.commission-status-cell.faixa-2 {
  background: #fff2c6;
  color: #8a5c00;
}

.commission-status-cell.faixa-3 {
  background: #e7f7df;
  color: #256c2d;
}

.commission-status-cell.sem-meta {
  background: #ececec;
  color: #6f6f6f;
}

.commission-status-targets {
  width: 480px;
  justify-self: end;
}

.commission-targets-modal-dialog {
  width: min(860px, calc(100vw - 32px));
}

.commission-status-targets-modal-panel {
  width: 100%;
  justify-self: stretch;
  padding: 14px;
}

.commission-target-table th {
  white-space: nowrap;
  width: 33.33%;
}

.commission-target-table th:last-child,
.commission-target-table td:last-child {
  width: 33.33% !important;
}

.commission-target-table-with-units th,
.commission-target-table-with-units td,
.commission-target-table-with-units th:last-child,
.commission-target-table-with-units td:last-child {
  width: 25% !important;
}

.commission-target-unit {
  font-weight: 700;
  background: #fffaf4;
  color: #1a1a1a;
}

.commission-target {
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  width: 33.33%;
}

.commission-target.faixa-1 {
  background: #fff1f1;
  color: #a3382f;
}

.commission-target.faixa-2 {
  background: #fff2c6;
  color: #8a5c00;
}

.commission-target.faixa-3 {
  background: #e7f7df;
  color: #256c2d;
}

.commission-target.sem-meta {
  background: #ececec;
  color: #6f6f6f;
}

.commission-row-muted td {
  background-color: #f1f1f1;
  color: #6b6b6b;
}

.commission-row-muted td strong {
  color: #5f5f5f;
}

.commission-goal-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.commission-goal-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #f2d2b5;
  border-radius: 12px;
  background: #fffaf4;
}

.commission-goal-card.is-muted {
  background: #ededed;
  color: #656565;
}

.commission-goal-header,
.commission-goal-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.commission-goal-header span {
  font-weight: 700;
  color: #8a4b08;
}

.commission-goal-meta {
  font-size: 12px;
  color: #6b5a49;
}

.commission-goal-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #f0e0d0;
  border: 1px solid rgba(138, 75, 8, 0.12);
}

.commission-goal-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.commission-goal-pendente {
  background: linear-gradient(90deg, #ffd19c, #ff8210);
}

.commission-goal-atingida {
  background: linear-gradient(90deg, #bde9b0, #2f8b3a);
}

.commission-goal-sem-meta {
  background: linear-gradient(90deg, #d7d7d7, #a4a4a4);
}

.reports-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
  max-width: none;
  margin: 0;
}

.budget-margin-card,
.budget-margin-results {
  display: grid;
  gap: 18px;
}

.budget-page-subtitle {
  margin-top: 8px;
  max-width: 720px;
}

.budget-margin-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.budget-margin-hero-copy h3 {
  margin: 10px 0 10px;
  font-size: 28px;
}

.budget-margin-hero-copy p {
  margin: 0;
  max-width: 720px;
  color: #7a4e1d;
  line-height: 1.6;
}

.budget-margin-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1de;
  border: 1px solid #ffd4aa;
  color: #a85b09;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.budget-margin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.budget-margin-formula {
  display: grid;
  gap: 6px;
  min-width: 280px;
  padding: 12px 14px;
  border: 1px solid #f2d2b5;
  border-radius: 12px;
  background: #fff8f1;
  color: #8a4b08;
  font-size: 13px;
  line-height: 1.4;
}

.budget-margin-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 18px;
  align-items: stretch;
  width: 100%;
  max-width: none;
  margin: 0;
}

.budget-input-card {
  position: relative;
  padding: 22px 18px 18px;
  border: 1px solid #f2d2b5;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf9 0%, #fff7ef 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  min-width: 0;
}

.budget-input-card label {
  display: grid;
  gap: 10px;
  margin: 0;
  color: #482405;
  font-weight: 700;
  min-width: 0;
}

.budget-input-step {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ff8210;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.budget-input-help {
  font-size: 12px;
  line-height: 1.45;
  color: #8a6a4b;
  font-weight: 400;
}

.budget-input-shell {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #ffd1af;
  min-width: 0;
}

.budget-input-prefix {
  color: #a85b09;
  font-weight: 700;
}

.budget-input-shell input {
  border: 0;
  padding: 0;
  font-size: 26px;
  font-weight: 700;
  background: transparent;
  color: #1f1409;
  outline: none;
  width: 100%;
  min-width: 0;
}

.budget-input-shell input::placeholder {
  color: #c4a78a;
}

.budget-margin-submit {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.budget-margin-submit .btn {
  min-width: 220px;
  height: 48px;
  width: auto;
}

.budget-margin-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.budget-margin-meta {
  display: flex;
  justify-content: flex-end;
}

.budget-margin-meta-pill {
  min-height: 86px;
  align-content: center;
}

.budget-margin-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.budget-margin-result-card {
  gap: 16px;
}

.budget-margin-result-accent {
  border-color: #f1c899;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 247, 236, 0.98) 100%);
}

.budget-margin-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.budget-margin-result-header h3 {
  margin: 0;
}

.budget-margin-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.budget-margin-metric {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fffaf4;
  border: 1px solid #f3dbc2;
}

.budget-margin-metric span {
  font-size: 12px;
  color: #8a6a4b;
}

.budget-margin-metric strong {
  font-size: 24px;
  color: #3b2208;
}

.budget-margin-metric-highlight {
  background: #fff2e2;
  border-color: #ffc68f;
}

.budget-margin-metric-highlight strong {
  color: #a35405;
}

.readonly-field {
  background: #f6f6f6;
  color: #666666;
  border-color: #d7d7d7;
  cursor: default;
}

.readonly-field:focus {
  outline: none;
  box-shadow: none;
}

.flat-list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.carrier-section {
  display: grid;
  gap: 12px;
}

.carrier-table th,
.carrier-table td {
  vertical-align: middle;
}

.notification-unit-table {
  min-width: 640px;
}

.notification-seller-table {
  min-width: 520px;
}

.notification-unit-table th:last-child,
.notification-unit-table td:last-child,
.notification-seller-table th:last-child,
.notification-seller-table td:last-child {
  width: auto;
}

.notification-unit-table input,
.notification-seller-table input {
  width: 100%;
  min-width: 200px;
}

.transportadoras-table th:last-child,
.transportadoras-table td:last-child {
  width: 180px;
}

.transportadoras-table td.actions {
  display: table-cell;
  text-align: center;
  vertical-align: middle;
  border-left-color: #f2d2b5;
}

.transportadoras-table .inline-form {
  display: inline-flex;
}

.inline-form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.add-carrier-form {
  display: grid;
  gap: 14px;
}

.add-carrier-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.add-carrier-actions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  margin-top: 4px;
}

.add-carrier-actions .btn {
  min-width: 180px;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: none;
}

@media (max-width: 768px) {
  .settings-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    transform: translateX(-100%);
    width: 240px;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .with-sidebar {
    margin-left: 0;
    padding-left: 20px;
  }

  .container.with-sidebar {
    margin-left: 0;
  }

  .page-header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .page-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .table {
    font-size: 12px;
  }

  .form-inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header .btn,
  .filter-form .btn,
  .btn {
    width: 100%;
    min-width: 0;
  }

.track-form {
  flex-direction: column;
  align-items: stretch;
}

  .commission-preview-header {
    flex-direction: column;
  }

  .commission-preview-summary {
    width: 100%;
    justify-content: stretch;
  }

  .commission-status-layout {
    grid-template-columns: 1fr;
  }

  .commission-status-targets {
    width: 100%;
    justify-self: stretch;
  }

  .settings-card-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .add-carrier-actions {
    justify-content: stretch;
  }

  .add-carrier-actions .btn {
    width: 100%;
  }

  .track-btn {
    width: 100%;
  }

  .tracking-modal {
    padding: 12px;
  }

  .tracking-modal-dialog {
    padding: 20px 16px;
  }

  .tracking-modal-dialog-create {
    width: min(100%, calc(100vw - 24px));
  }

  .tracking-modal-form-grid {
    grid-template-columns: 1fr;
  }

  .tracking-create-actions {
    justify-content: stretch;
  }

  .tracking-create-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .tracking-modal-header {
    flex-direction: column;
  }

  .tracking-modal-stepper {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tracking-modal-stepper::before {
    display: none;
  }

  .tracking-step {
    justify-items: start;
    text-align: left;
    grid-template-columns: 34px 1fr;
    align-items: center;
  }
}

.tracking-filter {
  align-items: end;
  background: #fffaf5;
  border: 1px solid #efc19b;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 1fr) minmax(190px, 240px) minmax(210px, 250px) auto;
  margin: 18px 0;
  padding: 16px;
  position: relative;
  z-index: 5;
}

.tracking-search-field,
.tracking-unit-filter,
.tracking-status-filter,
.tracking-switch-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.tracking-filter-label {
  color: var(--workspace-text, #0b1c30);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.tracking-search-field input,
.tracking-unit-filter select,
.tracking-status-dropdown summary,
.tracking-switch-options {
  height: 42px;
  width: 100%;
}

.tracking-search-field input:focus,
.tracking-unit-filter select:focus,
.tracking-status-dropdown[open] summary {
  border-color: #ff8210;
  box-shadow: 0 0 0 3px rgba(255, 130, 16, 0.15);
  outline: none;
}

.tracking-status-dropdown {
  min-width: 0;
  position: relative;
}

.tracking-status-dropdown summary {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 7px;
  color: var(--workspace-text, #0b1c30);
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 400;
  justify-content: space-between;
  list-style: none;
  padding: 0 12px;
}

.tracking-status-dropdown summary::-webkit-details-marker {
  display: none;
}

.tracking-status-dropdown summary::after {
  border-bottom: 2px solid #ff8210;
  border-right: 2px solid #ff8210;
  content: "";
  height: 6px;
  margin-top: -3px;
  transform: rotate(45deg);
  transition: transform 0.16s ease, margin 0.16s ease;
  width: 6px;
}

.tracking-status-dropdown[open] summary::after {
  margin-top: 3px;
  transform: rotate(225deg);
}

.tracking-status-options {
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 7px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 2px;
  left: 0;
  max-height: 320px;
  min-width: 280px;
  overflow-y: auto;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
}

.tracking-status-options label {
  align-items: center;
  border-radius: 5px;
  color: var(--workspace-text, #0b1c30);
  cursor: pointer;
  display: flex;
  gap: 9px;
  min-height: 34px;
  padding: 5px 7px;
}

.picking-filter .tracking-status-options {
  min-width: 0;
}

.tracking-status-options label:hover {
  background: #fff3e5;
}

.tracking-status-options input {
  accent-color: #ff8210;
  height: 16px;
  width: 16px;
}

.tracking-status-options span {
  font-size: 14px;
  font-weight: 400;
}

.tracking-filter-actions {
  display: flex;
  gap: 8px;
}

.tracking-filter-actions .btn {
  min-width: 110px;
}

.tracking-switch-field {
  align-content: end;
}

.tracking-switch-options {
  align-items: center;
  background: #ffffff;
  border: 1px solid #efc19b;
  border-radius: 7px;
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 0 12px;
}

.tracking-switch-options > span {
  color: #542b06;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .tracking-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .tracking-filter {
    grid-template-columns: minmax(0, 1fr);
  }

  .tracking-filter-actions,
  .tracking-filter-actions .btn {
    width: 100%;
  }

  .tracking-filter-actions .btn {
    flex: 1;
    min-width: 0;
  }

  .tracking-status-options {
    min-width: 100%;
  }
}

.tracking-table th,
.tracking-table td {
  vertical-align: middle;
  white-space: normal;
}

.tracking-row {
  background: rgba(255, 255, 255, 0.94);
}

.tracking-row.is-overdue {
  background: #fff3f0;
}

.tracking-row.is-stale {
  box-shadow: inset 4px 0 0 #ffca8c;
}

.tracking-last-update {
  display: grid;
  gap: 2px;
}

.tracking-last-update-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a4b08;
}

.tracking-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tracking-signals-compact {
  justify-content: center;
}

.tracking-flag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #f2d2b5;
  background: #fff8f1;
  color: #8a4b08;
  font-size: 12px;
  font-weight: 700;
}

.tracking-flag-danger {
  background: #fff1f1;
  border-color: #f0b6b2;
  color: #a3382f;
}

.tracking-flag-warning {
  background: #fff7ed;
  border-color: #ffb26f;
  color: #a04d00;
}

.tracking-flag-neutral {
  background: #fff8f1;
  border-color: #f2d2b5;
  color: #8a4b08;
}

.tracking-compact-table th,
.tracking-compact-table td {
  padding: 10px 8px;
}

.tracking-compact-table th:first-child,
.tracking-compact-table td:first-child {
  min-width: 170px;
}

.tracking-compact-note {
  display: grid;
  gap: 4px;
}

.tracking-compact-note strong {
  font-size: 15px;
}

.tracking-compact-note span,
.tracking-compact-email {
  color: #6a5848;
  font-size: 13px;
}

.tracking-last-update-compact {
  min-width: 135px;
}

.tracking-timeline {
  position: relative;
  display: grid;
  gap: 10px;
}

.tracking-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #f2d2b5;
}

.tracking-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
}

.tracking-timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff8210;
  border: 2px solid #fffaf4;
  margin-top: 4px;
  z-index: 1;
}

.tracking-timeline-content {
  display: grid;
  gap: 2px;
}

.tracking-timeline-label {
  font-size: 12px;
  color: #8a4b08;
}

.tracking-modal-open {
  overflow: hidden;
}

.tracking-actions-cell {
  display: table-cell;
  vertical-align: middle !important;
  width: 96px !important;
  min-width: 96px;
  text-align: center;
}

.tracking-compact-table th:last-child,
.tracking-compact-table td:last-child {
  width: 96px !important;
  min-width: 96px;
}

.tracking-actions-cell .btn {
  display: inline-flex;
}

.tracking-actions-cell .btn.small {
  min-width: 0;
  width: auto;
}

.tracking-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 30;
}

.tracking-modal.is-open {
  display: flex;
}

.tracking-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.48);
}

.tracking-modal-dialog {
  position: relative;
  width: min(1120px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 18px;
  background: #fffdf9;
  border: 1px solid #f2d2b5;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.18);
  padding: 24px;
}

.tracking-modal-dialog.home-quick-track-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 22px 24px;
}

.tracking-modal-dialog-wide {
  width: min(1540px, calc(100vw - 16px));
}

.tracking-modal-dialog-create {
  width: min(920px, calc(100vw - 32px));
  padding: 24px;
}

.bulk-refresh-dialog {
  width: min(560px, calc(100vw - 32px));
  overflow: hidden;
}

.bulk-refresh-spinner {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-right: 46px;
  border: 3px solid #f5d2b1;
  border-top-color: #ff8210;
  border-radius: 50%;
  animation: bulk-refresh-spin 0.8s linear infinite;
}

.bulk-refresh-spinner[hidden] {
  display: none;
}

@keyframes bulk-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.bulk-refresh-current {
  min-height: 28px;
  margin: 0;
  color: #1f1f1f;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.bulk-refresh-invoice {
  min-height: 22px;
  margin: 4px 0 22px;
  color: #6c4a2a;
  font-size: 14px;
}

.bulk-refresh-progress {
  height: 14px;
  overflow: hidden;
  border-radius: 7px;
  background: #f4e1cf;
}

.bulk-refresh-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #ff8210;
  transition: width 180ms ease;
}

.bulk-refresh-progress-label {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: #69421e;
  font-size: 13px;
}

.bulk-refresh-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.bulk-refresh-summary[hidden],
.bulk-refresh-failures[hidden] {
  display: none;
}

.bulk-refresh-result {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid;
  border-radius: 8px;
}

.bulk-refresh-result span {
  font-size: 13px;
  font-weight: 700;
}

.bulk-refresh-result strong {
  font-size: 30px;
  line-height: 1;
}

.bulk-refresh-result-success {
  border-color: #93d9ad;
  background: #edf9f1;
  color: #176534;
}

.bulk-refresh-result-failure {
  border-color: #f2b2aa;
  background: #fff1ef;
  color: #9d2d20;
}

.bulk-refresh-failures {
  max-height: 180px;
  overflow-y: auto;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #f2b2aa;
  border-radius: 8px;
  background: #fff8f7;
  color: #7e2a20;
}

.bulk-refresh-failures ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.bulk-refresh-failures li + li {
  margin-top: 6px;
}

.bulk-refresh-actions {
  justify-content: flex-end;
  margin-top: 20px;
}

.tracking-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff4e8;
  color: #8a4b08;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.tracking-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.tracking-modal-kicker,
.tracking-modal-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a4b08;
}

.tracking-modal-header h3 {
  margin: 6px 0 0;
  font-size: 28px;
}

.tracking-modal-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
  border-bottom: 1px solid #dfdfdf;
}

.tracking-modal-tab {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #666666;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tracking-modal-tab:hover {
  color: #202020;
}

.tracking-modal-tab.is-active {
  border-bottom-color: #c96d18;
  color: #8a4b08;
}

.tracking-modal-tab-panel[hidden] {
  display: none;
}

.tracking-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.tracking-modal-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #f2d2b5;
  background: #fff8f1;
}

.tracking-modal-email {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tracking-modal-message {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fffaf4;
  border: 1px solid #f2d2b5;
}

.tracking-modal-message p {
  margin: 8px 0 0;
  color: #5f5f5f;
  line-height: 1.5;
  font-size: 15px;
}

.tracking-collection-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #dedede;
}

.tracking-collection-summary > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  background: #ffffff;
}

.tracking-collection-summary strong {
  overflow-wrap: anywhere;
}

.tracking-collection-section + .tracking-collection-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e2e2e2;
}

.tracking-collection-heading,
.tracking-exception-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tracking-collection-heading {
  margin-bottom: 12px;
}

.tracking-collection-heading h4 {
  margin: 4px 0 0;
  font-size: 18px;
}

.tracking-collection-table-container {
  border: 1px solid #dedede;
  border-radius: 8px;
}

.tracking-collection-table {
  min-width: 720px;
}

.tracking-collection-table th:nth-child(1) {
  width: 180px;
}

.tracking-collection-table th:nth-child(3) {
  width: 130px;
}

.tracking-collection-table th:nth-child(4) {
  width: 220px;
}

.tracking-collection-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 6px;
  background: #eeeeee;
  color: #4f4f4f;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.tracking-collection-state-completed,
.tracking-collection-state-exception_approved,
.tracking-exception-state-approved {
  background: #dff2e3;
  color: #236c31;
}

.tracking-collection-state-in_progress {
  background: #dcecf8;
  color: #225f86;
}

.tracking-collection-state-exception_pending,
.tracking-exception-state-pending {
  background: #fff0be;
  color: #765500;
}

.tracking-exception-state-rejected {
  background: #f8deda;
  color: #943126;
}

.tracking-exception-list {
  display: grid;
  gap: 12px;
}

.tracking-exception-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
  padding: 16px;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #ffffff;
}

.tracking-exception-content {
  min-width: 0;
}

.tracking-exception-content p {
  margin: 12px 0 8px;
  color: #4f4f4f;
  line-height: 1.5;
}

.tracking-exception-content small {
  color: #777777;
}

.tracking-exception-content .tracking-exception-rejection {
  color: #943126;
  font-weight: 700;
}

.tracking-collection-photo-link,
.tracking-final-photo {
  display: block;
  overflow: hidden;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  background: #f4f4f4;
}

.tracking-collection-photo-link img {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: contain;
}

.tracking-final-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.tracking-final-photo img {
  display: block;
  width: 100%;
  height: min(420px, 48vh);
  object-fit: contain;
}

.tracking-collection-empty,
.tracking-collection-empty-state p {
  margin: 0;
  color: #666666;
}

.tracking-collection-empty-state {
  display: grid;
  gap: 8px;
  padding: 28px 0;
  text-align: center;
}

@media (max-width: 768px) {
  .tracking-collection-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tracking-collection-heading,
  .tracking-exception-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .tracking-exception-entry {
    grid-template-columns: 1fr;
  }

  .tracking-collection-photo-link {
    width: min(100%, 280px);
  }

  .tracking-final-photo img {
    height: min(360px, 45vh);
  }
}

.tracking-modal-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 22px;
  position: relative;
}

.tracking-modal-stepper::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 18px;
  height: 3px;
  background: #d2d2d2;
  z-index: 0;
}

.tracking-step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 0 10px;
}

.tracking-step-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  box-shadow: 0 0 0 2px currentColor;
  background: currentColor;
}

.tracking-step strong {
  font-size: 13px;
  line-height: 1.35;
}

.tracking-step-done {
  color: #2f8b3a;
}

.tracking-step-current {
  color: #e3aa24;
}

.tracking-step-future {
  color: #9e9e9e;
}

.tracking-step-problem {
  color: #c63d2f;
}

.tracking-modal-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.tracking-modal-timeline .tracking-timeline-item {
  grid-template-columns: 16px 1fr;
  padding: 12px;
  border-radius: 12px;
  background: #fffaf4;
  border: 1px solid #f2d2b5;
}

.tracking-modal-timeline .tracking-timeline-dot {
  border-color: #fffaf4;
}

.tracking-modal-timeline::before {
  display: none;
}

.tracking-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.tracking-modal-actions form {
  margin: 0;
}

.tracking-create-actions {
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.tracking-create-actions .btn {
  width: auto;
  min-width: 132px;
  min-height: 36px;
  padding: 8px 16px;
}

.tracking-modal-form {
  max-width: none;
  margin: 0;
}

.tracking-modal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tracking-modal-form-grid label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.tracking-modal-form-grid input,
.tracking-modal-form-grid select {
  min-height: 40px;
}

.tracking-error-table-container {
  margin-top: 8px;
  overflow-x: hidden;
}

.tracking-error-table th:last-child,
.tracking-error-table td:last-child {
  width: 140px;
  min-width: 140px;
}

.tracking-error-table {
  table-layout: auto;
  width: 100%;
}

.tracking-error-table th:nth-child(1),
.tracking-error-table td:nth-child(1) {
  width: 130px;
}

.tracking-error-table th:nth-child(2),
.tracking-error-table td:nth-child(2) {
  width: 130px;
}

.tracking-error-table th:nth-child(3),
.tracking-error-table td:nth-child(3) {
  width: 120px;
}

.tracking-error-table th:nth-child(4),
.tracking-error-table td:nth-child(4) {
  width: 130px;
}

.tracking-error-table th:nth-child(5),
.tracking-error-table td:nth-child(5) {
  width: 160px;
}

.tracking-error-table th:nth-child(6),
.tracking-error-table td:nth-child(6) {
  width: auto;
  min-width: 0;
}

.tracking-error-table td {
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: middle;
  white-space: normal;
}

.tracking-error-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.tracking-error-actions form {
  margin: 0;
}

.tracking-error-table .actions {
  text-align: center;
  vertical-align: middle;
}

.tracking-empty-state {
  text-align: center;
  color: #8a4b08;
  padding: 18px 12px;
}

.page-subtitle {
  margin: 0.35rem 0 0;
  color: #92510c;
  font-size: 0.98rem;
}

.active-service-layout {
  display: grid;
  gap: 1rem;
}

.active-service-toolbar {
  display: grid;
  gap: 1rem;
}

.active-service-filters,
.active-service-import-form {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(260px, 1.2fr) 220px auto;
  align-items: end;
  background: #fff8ef;
  border: 1px solid rgba(255, 130, 16, 0.3);
  border-radius: 18px;
  padding: 1.2rem 1.3rem;
  max-width: none;
  margin: 0;
}

.active-service-toolbar-actions,
.active-service-inline-actions,
.active-service-action-stack {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.active-service-filters .btn,
.active-service-import-form .btn {
  width: auto;
}

.active-service-filters .btn {
  min-width: 120px;
}

.active-service-toolbar-actions {
  align-self: end;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.active-service-import-copy {
  display: grid;
  gap: 0.3rem;
}

.active-service-import-copy span {
  color: #7b5a34;
  font-size: 0.94rem;
  line-height: 1.45;
}

.active-service-file-field {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.active-service-file-field span {
  font-weight: 600;
}

.active-service-file-field input[type="file"] {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.active-service-customer {
  display: grid;
  gap: 0.2rem;
}

.active-service-customer span {
  color: #7b5a34;
  font-size: 0.86rem;
}

.active-service-actions-cell {
  display: table-cell;
  text-align: center;
  vertical-align: middle !important;
  width: 132px !important;
  min-width: 132px;
}

.active-service-table th:last-child,
.active-service-table td:last-child {
  width: 132px !important;
  min-width: 132px;
}

.active-service-actions-cell .btn {
  display: inline-flex;
}

.active-service-actions-cell .btn.small {
  min-width: 98px;
}

.active-service-status {
  font-weight: 700;
}

.active-service-status-success {
  background: rgba(36, 152, 80, 0.12);
  border-color: rgba(36, 152, 80, 0.28);
  color: #1f7f46;
}

.active-service-status-warning {
  background: rgba(243, 182, 41, 0.15);
  border-color: rgba(243, 182, 41, 0.35);
  color: #9f6a00;
}

.active-service-status-info {
  background: rgba(56, 120, 211, 0.13);
  border-color: rgba(56, 120, 211, 0.28);
  color: #245ca7;
}

.active-service-status-danger {
  background: rgba(216, 61, 61, 0.12);
  border-color: rgba(216, 61, 61, 0.28);
  color: #b43333;
}

.empty-state-cell {
  text-align: center;
  color: #7b5a34;
  padding: 2rem 1rem;
}

.active-service-modal-dialog {
  width: min(980px, calc(100vw - 2rem));
}

.active-service-modal-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.active-service-modal-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  gap: 1rem;
}

.active-service-comment-form textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  border: 1px solid #f2c7a3;
  border-radius: 14px;
  padding: 0.95rem 1rem;
  font: inherit;
  color: #2c220f;
  background: #fffdf9;
}

.active-service-status-panel {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.active-service-status-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.active-service-phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.active-service-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.active-service-whatsapp:hover {
  filter: brightness(0.96);
}

.active-service-action-stack {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.active-service-action-stack form,
.active-service-action-stack a {
  width: 100%;
  margin: 0;
}

.active-service-action-stack .btn,
.active-service-status-form .btn {
  width: 100%;
}

@media (max-width: 900px) {
  .active-service-filters,
  .active-service-import-form {
    grid-template-columns: 1fr;
  }

  .active-service-toolbar-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .active-service-toolbar-actions .btn,
  .active-service-import-form .btn {
    width: 100%;
  }

  .active-service-modal-panels {
    grid-template-columns: 1fr;
  }
}

.result {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #f2d2b5;
  border-radius: 10px;
  background: #fff9f2;
}

.alert {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #f2d2b5;
  border-radius: 8px;
  background: #fff4e8;
  color: #8a4b08;
}

.alert-success {
  border-color: #a3d9a5;
  background: #eefbf0;
  color: #256c2d;
}

.alert-error {
  border-color: #f0b6b2;
  background: #fff1f1;
  color: #a3382f;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #f2d2b5;
  background: #fff4e8;
  color: #8a4b08;
  font-size: 12px;
  font-weight: 600;
}

.status-aguardando {
  background: #fff7f0;
  border-color: #ffd3ad;
  color: #8a4b08;
}

.status-manual {
  background: #fff7f0;
  border-color: #ffd3ad;
  color: #8a4b08;
}

.status-integracao {
  background: #fff7f0;
  border-color: #ffd3ad;
  color: #8a4b08;
}

.status-entregue {
  background: #fff0e2;
  border-color: #ff8210;
  color: #a04d00;
}

.status-atencao {
  background: #fff7ed;
  border-color: #ffb26f;
  color: #a04d00;
}

.status-suspenso {
  background: #fff3e6;
  border-color: #ff9b4a;
  color: #8a3a00;
}

.status-em-rota {
  background: #fff7ef;
  border-color: #ffb26f;
  color: #a04d00;
}

.status-postado {
  background: #fff6eb;
  border-color: #ffb26f;
  color: #a04d00;
}

.status-ag-retirada {
  background: #fff6eb;
  border-color: #ffb26f;
  color: #a04d00;
}

.status-entregando {
  background: #fff6eb;
  border-color: #ffb26f;
  color: #a04d00;
}

.status-ag-postagem {
  background: #fff6eb;
  border-color: #ffb26f;
  color: #a04d00;
}

.filter-form {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #f2d2b5;
  border-radius: 10px;
  background: #fff9f2;
}

.filter-details {
  margin: 0;
}

.filter-title {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  margin-bottom: 8px;
  color: #8a4b08;
}

.filter-title::-webkit-details-marker {
  display: none;
}

.filter-title::after {
  content: "v";
  margin-left: 8px;
  font-size: 12px;
}

.filter-details[open] .filter-title::after {
  content: "^";
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 10px;
}

.filter-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.operation-feedback {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 120;
  display: grid;
  gap: 4px;
  width: min(360px, calc(100vw - 48px));
  padding: 14px 16px;
  border: 1px solid #f2d2b5;
  border-radius: 14px;
  background: #fffaf4;
  color: #1a1a1a;
  box-shadow: 0 18px 42px rgba(95, 52, 10, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.operation-feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.operation-feedback.is-success {
  border-left: 5px solid #2f9e44;
}

.operation-feedback.is-error {
  border-left: 5px solid #e03131;
}

.operation-feedback-title {
  font-size: 15px;
}

.operation-feedback-message {
  color: #6b5a49;
  font-size: 13px;
  line-height: 1.35;
}

.operation-confirm-open {
  overflow: hidden;
}

.operation-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.operation-confirm-modal.is-open {
  display: flex;
}

.operation-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.48);
}

.operation-confirm-dialog {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  padding: 26px;
  border: 1px solid #f2d2b5;
  border-radius: 18px;
  background: #fffaf4;
  box-shadow: 0 22px 60px rgba(26, 26, 26, 0.24);
}

.operation-confirm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid #f2d2b5;
  border-radius: 50%;
  background: #fff6eb;
  color: #8a4b08;
  cursor: pointer;
}

.operation-confirm-kicker {
  display: block;
  margin-bottom: 6px;
  color: #a4550a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.operation-confirm-dialog h3 {
  margin: 0 34px 10px 0;
  font-size: 24px;
}

.operation-confirm-dialog p {
  margin: 0;
  color: #6b5a49;
  line-height: 1.45;
}

.operation-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.health-page-header {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.health-page-header p {
  max-width: 760px;
  color: #8a4b08;
}

.health-kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: #a4550a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.health-card {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid #f2c59f;
  border-radius: 18px;
  background: #fffaf4;
  box-shadow: 0 16px 40px rgba(122, 72, 18, 0.08);
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.health-grid-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.health-span-2 {
  grid-column: span 2;
}

.health-card h3,
.health-card h4 {
  margin: 0 0 10px;
}

.health-card p {
  margin: 6px 0;
  color: #5f3a16;
}

.health-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.health-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.health-badge-healthy,
.health-badge-ok {
  border: 1px solid #8ce99a;
  background: #ebfbee;
  color: #2b8a3e;
}

.health-badge-degraded,
.health-badge-warning,
.health-badge-atencao,
.health-badge-unknown {
  border: 1px solid #ffd43b;
  background: #fff9db;
  color: #8a5f00;
}

.health-badge-unhealthy,
.health-badge-critical,
.health-badge-erro {
  border: 1px solid #ffa8a8;
  background: #fff5f5;
  color: #c92a2a;
}

.health-alert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.health-alert {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: #fff7ed;
}

.health-alert-ok {
  border-left: 5px solid #2f9e44;
}

.health-alert-warning {
  border-left: 5px solid #f59f00;
}

.health-alert-critical {
  border-left: 5px solid #e03131;
}

.health-definition-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.health-definition-list div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid #f5ddc8;
}

.health-definition-list.compact div {
  grid-template-columns: 140px minmax(0, 1fr);
}

.health-definition-list span {
  color: #8a4b08;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.health-definition-list strong {
  overflow-wrap: anywhere;
}

.health-table th,
.health-table td {
  padding: 10px 12px;
  font-size: 13px;
}

.health-muted {
  color: #8a6a49;
  font-size: 13px;
}

.health-log-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.health-log-card {
  padding: 14px;
  border: 1px solid #f5ddc8;
  border-radius: 14px;
  background: #fff;
}

.health-log-card pre {
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  background: #1f1f1f;
  color: #f8f0e8;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.upload-dropzone {
  position: relative;
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 152px;
  padding: 22px;
  border: 2px dashed #ffb06b;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 122, 10, 0.08), rgba(255, 250, 244, 0.96)),
    #fffaf4;
  color: #4a2a0d;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.upload-dropzone:hover,
.upload-dropzone:focus,
.upload-dropzone:focus-within,
.upload-dropzone.is-dragover {
  border-color: #ff7a0a;
  background:
    linear-gradient(135deg, rgba(255, 122, 10, 0.16), rgba(255, 246, 235, 0.98)),
    #fff6eb;
  box-shadow: 0 12px 28px rgba(122, 72, 18, 0.12);
  outline: none;
}

.upload-dropzone.is-dragover {
  transform: translateY(-1px);
}

.upload-dropzone.has-file {
  border-style: solid;
  border-color: #ff7a0a;
}

.upload-dropzone.has-error {
  border-color: #e03131;
  background: #fff5f5;
}

.upload-dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
}

.upload-dropzone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #ff7a0a;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.upload-dropzone-title {
  font-size: 16px;
  font-weight: 800;
}

.upload-dropzone-subtitle,
.upload-dropzone-help,
.upload-dropzone-file,
.upload-dropzone-error {
  font-size: 13px;
}

.upload-dropzone-subtitle,
.upload-dropzone-help {
  color: #8a4b08;
}

.upload-dropzone-file {
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  color: #5f3a16;
  overflow-wrap: anywhere;
}

.upload-dropzone-error {
  min-height: 18px;
  color: #c92a2a;
  font-weight: 700;
}

.active-service-import-form .upload-dropzone {
  min-width: min(360px, 100%);
}

.active-service-import-form.upload-dropzone-form {
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.1fr) auto;
  align-items: center;
}

.active-service-import-form.upload-dropzone-form .btn {
  align-self: center;
}

.tracking-xml-card,
.picking-mobile-link-card,
.picking-camera-note {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid #f2c59f;
  border-radius: 18px;
  background: #fffaf4;
  box-shadow: 0 16px 40px rgba(122, 72, 18, 0.08);
}

.tracking-xml-header p,
.picking-camera-note p {
  margin: 6px 0 0;
  color: #7b5a34;
}

.tracking-xml-form,
.tracking-xml-create-form {
  max-width: none;
  margin: 14px 0 0;
}

.tracking-xml-shipping-layout {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
}

.tracking-xml-shipping-fields {
  align-content: start;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tracking-xml-shipping-fields > label,
.tracking-shipping-file-field {
  display: grid;
  gap: 7px;
  font-weight: 700;
  min-width: 0;
}

.tracking-xml-shipping-fields input,
.tracking-xml-shipping-fields select,
.tracking-shipping-file-field input {
  min-height: 40px;
  min-width: 0;
  width: 100%;
}

.tracking-xml-shipping-fields .tracking-switch-field {
  align-items: center;
  background: #fff3e5;
  border: 1px solid #ffbd83;
  border-radius: 8px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 12px;
}

.tracking-xml-shipping-fields .tracking-switch-options {
  min-width: 190px;
  width: auto;
}

.tracking-shipping-dropzone {
  align-content: center;
  min-height: 100%;
}

.tracking-shipping-file-field {
  align-content: center;
  border: 1px solid #efc19b;
  border-radius: 8px;
  padding: 20px;
}

@media (max-width: 1000px) {
  .tracking-xml-shipping-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .tracking-shipping-dropzone {
    min-height: 180px;
  }
}

@media (max-width: 680px) {
  .tracking-xml-shipping-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .tracking-xml-shipping-fields .tracking-switch-field {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  .tracking-xml-shipping-fields .tracking-switch-field {
    grid-template-columns: minmax(0, 1fr);
  }

  .tracking-xml-shipping-fields .tracking-switch-options {
    min-width: 0;
    width: 100%;
  }
}

.tracking-xml-preview {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.tracking-xml-preview-title,
.picking-card-header,
.picking-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.picking-document-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.tracking-xml-single-scan {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #f2c59f;
  border-radius: 14px;
}

.tracking-xml-single-scan legend {
  padding: 0 8px;
  color: #8a4b08;
  font-weight: 800;
}

.picking-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.picking-card,
.picking-exception-card,
.picking-mobile-item {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #f2c59f;
  border-radius: 18px;
  background: #fffaf4;
}

.picking-card-grid,
.picking-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.picking-card-grid div {
  display: grid;
  gap: 4px;
}

.picking-card-grid span {
  color: #a4550a;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.picking-mobile-url {
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  color: #8a4b08;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.picking-mobile-qr {
  display: inline-grid;
  place-items: center;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #f2c59f;
  border-radius: 18px;
  background: #fff;
}

.picking-mobile-qr svg {
  display: block;
  width: 180px;
  height: 180px;
}

.picking-mobile-items {
  display: grid;
  gap: 16px;
}

.picking-mobile-item {
  padding: 20px;
  border-color: #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.picking-mobile-item > div:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: center;
}

.picking-mobile-item > div:first-child .tracking-modal-kicker,
.picking-mobile-item > div:first-child p {
  grid-column: 1 / -1;
}

.picking-mobile-item > div:first-child h3 {
  min-width: 0;
  margin: 0;
  color: #0b1c30;
  font-size: 24px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.picking-mobile-item > div:first-child p {
  margin: 0;
  color: #64748b;
  line-height: 1.45;
}

.picking-mobile-item > div:first-child > strong {
  align-self: center;
  padding: 6px 10px;
  border-radius: 6px;
  background: #fff2e8;
  color: #9a4100;
  font-variant-numeric: tabular-nums;
}

.picking-mobile-item.is-complete {
  border-color: #86d5a4;
  background: #f0fdf4;
}

.picking-mobile-item.is-awaiting-approval {
  border-color: #f2c35c;
  background: #fffbeb;
}

.picking-mobile-scan-form {
  max-width: none;
  margin: 0;
}

.picking-exception-form-hidden {
  display: none;
}

.picking-photo-capture {
  display: grid;
  gap: 8px;
}

.picking-photo-capture > span {
  font-weight: 800;
}

.picking-photo-button {
  width: 100%;
  justify-content: center;
  cursor: pointer;
}

.picking-photo-button.is-photo-ready {
  border-color: #15803d;
  background: #16a34a;
  color: #fff;
}

.picking-photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body.picking-processing-open {
  overflow: hidden;
}

.picking-processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 18, 18, 0.48);
  backdrop-filter: blur(4px);
}

.picking-processing-overlay[hidden] {
  display: none;
}

.picking-processing-dialog {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(18, 18, 18, 0.28);
  text-align: center;
}

.picking-processing-dialog > span {
  display: inline-flex;
  margin-bottom: 10px;
  color: #ff8210;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.picking-processing-dialog h3 {
  margin: 0 0 8px;
}

.picking-processing-dialog p {
  margin: 0 0 18px;
  color: #64748b;
}

.picking-processing-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.picking-processing-bar span {
  display: block;
  width: 44%;
  height: 100%;
  border-radius: inherit;
  background: #ff8210;
  animation: picking-processing-slide 1.15s ease-in-out infinite;
}

@keyframes picking-processing-slide {
  0% {
    transform: translateX(-110%);
  }
  50% {
    transform: translateX(70%);
  }
  100% {
    transform: translateX(250%);
  }
}

.picking-camera-preview {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  background: #1f1f1f;
}

.picking-camera-stage {
  position: fixed;
  inset: 0;
  z-index: 5000;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #1f1f1f;
  box-shadow: none;
}

.picking-camera-stage[hidden],
.picking-camera-capture[hidden],
.picking-camera-exception[hidden] {
  display: none;
}

.picking-scanner-open {
  overflow: hidden;
}

.picking-camera-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.52)),
    transparent;
  pointer-events: none;
}

.picking-camera-reader-status {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  z-index: 5;
  max-width: min(72vw, 520px);
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(17, 24, 39, 0.78);
  color: #ffffff;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
}

.picking-camera-reader-status[hidden] {
  display: none;
}

.picking-camera-frame {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.picking-camera-frame span {
  position: relative;
  width: min(86vw, 520px);
  height: clamp(88px, 18vh, 140px);
  border: 3px solid #ffffff;
  border-radius: 12px;
  box-shadow:
    0 0 0 999px rgba(0, 0, 0, 0.36),
    0 0 20px rgba(34, 197, 94, 0.7);
}

.picking-camera-frame span::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  left: 12px;
  height: 2px;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
  transform: translateY(-50%);
}

.picking-camera-timeout-tip {
  position: absolute;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 4;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.78);
  color: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
}

.picking-camera-timeout-tip[hidden] {
  display: none;
}

.picking-camera-timeout-tip strong {
  padding-right: 28px;
  font-size: 16px;
  line-height: 1.2;
}

.picking-camera-timeout-actions {
  display: grid;
  gap: 8px;
}

.picking-camera-timeout-actions .btn {
  min-height: 40px;
  padding: 10px 12px;
}

.picking-camera-timeout-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
}

.picking-camera-capture,
.picking-camera-exception {
  position: absolute;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 36px rgba(16, 24, 40, 0.28);
}

.picking-camera-capture span,
.picking-camera-exception > span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.picking-camera-capture strong,
.picking-camera-exception > strong {
  color: #111827;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.picking-camera-mismatch {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.picking-camera-mismatch[hidden] {
  display: none;
}

.picking-camera-exception label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.picking-camera-exception input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  text-transform: none;
}

.picking-camera-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.picking-camera-close {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.28);
}

.picking-approvals-board {
  display: grid;
  gap: 18px;
}

.picking-approval-card {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid #f2c59f;
  border-radius: 18px;
  background: #fffaf4;
  box-shadow: 0 16px 40px rgba(122, 72, 18, 0.08);
}

.picking-approval-photo {
  overflow: hidden;
  min-height: 220px;
  border: 1px solid #f2c59f;
  border-radius: 14px;
  background: #fff;
}

.picking-approval-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.picking-approval-photo-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: #8a4b08;
  font-weight: 800;
}

.picking-approval-content,
.picking-approval-reason {
  display: grid;
  gap: 14px;
}

.picking-approval-reason {
  padding: 14px;
  border: 1px solid #f2c59f;
  border-radius: 12px;
  background: #fff;
}

.picking-approval-reason span {
  color: #a4550a;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.picking-approval-reason p {
  margin: 0;
  color: #4a2f14;
  font-weight: 700;
}

@media (max-width: 820px) {
  .picking-approval-card {
    grid-template-columns: 1fr;
  }
}

.picking-mobile-page {
  min-height: 100vh;
  background: #f8fafc;
  color: #0b1c30;
  font-family: "Segoe UI", Arial, sans-serif;
}

.picking-mobile-page .mobile-container {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 0 max(32px, env(safe-area-inset-bottom));
}

.picking-mobile-shell {
  display: grid;
  gap: 18px;
}

.picking-mobile-hero,
.picking-mobile-panel {
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.picking-mobile-hero h2,
.picking-mobile-panel h3 {
  margin: 6px 0 8px;
  color: #0b1c30;
  line-height: 1.2;
}

.picking-mobile-hero p,
.picking-mobile-panel p {
  margin: 0;
  color: #64748b;
  line-height: 1.45;
}

.picking-mobile-page .tracking-modal-kicker {
  color: #ff8210;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.picking-mobile-page .btn {
  min-height: 42px;
  border-radius: 6px;
  font-weight: 700;
}

.picking-mobile-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.picking-mobile-page select,
.picking-mobile-page textarea {
  min-height: 42px;
  border-color: #dbe3ee;
  border-radius: 6px;
  background: #ffffff;
  color: #0b1c30;
}

.picking-mobile-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.picking-mobile-steps span {
  padding: 10px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.picking-mobile-steps .is-current {
  background: #ff8210;
  color: #fff;
  border-color: #ff8210;
}

.picking-mobile-steps .is-done {
  background: #ecfdf3;
  color: #15803d;
  border-color: #86d5a4;
}

.picking-mobile-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.picking-mobile-summary div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-left: 3px solid #ff8210;
  background: #f8fafc;
}

.picking-mobile-summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.picking-mobile-next {
  width: 100%;
  justify-content: center;
}

.picking-mobile-done {
  text-align: center;
}

.visualization-page .container {
  max-width: none;
  width: auto;
  margin-left: 72px;
  margin-right: 0;
  padding-right: 16px;
  padding-left: 16px;
}

.visualization-fullscreen-active .sidebar {
  display: none;
}

.visualization-fullscreen-active.visualization-page .container {
  width: 100%;
  margin-left: 0;
  padding: 16px;
}

.visualization-shell {
  display: grid;
  gap: 24px;
  padding-bottom: 40px;
}

.visualization-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(340px, 0.8fr);
  gap: 22px;
  align-items: stretch;
}

.visualization-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border: 1px solid #f2c59f;
  border-radius: 18px;
  background: #fffaf4;
  box-shadow: 0 18px 48px rgba(122, 72, 18, 0.12);
}

.visualization-header-copy {
  min-width: 0;
}

.visualization-header-side {
  display: grid;
  justify-items: end;
  gap: 12px;
  min-width: 240px;
}

.visualization-kicker,
.visualization-header p,
.visualization-main-metric span,
.visualization-order-data dt {
  color: #7b3f07;
  font-weight: 900;
  text-transform: uppercase;
}

.visualization-kicker {
  font-size: 18px;
}

.visualization-header h1 {
  margin: 6px 0;
  font-size: clamp(42px, 4vw, 76px);
  line-height: 1;
}

.visualization-header p {
  margin: 0;
  font-size: clamp(18px, 1.6vw, 28px);
  text-transform: none;
}

.visualization-refresh {
  min-width: 220px;
  padding: 16px 20px;
  border: 2px solid #ff7a0a;
  border-radius: 999px;
  color: #ff7a0a;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.visualization-fullscreen-button {
  min-width: 220px;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: #ff7a0a;
  color: #fff;
  font: inherit;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.visualization-fullscreen-button:hover,
.visualization-fullscreen-button:focus-visible {
  background: #e86600;
}

.visualization-clock {
  color: #111827;
  font-size: clamp(42px, 4vw, 72px);
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.visualization-metric-band,
.visualization-manager-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.visualization-main-metric {
  display: grid;
  gap: 10px;
  min-height: 170px;
  padding: 28px;
  border: 1px solid #f2c59f;
  border-radius: 18px;
  background: #fffaf4;
  box-shadow: 0 18px 48px rgba(122, 72, 18, 0.12);
}

.visualization-main-metric span {
  font-size: clamp(16px, 1.1vw, 22px);
  white-space: nowrap;
}

.visualization-main-metric strong {
  color: #111827;
  font-size: clamp(72px, 8vw, 132px);
  line-height: 0.9;
}

.visualization-main-metric.is-success {
  background: #f0fdf4;
  border-color: #86efac;
}

.visualization-main-metric.is-alert,
.visualization-panel.is-alert {
  background: #fff1f2;
  border-color: #fb7185;
}

.visualization-order-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.visualization-order-grid[hidden],
.visualization-empty[hidden],
.visualization-late-list[hidden],
[data-late-packing-empty][hidden] {
  display: none;
}

.visualization-order-card {
  display: grid;
  gap: 10px;
  min-height: 240px;
  padding: 16px;
  border: 4px solid #f2c59f;
  border-radius: 18px;
  background: #fffaf4;
  box-shadow: 0 18px 48px rgba(122, 72, 18, 0.14);
}

.visualization-order-card.is-required {
  border-color: #dc2626;
}

.visualization-order-card.is-preferred {
  border-color: #f59e0b;
}

.visualization-order-card.is-tomorrow {
  border-color: #2563eb;
}

.visualization-order-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.visualization-priority,
.visualization-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 999px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visualization-priority {
  background: #111827;
  color: #fff;
}

.visualization-status {
  background: #fff;
  color: #7b3f07;
  border: 1px solid #f2c59f;
}

.visualization-order-number {
  overflow: hidden;
  color: #111827;
  font-size: clamp(28px, 2.7vw, 46px);
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visualization-order-client {
  min-height: 30px;
  overflow: hidden;
  color: #1f2937;
  font-size: clamp(18px, 1.25vw, 24px);
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visualization-order-data {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(130px, 0.8fr);
  gap: 8px;
  margin: 0;
}

.visualization-order-data div {
  min-height: 58px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #f2c59f;
  border-radius: 14px;
  background: #fff;
}

.visualization-order-data dt {
  margin-bottom: 4px;
  font-size: 12px;
}

.visualization-order-data dd {
  margin: 0;
  overflow: hidden;
  color: #111827;
  font-size: clamp(16px, 1vw, 20px);
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visualization-empty {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 40px;
  border: 1px solid #86efac;
  border-radius: 18px;
  background: #f0fdf4;
  text-align: center;
}

.visualization-empty strong {
  color: #166534;
  font-size: clamp(36px, 4vw, 72px);
}

.visualization-empty span {
  color: #166534;
  font-size: clamp(22px, 2vw, 32px);
  font-weight: 800;
}

.visualization-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 22px;
}

.visualization-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px;
  border: 1px solid #f2c59f;
  border-radius: 18px;
  background: #fffaf4;
  box-shadow: 0 18px 48px rgba(122, 72, 18, 0.12);
}

.visualization-panel h2 {
  margin: 0;
  font-size: clamp(30px, 2.4vw, 44px);
}

.visualization-panel p {
  margin: 0;
  color: #1f2937;
  font-size: clamp(22px, 1.6vw, 30px);
  font-weight: 850;
}

.visualization-unit-list,
.visualization-late-list {
  display: grid;
  gap: 12px;
}

.visualization-unit-row,
.visualization-late-list div {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, auto));
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid #f2c59f;
  border-radius: 14px;
  background: #fff;
}

.visualization-late-list div {
  grid-template-columns: 1fr;
}

.visualization-unit-row strong,
.visualization-late-list strong {
  color: #111827;
  font-size: clamp(22px, 1.8vw, 34px);
}

.visualization-unit-row span,
.visualization-late-list span {
  color: #7b3f07;
  font-size: clamp(18px, 1.2vw, 24px);
  font-weight: 900;
}

@media (max-width: 1100px) {
  .visualization-page .container {
    width: min(100% - 24px, 760px);
    margin-left: auto;
    padding-right: 20px;
    padding-left: 20px;
  }

  .visualization-top-grid {
    grid-template-columns: 1fr;
  }

  .visualization-header,
  .visualization-order-topline {
    align-items: stretch;
    flex-direction: column;
  }

  .visualization-header-side {
    justify-items: stretch;
    min-width: 0;
  }

  .visualization-clock {
    text-align: left;
  }

  .visualization-refresh {
    width: 100%;
  }

  .visualization-fullscreen-button {
    width: 100%;
  }

  .visualization-main-metric span {
    white-space: normal;
  }

  .visualization-order-grid,
  .visualization-panel-grid {
    grid-template-columns: 1fr;
  }

  .visualization-order-data,
  .visualization-unit-row {
    grid-template-columns: 1fr;
  }

  .visualization-order-card {
    min-height: 0;
  }

  .visualization-order-number,
  .visualization-order-client,
  .visualization-order-data dd {
    white-space: normal;
  }
}

@media (max-width: 620px) {
  .picking-mobile-steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  .health-grid,
  .health-grid-summary {
    grid-template-columns: 1fr;
  }

  .health-span-2 {
    grid-column: auto;
  }
}
