/* DisputePilot v2 mobile / tablet layer. Desktop rules stay in v2-shell / v2-clean.
   Breakpoints: drawer through 900px (covers 768); phone stacking at 700px. */

html { -webkit-text-size-adjust: 100%; }

/* ---------- Shared: never let fixed shells squeeze the page ---------- */
@media (max-width: 900px) {
  html, body.dp-v2 { overflow-x: hidden; max-width: 100%; }
  body.dp-v2 { font-size: 14px; }

  body.dp-v2 .dp-frame,
  body.dp-v2 .dp-frame.rail {
    display: block !important;
    grid-template-columns: minmax(0, 1fr) !important;
    background: #F8F9FB !important;
    min-width: 0;
    width: 100%;
  }
  body.dp-v2 .dp-main,
  body.dp-v2 .dp-content,
  body.dp-v2 #view-rz {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  body.dp-v2 .dp-content,
  body.dp-v2 .dp-content.v2-content-pad {
    padding: 12px 14px 88px !important;
  }

  /* Off-canvas drawer */
  body.dp-v2 aside.dp-nav,
  body.dp-v2 .dp-nav.side,
  body.dp-v2 .dp-frame.rail aside.dp-nav,
  body.dp-v2 .dp-frame.rail .dp-nav.side {
    position: fixed !important;
    left: 0; top: 0; bottom: 0;
    width: min(320px, 86vw) !important;
    max-width: 86vw;
    height: 100vh !important;
    z-index: 80;
    transform: translateX(-105%);
    transition: transform .2s ease;
    overflow: auto !important;
    padding: 16px 12px 24px !important;
    box-shadow: none;
  }
  body.dp-v2.dp-nav-open aside.dp-nav,
  body.dp-v2.dp-nav-open .dp-nav.side {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(22, 53, 73, .28);
  }
  /* Keep labels visible inside the drawer even if .rail was left on */
  body.dp-v2.dp-is-mobile .dp-frame.rail .side .brand,
  body.dp-v2.dp-is-mobile .dp-frame.rail .nav .lbl,
  body.dp-v2.dp-is-mobile .dp-frame.rail .side h6,
  body.dp-v2.dp-is-mobile .dp-frame.rail .nav-group,
  body.dp-v2.dp-is-mobile .dp-frame.rail .nav-sub,
  body.dp-v2.dp-is-mobile .dp-frame.rail .nav .chev,
  body.dp-v2.dp-is-mobile .dp-frame.rail .nav-badge,
  body.dp-v2.dp-is-mobile .dp-frame.rail .dp-nav-ver {
    display: revert !important;
    font-size: revert !important;
  }
  body.dp-v2.dp-is-mobile .dp-frame.rail .nav a,
  body.dp-v2.dp-is-mobile .dp-frame.rail .nav button.nav-btn {
    font-size: 14px !important;
    justify-content: flex-start !important;
    padding: 12px 10px !important;
  }
  body.dp-v2.dp-is-mobile .nav .nav-btn,
  body.dp-v2.dp-is-mobile .nav a.nav-btn,
  body.dp-v2.dp-is-mobile .nav-sub-link {
    min-height: 44px;
  }
  body.dp-v2 .dp-nav-overlay {
    position: fixed; inset: 0;
    background: rgba(22, 53, 73, .5);
    z-index: 70;
    border: 0;
    padding: 0;
    margin: 0;
  }
  body.dp-v2 .dp-nav-overlay[hidden] { display: none !important; }
  body.dp-v2 #dp-nav-fold,
  body.dp-v2 button.railtg { display: none !important; }

  /* Compact top bar */
  body.dp-v2 .dp-top {
    min-height: 52px;
    height: auto !important;
    padding: 6px 10px;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 40;
    background: #fff;
    overflow: visible !important;
  }
  body.dp-v2 .dp-mobile-toggle {
    width: 44px; height: 44px; flex: none;
    display: grid; place-items: center;
    border: 0; background: transparent; color: #163549;
    border-radius: 8px; cursor: pointer; padding: 0;
    order: 1;
  }
  body.dp-v2 .dp-crumbs { display: none; }
  body.dp-v2 .dp-top-left {
    order: 2; flex: 1 1 0; min-width: 0; max-width: 100%;
    padding: 0 4px;
  }
  body.dp-v2 .dp-top-right { order: 3; margin-left: 0; }
  body.dp-v2 #dp-mobile-tools { order: 4; flex-basis: 100%; }
  body.dp-v2 .dp-h1, body.dp-v2 #dp-page-title {
    font-size: 16px !important;
    line-height: 20px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.dp-v2 .dp-top-right {
    display: flex; align-items: center; gap: 4px;
    flex: 0 0 auto; flex-wrap: nowrap;
  }
  body.dp-v2 .dp-top-right > *,
  body.dp-v2 .dp-top-right #dp-banner,
  body.dp-v2 .dp-top-right #dp-signin {
    flex: none;
  }
  body.dp-v2 .dp-search,
  body.dp-v2 #dp-merchant,
  body.dp-v2 .dp-switcher {
    display: none;
  }
  body.dp-v2.dp-tools-open .dp-mobile-tools {
    display: flex;
    flex: 1 1 100%;
    width: 100%;
    gap: 8px;
    align-items: center;
    padding: 0 0 6px;
  }
  body.dp-v2 .dp-mobile-tools { display: none; }
  body.dp-v2.dp-tools-open .dp-mobile-tools .dp-search,
  body.dp-v2.dp-tools-open .dp-mobile-tools #dp-merchant,
  body.dp-v2.dp-tools-open .dp-mobile-tools .dp-switcher {
    display: block;
  }
  body.dp-v2.dp-tools-open .dp-mobile-tools .dp-search { flex: 1 1 auto; width: auto; min-width: 0; }
  body.dp-v2.dp-tools-open .dp-mobile-tools #dp-search,
  body.dp-v2.dp-tools-open .dp-mobile-tools .dp-search input {
    width: 100% !important;
    min-width: 0;
    height: 44px;
    font-size: 16px !important;
  }
  body.dp-v2.dp-tools-open .dp-mobile-tools #dp-merchant,
  body.dp-v2.dp-tools-open .dp-mobile-tools .dp-switcher {
    flex: 1 1 40%;
    min-width: 0;
    max-width: 100%;
    height: 44px;
    font-size: 16px !important;
  }
  body.dp-v2 .dp-search-results {
    left: 10px; right: 10px; width: auto; top: auto;
  }
  body.dp-v2 .dp-mobile-icon {
    width: 44px; height: 44px; flex: none;
    display: grid; place-items: center;
    border: 1px solid #E6E6E6; border-radius: 999px;
    background: #fff; color: #163549; cursor: pointer; padding: 0;
  }
  body.dp-v2 .dp-demo-chip {
    display: none !important;
  }
  body.dp-v2 #dp-banner .dp-user { display: none; }
  /* Keep help, bell, and sign-in out of the compact top bar */
  body.dp-v2 .dp-top #dp-help-btn,
  body.dp-v2 .dp-top .v2-bell-wrap,
  body.dp-v2 .dp-top #dp-banner,
  body.dp-v2 .dp-top #dp-signin,
  body.dp-v2 .dp-top #dp-signout {
    display: none !important;
  }
  body.dp-v2 #dp-signin[hidden],
  body.dp-v2 #dp-signout[hidden] { display: none !important; }
  body.dp-v2 .dp-avatar {
    width: 44px !important; height: 44px !important;
    flex: none; cursor: pointer;
    display: grid; place-items: center;
  }
  body.dp-v2 .dp-avatar-menu {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 10px 10px calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 32px rgba(22, 53, 73, .18);
    max-height: 80vh; overflow: auto;
  }
  body.dp-v2 .dp-avatar-menu[hidden] { display: none !important; }
  body.dp-v2.dp-avatar-open .dp-nav-overlay { z-index: 90; }
  body.dp-v2 .dp-am-row {
    display: flex; align-items: center; gap: 10px;
    width: 100%; min-height: 48px;
    padding: 0 12px; margin: 0;
    border: 0; border-bottom: 1px solid #E6E6E6;
    background: transparent; color: #163549;
    font: inherit; font-size: 16px; font-weight: 500;
    text-align: left; cursor: pointer; box-sizing: border-box;
  }
  body.dp-v2 .dp-am-row:last-child { border-bottom: 0; }
  body.dp-v2 .dp-avatar-menu .dp-help-btn,
  body.dp-v2 .dp-avatar-menu .v2-bell,
  body.dp-v2 .dp-avatar-menu #dp-signin,
  body.dp-v2 .dp-avatar-menu #dp-signout {
    width: 36px !important; height: 36px !important; min-width: 36px !important;
    min-height: 36px !important; flex: none; padding: 0 !important;
    border-radius: 999px !important;
    display: grid !important; place-items: center;
    background: #fff !important; color: #163549 !important;
    border: 1px solid #E6E6E6 !important; font-size: 0 !important;
  }
  body.dp-v2 .dp-avatar-menu #dp-signin[hidden],
  body.dp-v2 .dp-avatar-menu #dp-signout[hidden] { display: none !important; }
  body.dp-v2 .dp-avatar-menu #dp-banner { display: contents; }
  body.dp-v2 .v2-bell-panel {
    right: 0; width: min(280px, calc(100vw - 20px));
  }
  body.dp-v2 .dp-help-panel {
    left: 10px; right: 10px; width: auto; top: auto; bottom: 0;
    max-height: 80vh; border-radius: 16px 16px 0 0;
  }

  /* Inputs / tap targets / setting rows */
  body.dp-v2 input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  body.dp-v2 select,
  body.dp-v2 textarea {
    font-size: 16px !important;
    min-height: 44px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  body.dp-v2 input[type="checkbox"],
  body.dp-v2 input[type="radio"] {
    width: 22px; height: 22px; min-height: 22px; flex: none;
  }
  body.dp-v2 button:not(.tgl):not([role="switch"]),
  body.dp-v2 .btn,
  body.dp-v2 a.btn,
  body.dp-v2 a.btn-outline,
  body.dp-v2 a.btn-primary,
  body.dp-v2 .v2-step-btn,
  body.dp-v2 .btn-outline,
  body.dp-v2 .btn-primary {
    min-height: 44px;
    box-sizing: border-box;
  }

  body.dp-v2 .omp-pa-field,
  body.dp-v2 .omp-resolve-ops__field,
  body.dp-v2 label.field,
  body.dp-v2 .v2-mp .field {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
  }
  body.dp-v2 .v2-set-card {
    grid-template-columns: 1fr !important;
  }
  body.dp-v2 .v2-set-card .v2-set-save,
  body.dp-v2 .v2-set-card .btn,
  body.dp-v2 .v2-set-card button {
    justify-self: start;
  }
  /* Toggle rows: label + description left, normal-size toggle right, same row */
  body.dp-v2 .toggle-wrap,
  body.dp-v2 .omp-pa-action__row,
  body.dp-v2 .v2-rs .action-card-row,
  body.dp-v2 .omp-resolve-ops__switch-row,
  body.dp-v2 .omp-pa-action,
  body.dp-v2 .omp-resolve-ops__srow:has(.tgl, [role="switch"]),
  body.dp-v2 .srow:has(.tgl, [role="switch"]) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
  }
  body.dp-v2 .omp-resolve-ops__srow-text {
    flex: 1 1 auto !important;
    min-width: 0;
  }
  body.dp-v2 button.tgl,
  body.dp-v2 .tgl,
  body.dp-v2 [role="switch"].tgl {
    width: 44px !important;
    height: 24px !important;
    min-width: 44px !important;
    min-height: 24px !important;
    max-width: 44px;
    margin-left: auto;
    flex: none;
    padding: 0 !important;
    border: 0;
    border-radius: 100px !important;
    box-sizing: border-box;
  }
  body.dp-v2 .tgl::after {
    width: 18px; height: 18px; top: 3px; left: 3px;
  }
  body.dp-v2 .tgl[aria-checked="true"]::after { left: 23px; }

  /* Setup cards / stepper */
  body.dp-v2 .v2-steps { grid-template-columns: 1fr !important; gap: 12px; }
  body.dp-v2 .v2-stepper {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  body.dp-v2 .v2-stepper-nav {
    flex-direction: row !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    padding: 0 0 8px;
    scrollbar-width: thin;
  }
  body.dp-v2 .v2-stepper-item {
    flex: none;
    white-space: nowrap;
    min-height: 44px;
    padding: 0 8px;
  }
  body.dp-v2 .dp-step-meta {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin: 0 0 10px;
  }
  body.dp-v2 .dp-step-meta .dp-step-label {
    font-size: 13px; font-weight: 500; color: #4E6574;
  }
  body.dp-v2 .dp-step-meta button,
  body.dp-v2 .dp-step-meta .btn-outline,
  body.dp-v2 .dp-step-meta .btn-primary {
    min-width: 64px;
    width: auto;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    line-height: 36px;
    border-radius: 6px;
  }

  /* Tabs scroll horizontally */
  body.dp-v2 .nav-tabs,
  body.dp-v2 .v2-tabs,
  body.dp-v2 .v2-chips,
  body.dp-v2 .v2-report-picker,
  body.dp-v2 .v2-mp .mp-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    max-width: 100%;
  }
  body.dp-v2 .nav-link,
  body.dp-v2 .v2-tab,
  body.dp-v2 .v2-mp .mp-tabs .tab {
    flex: none;
    white-space: nowrap;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* KPI / product cards: 2-up */
  body.dp-v2 .omp-resolve-ops__kpis,
  body.dp-v2 .v2-prod-grid,
  body.dp-v2 .v2-prevent-kpis {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  body.dp-v2 .omp-resolve-ops__kpi-btn,
  body.dp-v2 .kpi,
  body.dp-v2 .v2-prod { min-width: 0; width: auto !important; max-width: 100%; }

  /* Settings / inbox / detail / receipts */
  body.dp-v2 .v2-settings-shell,
  body.dp-v2 .v2-detail,
  body.dp-v2 .v2-inbox {
    grid-template-columns: 1fr !important;
  }
  body.dp-v2 .v2-settings-list {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 4px;
    padding: 6px;
  }
  body.dp-v2 .v2-settings-list a,
  body.dp-v2 .v2-settings-list button {
    flex: none;
    white-space: nowrap;
    min-height: 44px;
  }
  body.dp-v2 .v2-facts { position: static; }

  body.dp-v2 .v2-rs .settings-body { flex-direction: column; }
  body.dp-v2 .v2-rs .settings-preview,
  body.dp-v2 .v2-rs .preview-phone,
  body.dp-v2 .v2-rs .phone-frame-img {
    width: min(375px, 100%) !important;
    max-width: 100%;
  }
  body.dp-v2 .v2-rs .preview-phone {
    height: auto !important;
    aspect-ratio: 375 / 744;
  }
  body.dp-v2 .v2-rs .phone-frame-img { height: 100% !important; }
  body.dp-v2 .v2-rs .phone-screen {
    left: 3.73%; top: 7.66%; width: 92.53%; height: 88.17%;
  }
  body.dp-v2 .v2-rs .settings-banner,
  body.dp-v2 .v2-rs .settings-banner-actions { flex-wrap: wrap; }
  body.dp-v2 .v2-rs .omp-pa-action__cfg,
  body.dp-v2 .v2-rs .configure-link { margin-left: 0; }

  body.dp-v2 .v2-mp .grid-5,
  body.dp-v2 .v2-mp .grid-4,
  body.dp-v2 .v2-mp .grid-resolve {
    grid-template-columns: 1fr !important;
  }
  body.dp-v2 .v2-mp .mp-head {
    gap: 8px; flex-wrap: nowrap; align-items: center;
    padding-bottom: 8px;
  }
  body.dp-v2 .v2-mp .mp-back {
    flex: none; width: 36px; height: 36px; min-height: 36px;
    display: grid; place-items: center;
  }
  body.dp-v2 .v2-mp .mp-kicker { display: none; }
  body.dp-v2 .v2-mp .mp-title-block {
    display: flex; flex-direction: row; flex-wrap: nowrap;
    align-items: center; gap: 8px;
    flex: 1 1 auto; min-width: 0;
  }
  body.dp-v2 .v2-mp .mp-title-block h2 {
    font-size: 16px; line-height: 20px; margin: 0;
    flex: 0 1 auto; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  body.dp-v2 .v2-mp .mp-title-block .status-pill { flex: none; }
  body.dp-v2 .v2-mp .mp-actions { margin-left: 0; flex: none; }

  /* Toolbar */
  body.dp-v2 .v2-toolbar { flex-wrap: wrap; }
  body.dp-v2 .v2-toolbar .v2-toolbar-search { width: 100%; }
  body.dp-v2 .v2-toolbar-right { margin-left: 0; width: 100%; flex-wrap: wrap; }

  /* Tables: phone cards or in-card scroll */
  body.dp-v2 .v2-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    margin: 0 0 12px;
  }
  body.dp-v2 .v2-table-cards { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
  body.dp-v2 .v2-table-card {
    background: #fff; border: 1px solid #E6E6E6; border-radius: 12px;
    padding: 12px 14px; text-align: left; width: 100%;
    box-sizing: border-box; font: inherit; color: inherit; cursor: pointer;
  }
  body.dp-v2 .v2-table-card .v2-tc-primary {
    font-weight: 700; font-size: 14px; color: #163549; margin: 0 0 6px;
  }
  body.dp-v2 .v2-table-card .v2-tc-row {
    display: flex; justify-content: space-between; gap: 10px;
    font-size: 13px; line-height: 18px; margin: 2px 0;
  }
  body.dp-v2 .v2-table-card .v2-tc-row dt { color: #86969C; font-weight: 500; flex: none; }
  body.dp-v2 .v2-table-card .v2-tc-row dd { margin: 0; color: #163549; text-align: right; min-width: 0; overflow-wrap: anywhere; }
  body.dp-v2 .v2-table-card .v2-tc-more {
    margin-top: 8px; min-height: 44px; width: 100%;
    border: 0; background: #F8F9FB; border-radius: 8px;
    color: #4E6574; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  }
  body.dp-v2 .v2-table-card .v2-tc-extra[hidden] { display: none !important; }

  /* Inbox: list only; thread is a full-screen sheet */
  body.dp-v2 .v2-inbox { min-height: 0; gap: 0; }
  body.dp-v2 .v2-inbox-thread { display: none; }
  body.dp-v2.dp-inbox-open .v2-inbox-list { display: none; }
  body.dp-v2.dp-inbox-open .v2-inbox-thread {
    display: flex;
    position: fixed;
    left: 0; right: 0; top: 52px; bottom: 0;
    z-index: 40;
    border-radius: 0; max-height: none;
    overflow: auto;
  }
  body.dp-v2 .v2-inbox-back {
    display: none;
    min-height: 44px; align-items: center; gap: 6px;
    margin: 0 0 8px; padding: 0 18px;
    border: 0; background: transparent;
    color: #163549; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  }
  body.dp-v2 .v2-inbox-back::before { content: "←"; }
  body.dp-v2.dp-inbox-open .v2-inbox-back { display: inline-flex; }
  body.dp-v2 .v2-inbox-item { min-height: 56px; padding: 12px 14px; }

  /* Sticky action bar */
  body.dp-v2 .dp-sticky-actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    display: flex; gap: 8px; flex-wrap: wrap;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #E6E6E6;
    box-shadow: 0 -6px 20px rgba(22, 53, 73, .08);
  }
  body.dp-v2 .dp-sticky-actions[hidden] { display: none !important; }
  body.dp-v2 .dp-sticky-actions button,
  body.dp-v2 .dp-sticky-actions a,
  body.dp-v2 .dp-sticky-actions .btn {
    flex: 1 1 auto;
    min-height: 44px;
  }

  /* Modals / popovers as bottom sheets */
  body.dp-v2 #dp-modal,
  body.dp-v2 .dp-modal {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    background: rgba(22, 53, 73, .5) !important;
    z-index: 90;
    padding: 0 !important;
  }
  body.dp-v2 #dp-modal[hidden],
  body.dp-v2 .dp-modal[hidden] { display: none !important; }
  body.dp-v2 #dp-modal .dp-card,
  body.dp-v2 .dp-modal .dp-card,
  body.dp-v2 #dp-login {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh;
    overflow: auto;
    border-radius: 16px 16px 0 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  }
  body.dp-v2 .v2-pop-panel,
  body.dp-v2 .v2-bell-panel {
    position: fixed !important;
    left: 0; right: 0; bottom: 0; top: auto !important;
    width: 100% !important;
    max-height: 80vh;
    overflow: auto;
    border-radius: 16px 16px 0 0;
    box-sizing: border-box;
  }

  /* Catch-alls against overflow */
  body.dp-v2 .card,
  body.dp-v2 .omp-resolve-ops__card,
  body.dp-v2 table,
  body.dp-v2 pre,
  body.dp-v2 code,
  body.dp-v2 img,
  body.dp-v2 svg,
  body.dp-v2 iframe,
  body.dp-v2 video {
    max-width: 100%;
  }
  body.dp-v2 table { width: 100%; }

  /* Merchant Profile + lookup forms: never 2/5-col on a phone */
  body.dp-v2 .v2-mp .grid,
  body.dp-v2 .v2-mp .grid-5,
  body.dp-v2 .v2-mp .grid-4,
  body.dp-v2 .v2-mp .grid-resolve,
  body.dp-v2 .v2-mp [class*="__grid"],
  body.dp-v2 .omp-pa-lookup__grid,
  body.dp-v2 .omp-pa-setup .grid {
    grid-template-columns: 1fr !important;
  }

  /* Chip / filter strips: full-width horizontal scroll, never a 40px column */
  body.dp-v2 .dp-list-tools,
  body.dp-v2 .v2-toolbar,
  body.dp-v2 .dp-list-head,
  body.dp-v2 .dp-list-tools.v2-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px;
    max-width: 100% !important;
    width: 100%;
    min-width: 0;
  }
  body.dp-v2 .dp-list-search,
  body.dp-v2 .v2-toolbar-search {
    flex: 1 1 160px;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0;
  }
  body.dp-v2 .v2-toolbar-right,
  body.dp-v2 .dp-list-tools > button,
  body.dp-v2 .dp-list-tools .v2-more,
  body.dp-v2 .dp-list-tools .v2-cols-btn,
  body.dp-v2 .dp-list-tools [aria-label="Columns"],
  body.dp-v2 .dp-list-tools [aria-label="More"] {
    flex: 0 0 auto;
  }
  body.dp-v2 .kpi,
  body.dp-v2 .v2-prod,
  body.dp-v2 .omp-resolve-ops__kpi-btn { overflow: visible; }
  body.dp-v2 .kpi .row {
    display: flex; flex-wrap: wrap; align-items: baseline;
    gap: 2px 8px; min-width: 0; max-width: 100%;
  }
  body.dp-v2 .kpi .v { min-width: 0; overflow-wrap: anywhere; }
  body.dp-v2 .kpi .pill,
  body.dp-v2 .kpi .row .pill {
    flex: none; white-space: nowrap; max-width: 100%;
  }
  body.dp-v2 .v2-detail,
  body.dp-v2 .v2-detail-main,
  body.dp-v2 .v2-table-cards,
  body.dp-v2 .v2-table-card {
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100%;
    box-sizing: border-box;
  }
  body.dp-v2 .dp-chips,
  body.dp-v2 .v2-toolbar .dp-chips,
  body.dp-v2 .dp-list-tools .dp-chips {
    display: flex !important;
    flex-wrap: nowrap !important;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
  }
  body.dp-v2 .dp-chip {
    flex: none;
    white-space: nowrap;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Inbox facts wrap */
  body.dp-v2 .v2-inbox-facts,
  body.dp-v2 .v2-inbox-head {
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  /* Parked / folded originals must not expand scrollWidth */
  body.dp-v2 .v2-fold-body,
  body.dp-v2 .v2-parked,
  body.dp-v2 .v2-dup-title,
  body.dp-v2 .v2-table-cards > table {
    display: none !important;
  }

  /* Long strings may not force a page scroll */
  body.dp-v2 p, body.dp-v2 li, body.dp-v2 td, body.dp-v2 th,
  body.dp-v2 b, body.dp-v2 strong, body.dp-v2 h1, body.dp-v2 h2,
  body.dp-v2 h3, body.dp-v2 h4, body.dp-v2 dd, body.dp-v2 dt,
  body.dp-v2 label, body.dp-v2 .card, body.dp-v2 .v2-detail-main {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
  }

  /* Sticky actions: two per row */
  body.dp-v2 .dp-sticky-actions button,
  body.dp-v2 .dp-sticky-actions a,
  body.dp-v2 .dp-sticky-actions .btn {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  /* Stepper nav is a horizontal strip */
  body.dp-v2 .v2-stepper-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 430px) {
  body.dp-v2 .omp-resolve-ops__kpis,
  body.dp-v2 .v2-prod-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  body.dp-v2 .v2-prod .v2-prod-n,
  body.dp-v2 .kpi .v,
  body.dp-v2 .omp-resolve-ops__kpi .v { font-size: 22px; }
}

/* Very narrow: 1-up KPIs if two columns would clip typography */
@media (max-width: 340px) {
  body.dp-v2 .omp-resolve-ops__kpis,
  body.dp-v2 .v2-prod-grid { grid-template-columns: 1fr !important; }
}

/* Desktop: hide mobile-only chrome */
@media (min-width: 901px) {
  body.dp-v2 .dp-mobile-toggle,
  body.dp-v2 .dp-mobile-icon,
  body.dp-v2 .dp-mobile-tools,
  body.dp-v2 .dp-nav-overlay,
  body.dp-v2 .dp-avatar-menu,
  body.dp-v2 .v2-inbox-back,
  body.dp-v2 .dp-sticky-actions,
  body.dp-v2 .dp-step-meta,
  body.dp-v2 .v2-table-cards { display: none !important; }
}
