/* Standalone client app — shell is dark; page body inherits theme (footer/header visible) */
html.dx-app-html,
body.dx-app-body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: transparent !important;
  background-color: transparent !important;
  color: inherit;
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
}

body.dx-app-body .site-footer,
body.dx-app-body footer,
body.dx-app-body #colophon,
body.dx-app-body .elementor-location-footer {
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 2 !important;
}

html.dx-app-html {
  box-sizing: border-box;
}

html.dx-app-html *,
html.dx-app-html *::before,
html.dx-app-html *::after {
  box-sizing: border-box;
}

body.dx-app-body #wpadminbar {
  display: none !important;
}

/* Hide third-party cookie / GDPR banners on standalone dashboard */
body.dx-app-body #cookie-law-info-bar,
body.dx-app-body #cookie-law-info-again,
body.dx-app-body .cli-modal,
body.dx-app-body .cli-popupbar-overlay,
body.dx-app-body .cky-consent-container,
body.dx-app-body .cky-overlay,
body.dx-app-body .cky-modal,
body.dx-app-body #CybotCookiebotDialog,
body.dx-app-body #CybotCookiebotDialogBodyUnderlay,
body.dx-app-body .cmplz-cookiebanner,
body.dx-app-body .cmplz-blocked-content-notice,
body.dx-app-body #catapult-cookie-bar,
body.dx-app-body .cc-window,
body.dx-app-body .cc-banner,
body.dx-app-body .cookie-notice,
body.dx-app-body #cn-notice,
body.dx-app-body .gdpr-banner,
body.dx-app-body .borlabs-cookie,
body.dx-app-body #BorlabsCookieBox,
body.dx-app-body .brlbs-cmpnt-container,
body.dx-app-body .iubenda-cs-container,
body.dx-app-body [class*="cookie-banner"],
body.dx-app-body [id*="cookie-banner"],
body.dx-app-body [class*="cookie-notice"],
body.dx-app-body [class*="consent-banner"],
body.dx-app-body [id*="consent"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  position: fixed !important;
  left: -9999px !important;
  top: auto !important;
}

.dx-app {
  --dx-side: 252px;
  --dx-top: 64px;
  --dx-bg: #0b1220;
  --dx-surface: #111827;
  --dx-card: #151f31;
  --dx-border: rgba(255, 255, 255, 0.08);
  --dx-accent: #e11d48;
  --dx-text: rgba(255, 255, 255, 0.92);
  --dx-muted: rgba(255, 255, 255, 0.62);
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  overflow-x: hidden;
  background: var(--dx-bg);
  color: var(--dx-text);
}

.dx-app--login {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.dx-app-login-card {
  width: min(420px, 100%);
  padding: 32px 28px;
  border-radius: 20px;
  background: var(--dx-card);
  border: 1px solid var(--dx-border);
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.dx-app-login-card h1 {
  margin: 8px 0 10px;
  font-size: 26px;
}

.dx-app-brand {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dx-accent);
}

.dx-app-sidebar {
  width: var(--dx-side);
  flex: 0 0 var(--dx-side);
  min-height: 100vh;
  padding: 20px 16px;
  background: var(--dx-surface);
  border-right: 1px solid var(--dx-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: flex-start;
  z-index: 120;
}

.dx-app-sidebar .dx-dash-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dx-app-sidebar .dx-dash-nav li {
  margin: 0;
  padding: 0;
}

.dx-app-sidebar .dx-dash-nav a {
  display: block;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--dx-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.dx-app-sidebar .dx-dash-nav a:hover,
.dx-app-sidebar .dx-dash-nav a.is-active {
  background: rgba(225, 29, 72, 0.14);
  color: #fff;
}

.dx-app-sidebar .dx-dash-nav a.is-active {
  background: var(--dx-accent);
}

.dx-app-sidebar .dx-dash-nav__logout {
  display: block;
  margin-top: auto;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--dx-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border-top: 1px solid var(--dx-border);
  padding-top: 16px;
}

.dx-app-sidebar .dx-dash-nav__logout:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.dx-app-frame {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.dx-app-topbar {
  height: var(--dx-top);
  flex: 0 0 var(--dx-top);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  background: var(--dx-surface);
  border-bottom: 1px solid var(--dx-border);
  position: sticky;
  top: 0;
  z-index: 110;
}

.dx-app-topbar__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dx-app-topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dx-app-topbar__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--dx-muted);
}

.dx-app-menu-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--dx-border);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.dx-app-menu-btn__icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dx-app-menu-btn__icon i {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.dx-app.is-open .dx-app-menu-btn__icon i:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.dx-app.is-open .dx-app-menu-btn__icon i:nth-child(2) {
  opacity: 0;
}

.dx-app.is-open .dx-app-menu-btn__icon i:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.dx-app-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100;
}

.dx-app.is-open .dx-app-overlay {
  display: block;
}

.dx-app-content {
  flex: 1;
  padding: 22px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: transparent;
}

.dx-app-site-footer {
  flex-shrink: 0;
  width: 100%;
  padding: 14px 22px;
  text-align: center;
  font-size: 12px;
  color: var(--dx-muted);
  background: var(--dx-surface);
  border-top: 1px solid var(--dx-border);
}

body.dx-app-body > .dx-app-site-footer {
  margin: 0;
  box-sizing: border-box;
}

.dx-app-site-footer p {
  margin: 0;
  letter-spacing: 0.02em;
}

.dx-app--login .dx-app-site-footer {
  margin-top: 24px;
  background: transparent;
  border-top: none;
}

.dx-muted {
  color: var(--dx-muted);
  font-size: 13px;
}

.dx-panel,
.dx-dash-main .dx-hero,
.dx-dash-main .dx-card,
.dx-card {
  padding: 20px 18px;
  border-radius: 16px;
  background: var(--dx-card);
  border: 1px solid var(--dx-border);
  margin-bottom: 14px;
  width: 100%;
  max-width: 100%;
}

.dx-panel h2,
.dx-dash-main .dx-hero h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.dx-dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.dx-dash-stat {
  padding: 16px;
  border-radius: 14px;
  background: var(--dx-card);
  border: 1px solid var(--dx-border);
}

.dx-dash-stat span {
  display: block;
  font-size: 12px;
  color: var(--dx-muted);
  margin-bottom: 6px;
}

.dx-dash-stat strong {
  font-size: 24px;
}

.dx-dash-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.dx-dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.dx-dash-table th,
.dx-dash-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--dx-border);
  text-align: left;
  vertical-align: middle;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.dx-dash-table a {
  color: #93c5fd;
  text-decoration: none;
}

