@media (max-width: 767px), (max-width: 1023px) and (pointer: coarse) {
  .dashboard-theme > main > header { height: auto; min-height: 64px; padding-block: 8px; }
  .dashboard-theme > main > header { padding-top: max(8px, env(safe-area-inset-top)); }
  .dashboard-theme main > div:last-child { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .dashboard-theme > main > header > [role="separator"],
  .dashboard-theme > main > header > .flex-1 { display: none; }
  .dashboard-theme > main > header > div:last-child { flex: 1; min-width: 0; gap: 8px; }
  .dashboard-theme > main > header > div:last-child > div:has(select) { flex: 1; min-width: 0; }
  .dashboard-theme > main > header > div:last-child > div > span,
  .dashboard-theme > main > header > div:last-child > .rounded-full { display: none; }
  .dashboard-theme > main > header select { width: 100%; max-width: 100%; min-width: 0; }
  .dashboard-theme main { min-width: 0; }
  .dashboard-theme main > div, .dashboard-theme main .mx-auto { min-width: 0; width: 100%; }
  .dashboard-theme main .grid > :not(button) { min-width: 0; }
  .dashboard-theme main .flex.items-center.gap-2,
  .dashboard-theme main .flex.items-center.gap-4 { flex-wrap: wrap; }
  .dashboard-theme main .flex.items-center.justify-between { flex-wrap: wrap; gap: 12px; }
  .dashboard-theme main .flex.items-center.justify-between > :not(button) { min-width: 0; max-width: 100%; }
  .dashboard-theme main .inline-flex:not([role="tab"]) { max-width: 100%; white-space: normal; }
  .dashboard-theme label:has(input[type="checkbox"]),
  .dashboard-theme label:has(input[type="radio"]) { min-height: 44px; display: flex; align-items: center; gap: 8px; }
  .fixed[role="dialog"] button:not([role="switch"]):not([role="checkbox"]) { min-height: 44px; touch-action: manipulation; }
  .fixed[role="dialog"] button:has(> svg) { min-width: 44px; }
  .dashboard-theme [data-mobile-paged] { scroll-margin-top: 80px; }
  .dashboard-theme main h1 { font-size: 26px; line-height: 1.2; overflow-wrap: anywhere; }
  .dashboard-theme main h2, .dashboard-theme main p { overflow-wrap: anywhere; }
  .dashboard-theme main .p-6 { padding: 16px; }
  .dashboard-theme main .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  }
  .dashboard-theme button:not([role="switch"]):not([role="checkbox"]),
  .dashboard-theme a.inline-flex { min-height: 44px; touch-action: manipulation; white-space: normal; }
  .dashboard-theme button:has(> svg) { min-width: 44px; }
  .dashboard-theme input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  .dashboard-theme select, .dashboard-theme textarea,
  [role="dialog"] input:not([type="checkbox"]):not([type="radio"]),
  [role="dialog"] select, [role="dialog"] textarea { font-size: 16px; min-height: 44px; max-width: 100%; }
  .dashboard-theme [role="tablist"] { display: flex; justify-content: flex-start !important; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; height: auto; padding: 4px; gap: 4px; }
  .dashboard-theme [role="tab"] { flex: 0 0 auto; min-height: 44px; padding: 10px 14px; white-space: nowrap !important; }
  .fixed[role="dialog"]:not(.proimob-mobile-menu), .fixed[role="alertdialog"] {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .dashboard-theme table[data-mobile-table] { display: block; width: 100% !important; min-width: 0 !important; }
  .dashboard-theme table[data-mobile-table] thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .dashboard-theme table[data-mobile-table] tbody { display: block; }
  .dashboard-theme table[data-mobile-table] tbody > tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
    margin: 0 0 12px; padding: 14px; border: 1px solid hsl(var(--border)); border-radius: 12px;
  }
  .dashboard-theme table[data-mobile-table] tbody > tr[hidden] { display: none !important; }
  .dashboard-theme [data-mobile-paged] > [hidden] { display: none !important; }
  .dashboard-theme [data-mobile-workflow] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dashboard-theme [data-mobile-workflow] > div { padding: 12px; font-size: 12px; }
  .dashboard-theme table[data-mobile-table] td { display: block; width: auto !important; min-width: 0 !important; padding: 0; white-space: normal; overflow-wrap: anywhere; }
  .dashboard-theme table[data-mobile-table] td:first-child,
  .dashboard-theme table[data-mobile-table] td:last-child { grid-column: 1 / -1; }
  .dashboard-theme table[data-mobile-table] td::before {
    content: attr(data-mobile-label); display: block; margin-bottom: 4px; font-size: 11px;
    color: hsl(var(--muted-foreground)); font-weight: 600;
  }
  .dashboard-theme table[data-mobile-table] td > .flex { flex-wrap: wrap; min-width: 0; }
  .dashboard-theme table[data-mobile-table] td select { width: 100%; min-width: 0; }
  .proimob-mobile-pagination:not([hidden]) { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin: 12px 0 20px; }
  .proimob-mobile-pagination button { min-height: 44px; padding: 8px 12px; border: 1px solid hsl(var(--border)); border-radius: 10px; }
  .proimob-mobile-pagination button:disabled { opacity: .4; }
  .proimob-mobile-pagination span { font-size: 12px; }
  .proimob-mobile-section-toggle:not([hidden]) { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; margin-top: 8px; padding: 8px 12px; border: 1px solid hsl(var(--border)); border-radius: 10px; font-size: 14px; text-align: left; }
  .dashboard-theme [data-mobile-section-content][hidden] { display: none !important; }
  #proimob-auth-launcher[data-mobile-inline] {
    position: static !important; z-index: auto !important; display: flex; flex-wrap: wrap; gap: 8px;
    margin: 0; padding: 0; width: 100%; max-width: 100%;
    box-shadow: none !important;
  }
  #proimob-auth-launcher[data-mobile-inline] > button { flex: 1 1 140px; }
  #proimob-mobile-account-actions:not([hidden]) { display: flex; flex-direction: column; gap: 8px; margin: 12px 16px; padding: 0; width: calc(100% - 32px) !important; max-width: calc(100% - 32px); }
  #proimob-alert-badge[data-mobile-inline] { position: static !important; z-index: auto !important; width: 100%; max-width: 100%; min-height: 44px; white-space: normal; box-shadow: none !important; }
  #proimob-mobile-account-actions > #proimob-install { position: static !important; z-index: auto !important; width: 100%; max-width: 100%; }
  dialog button, [role="dialog"] button:not([role="switch"]):not([role="checkbox"]) { min-height: 44px; }
  .proimob-mobile-menu {
    display: flex !important;
    flex-direction: column;
    width: min(360px, calc(100vw - 24px)) !important;
    height: 100dvh !important;
    max-height: 100dvh;
    padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
    overflow: hidden;
    border-radius: 0 20px 20px 0;
  }
  .proimob-mobile-menu > div {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    text-align: left;
  }
  .proimob-mobile-menu h2 { flex-shrink: 0; padding: 4px 36px 16px 4px; }
  .proimob-mobile-menu [data-sidebar="content"] {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .proimob-mobile-menu [data-sidebar="menu"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 4px 12px;
  }
  .proimob-mobile-menu [data-sidebar="menu"] > div { grid-column: 1 / -1; padding: 12px 0 0; }
  .proimob-mobile-menu [data-sidebar="menu-button"] {
    height: auto;
    min-height: 52px;
    padding: 12px 10px;
    white-space: normal;
    font-size: 13px;
    line-height: 1.25;
    border: 1px solid hsl(var(--sidebar-border));
    border-radius: 12px;
  }
  .proimob-mobile-menu [data-sidebar="menu-button"] > span { overflow: visible; }
  .dashboard-theme > main { width: 100%; min-width: 0; }
  .dashboard-theme > main > header { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .dashboard-theme [data-sidebar="trigger"] { width: 44px; height: 44px; flex-shrink: 0; }
  .proimob-mobile-menu > button { width: 44px; height: 44px; top: 12px; right: 8px; opacity: 1; }
  .proimob-mobile-footer { flex-shrink: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 12px; border-top: 1px solid hsl(var(--sidebar-border)); }
  .proimob-mobile-footer a, .proimob-mobile-footer button { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px; border: 1px solid hsl(var(--sidebar-border)); border-radius: 10px; font-size: 14px; }
}