.dx-dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dx-dash-msg {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.dx-dash-msg--err {
  background: rgba(225, 29, 72, 0.12);
  border-color: rgba(225, 29, 72, 0.4);
}

.dx-dash-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
  font-size: 13px;
}

.dx-dash-form input,
.dx-dash-form select,
.dx-dash-form textarea,
.dx-app select,
.dx-app .dx-dash-table select,
.dx-app-content select,
body.dx-app-body .dx-app select,
body.dx-app-body .dx-dash-table select {
  width: 100%;
  padding: 9px 32px 9px 11px;
  border-radius: 10px;
  border: 1px solid #2b3548;
  background-color: #111827;
  color: #ffffff;
  color-scheme: dark;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 8px;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}

.dx-app .dx-dash-table select {
  min-width: 140px;
  width: auto;
  max-width: 220px;
}

.dx-app select:focus,
.dx-app .dx-dash-table select:focus,
.dx-dash-form select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.28);
  background-color: #111827;
  color: #ffffff;
}

.dx-app select:hover,
.dx-app .dx-dash-table select:hover {
  border-color: #4b5563;
  background-color: #1a2332;
}

.dx-app select option,
.dx-app .dx-dash-table select option,
.dx-dash-form select option {
  background-color: #111827;
  color: #ffffff;
}

.dx-app select option:hover,
.dx-app select option:checked,
.dx-app select option:focus {
  background-color: #374151;
  color: #ffffff;
}

.dx-dash-form textarea {
  background-image: none;
  padding: 9px 11px;
}

.dx-dash-form input:not([type="checkbox"]):not([type="radio"]) {
  background-image: none;
  padding: 9px 11px;
}

.dx-dash-form .dx-frow {
  margin-bottom: 12px;
}

.dx-dash-form .dx-fgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dx-dash-btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  border: 0;
  background: var(--dx-accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
}

.dx-dash-btn--muted {
  background: rgba(255, 255, 255, 0.12);
}

.dx-dash-btn.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

.dx-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.dx-badge--pending { background: rgba(148, 163, 184, 0.2); color: #e2e8f0; }
.dx-badge--processing { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
.dx-badge--enroute { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
.dx-badge--delivered { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.dx-badge--cancelled { background: rgba(225, 29, 72, 0.18); color: #fda4af; }
.dx-badge--draft { background: rgba(168, 85, 247, 0.18); color: #d8b4fe; }

/* Tracking map panel inside shipment view (uses tracking.css) */
.dx-app-content .dx-track,
.dx-app-content .dx-track.dx-logistics-track {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow-x: hidden !important;
}

.dx-app-content .dx-logistics-track,
.dx-app-content .dx-results,
.dx-app-content .dx-grid,
.dx-app-content .dx-map,
.dx-app-content .leaflet-container {
  max-width: 100% !important;
}

.dx-app-content .dx-track > *:not(.dx-hero):not(.dx-results) {
  display: revert !important;
}

#dxSearchForm.dx-hide {
  display: none !important;
}

.dx-image-field {
  margin: 16px 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  box-sizing: border-box;
}

.dx-image-field__title {
  display: block;
  font-weight: 700;
  margin: 0 0 4px;
  color: #fff;
}

.dx-image-field__hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--dx-muted);
}

.dx-image-field__file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dx-image-field__preview {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 160px;
  margin: 0 0 12px;
  padding: 0;
  border: 1px solid var(--dx-border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.dx-image-field__preview:hover {
  border-color: rgba(59, 130, 246, 0.45);
}

.dx-image-field__preview:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.dx-image-field__preview.is-uploading {
  pointer-events: none;
  opacity: 0.85;
}

.dx-image-field__preview-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 160px;
}

.dx-image-field__preview-inner img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
  background: rgba(0, 0, 0, 0.2);
}

.dx-image-field.has-image .dx-image-field__preview-inner {
  min-height: 120px;
}

.dx-image-field__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  text-align: center;
  width: 100%;
}

.dx-image-field__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
}

.dx-image-field__placeholder-text {
  font-size: 13px;
  color: var(--dx-muted);
  max-width: 220px;
}

.dx-image-field__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 18, 32, 0.82);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  z-index: 2;
}

.dx-image-field__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.dx-image-field__btn {
  width: 100%;
  min-height: 44px;
  margin: 0;
  box-sizing: border-box;
}

/* WordPress media modal — client dashboard (desktop library) */
body.dx-app-body .media-modal,
body.dx-app-body .media-modal-backdrop {
  z-index: 200000 !important;
}

body.dx-app-body .media-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  max-width: 100% !important;
}

body.dx-app-body .media-modal-content {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

body.dx-app-body .media-frame {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
}

body.dx-app-body .media-frame-title {
  display: block !important;
  padding: 12px 48px 12px 16px !important;
  height: auto !important;
  min-height: 48px !important;
  line-height: 1.35 !important;
  box-sizing: border-box !important;
}

body.dx-app-body .media-frame-router,
body.dx-app-body .media-router {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

body.dx-app-body .media-router .media-menu-item {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  padding: 12px 14px !important;
  text-align: center !important;
  white-space: nowrap !important;
  float: none !important;
  position: relative !important;
}

body.dx-app-body .media-frame-content {
  top: 96px !important;
  bottom: 72px !important;
}

body.dx-app-body .media-toolbar {
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  padding: 10px 12px !important;
  box-sizing: border-box !important;
}

body.dx-app-body .media-toolbar-primary {
  float: none !important;
  display: flex !important;
  justify-content: flex-end !important;
  width: 100% !important;
}

body.dx-app-body .media-toolbar-primary .media-button {
  width: 100% !important;
  max-width: 100% !important;
  text-align: center !important;
  float: none !important;
}

body.dx-app-body .media-frame-toolbar .media-toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
}

body.dx-app-body .attachments-browser .media-toolbar-secondary,
body.dx-app-body .attachments-browser .media-toolbar-primary {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 782px) {
  body.dx-app-body .media-frame-title h1 {
    font-size: 16px !important;
  }

  body.dx-app-body .media-frame-router {
    border-bottom: 1px solid #dcdcde !important;
  }

  body.dx-app-body .media-router .media-menu-item {
    font-size: 13px !important;
    padding: 10px 12px !important;
  }

  body.dx-app-body .media-frame-content {
    top: 88px !important;
    bottom: 64px !important;
  }

  body.dx-app-body .uploader-inline,
  body.dx-app-body .attachments-browser {
    padding: 8px !important;
  }

  body.dx-app-body .media-sidebar {
    display: none !important;
  }

  .dx-image-field__actions {
    grid-template-columns: 1fr;
  }

  .dx-image-field__preview-inner {
    min-height: 140px;
  }
}

/* Client login page */
.dx-login-page {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(ellipse at top, #1a2744 0%, #0b1220 55%);
  overflow-x: hidden;
}

.dx-login-shell {
  width: min(440px, 100%);
}

.dx-login-card {
  padding: 32px 28px;
  border-radius: 20px;
  background: var(--dx-card, #151f31);
  border: 1px solid var(--dx-border, rgba(255, 255, 255, 0.08));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.dx-login-logo {
  text-align: center;
  margin-bottom: 12px;
}

.dx-login-logo__img {
  max-height: 56px;
  width: auto;
  max-width: 100%;
}

.dx-login-logo__text {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
}

.dx-login-brand {
  margin: 0;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dx-accent, #e11d48);
}

.dx-login-title {
  margin: 6px 0 8px;
  text-align: center;
  font-size: 26px;
  color: #ffffff;
}

.dx-login-sub {
  margin: 0 0 20px;
  text-align: center;
  color: var(--dx-muted, rgba(255, 255, 255, 0.62));
  font-size: 14px;
}

.dx-login-field {
  margin-bottom: 14px;
}

.dx-login-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.dx-login-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #2b3548;
  background: #111827;
  color: #fff;
  font-size: 15px;
}

.dx-login-field input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.dx-login-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 13px;
}

.dx-login-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--dx-muted, rgba(255, 255, 255, 0.62));
}

.dx-login-link {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 700;
}

.dx-login-link:hover {
  text-decoration: underline;
}

.dx-login-btn {
  width: 100%;
  padding: 13px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--dx-accent, #e11d48);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.dx-login-btn.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

.dx-login-alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.dx-login-alert--err {
  background: rgba(225, 29, 72, 0.12);
  border-color: rgba(225, 29, 72, 0.4);
}

.dx-login-back {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
}

.dx-login-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--dx-muted, rgba(255, 255, 255, 0.62));
}

.dx-login-footer p {
  margin: 0;
}

body.dx-app-login-body {
  overflow-x: hidden;
  color: rgba(255, 255, 255, 0.92);
}

body.dx-app-login-body .dx-login-title,
body.dx-app-login-body .dx-login-field label,
body.dx-app-login-body .dx-login-remember {
  color: #ffffff !important;
}

body.dx-app-login-body .dx-login-sub,
body.dx-app-login-body .dx-login-footer,
body.dx-app-login-body .dx-login-footer p {
  color: rgba(255, 255, 255, 0.72) !important;
}

@media (max-width: 900px) {
  .dx-app-sidebar {
    width: min(280px, 88vw);
    flex: 0 0 auto;
  }
  .dx-app-menu-btn {
    display: inline-flex;
  }

  .dx-app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.35);
  }

  .dx-app.is-open .dx-app-sidebar {
    transform: translateX(0);
  }

  .dx-dash-form .dx-fgrid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dx-dash-table-wrap {
    overflow: visible;
  }

  .dx-dash-table {
    min-width: 0;
    table-layout: auto;
  }

  .dx-dash-table thead {
    display: none;
  }

  .dx-dash-table tbody tr {
    display: block;
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 14px;
    background: var(--dx-card);
    border: 1px solid var(--dx-border);
  }

  .dx-dash-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .dx-dash-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: none;
  }

  .dx-dash-table tbody td::before {
    content: attr(data-label);
    flex: 0 0 38%;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dx-muted);
  }

  .dx-dash-table tbody td:last-child {
    padding-bottom: 0;
  }

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

  .dx-dash-actions a,
  .dx-dash-actions button {
    width: 100%;
    text-align: center;
  }

  .dx-hero .dx-dash-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 8px;
  }

  .dx-app .dx-dash-table select {
    width: 100%;
    max-width: 100%;
  }

  /* History updates form — vertical labeled fields (not list-table ::before) */
  .dx-dash-table--history thead {
    display: none;
  }

  .dx-dash-table--history tbody tr.dx-hist-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 14px;
    background: var(--dx-card);
    border: 1px solid var(--dx-border);
  }

  .dx-dash-table--history tbody tr.dx-hist-row:last-child {
    margin-bottom: 0;
  }

  .dx-dash-table--history tbody td {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
  }

  .dx-dash-table--history tbody td::before {
    content: none !important;
    display: none !important;
  }

  .dx-dash-table--history .dx-hist-field-label {
    display: block !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin: 0 0 6px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
  }

  .dx-dash-table--history tbody td input,
  .dx-dash-table--history tbody td select,
  .dx-dash-table--history tbody td textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .dx-dash-table--history tbody td.dx-hist-cell-remove {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 4px;
    border-top: 1px solid var(--dx-border);
    margin-top: 4px;
  }

  .dx-dash-table--history tbody td.dx-hist-cell-remove .dx-hist-field-label {
    margin-bottom: 0 !important;
  }
}

/* Desktop: hide mobile-only labels */
@media (min-width: 769px) {
  .dx-dash-table--history .dx-hist-field-label {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .dx-app-content {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-top: 14px;
    padding-bottom: 14px;
    padding-left: 5vw;
    padding-right: 5vw;
    box-sizing: border-box;
  }

  .dx-app-frame {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .dx-app-content {
    padding-left: 5vw;
    padding-right: 5vw;
    padding-top: 12px;
    padding-bottom: 12px;
    max-width: 100%;
  }

  .dx-app-topbar {
    padding: 0 14px;
    gap: 10px;
  }

  .dx-app-topbar__name {
    display: none;
  }

  .dx-app-menu-btn__label {
    display: none;
  }

  .dx-dash-stats {
    grid-template-columns: 1fr;
  }

  .dx-dash-btn {
    max-width: 100%;
  }

  .dx-panel,
  .dx-card {
    padding: 16px 14px;
  }
}
