/* UI_HM2_HANDLER_MOBILE_NATIVE_SHELL_START */
.handler-mobile-v2-shell {
  --hm2-safe-area-contract: 1;
  --hm2-keyboard-offset: 0px;
  --hm2-blue: #2457d6;
  --hm2-blue-deep: #163a9a;
  --hm2-surface: #ffffff;
  --hm2-canvas: #eef3fa;
  --hm2-ink: #13213c;
  --hm2-muted: #66728a;
  --hm2-line: #dce4f0;
  --hm2-positive: #087b58;
  --hm2-negative: #bd3346;
  --hm2-warning: #9a6300;
  width: 100%;
  min-width: 0;
  min-height: 100svh;
  min-height: 100dvh;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    calc(env(safe-area-inset-bottom) + var(--hm2-keyboard-offset))
    env(safe-area-inset-left);
  overflow-x: clip;
  background: var(--hm2-canvas);
  color: var(--hm2-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  touch-action: manipulation;
}

.handler-mobile-v2-shell [hidden],
#handler-mobile-v2-return[hidden] {
  display: none !important;
}

body.hm2-mobile-v2-active {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background: var(--hm2-canvas, #eef3fa);
}

body.hm2-mobile-v2-active .dashboard-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.hm2-mobile-v2-active .dashboard-header,
body.hm2-mobile-v2-active .role-tabs,
body.hm2-mobile-v2-active .output-panel,
body.hm2-mobile-v2-active #admin-view,
body.hm2-mobile-v2-active #user-view,
body.hm2-mobile-v2-active #qa-view {
  display: none !important;
}

body.hm2-mobile-v2-active #handler-view.role-view.active {
  display: block;
  min-width: 0;
  min-height: 100dvh;
}

#handler-view[data-hm2-mode="mobile"] > :not(.handler-mobile-v2-shell) {
  display: none !important;
}

#handler-view[data-hm2-mode="legacy"] > .handler-mobile-v2-shell {
  display: none !important;
}

#handler-view[data-hm2-mode="legacy"] > #handler-mobile-v2-return {
  display: inline-flex !important;
}

.hm2-app-frame {
  width: 100%;
  max-width: 560px;
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--hm2-surface);
  box-shadow: 0 0 0 1px rgba(31, 56, 104, 0.06), 0 22px 70px rgba(31, 56, 104, 0.14);
  overflow: hidden;
}

.hm2-native-app-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 76px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(145deg, var(--hm2-blue-deep), var(--hm2-blue));
  color: #fff;
  box-shadow: 0 8px 24px rgba(25, 64, 158, 0.22);
}

.handler-mobile-v2-shell[data-hm2-screen="managed-users"] .hm2-native-app-bar {
  grid-template-columns: minmax(0, 1fr) auto;
}

.handler-mobile-v2-shell[data-hm2-screen="user-detail"] .hm2-native-app-bar {
  grid-template-columns: 48px minmax(0, 1fr) auto;
}

#hm2-screen-stack:focus {
  outline: none;
}

.hm2-title-block {
  min-width: 0;
}

.hm2-context-label {
  display: block;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hm2-native-title {
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 22px;
  font-weight: 780;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm2-touch-target {
  min-width: 44px;
  min-height: 44px;
}

.hm2-icon-button,
.hm2-text-button,
.hm2-secondary-button,
.handler-mobile-v2-return {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hm2-icon-button {
  padding: 0;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-size: 25px;
}

.hm2-text-button {
  min-width: 92px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-size: 12px;
}

.hm2-icon-button:hover:not(:disabled),
.hm2-text-button:hover:not(:disabled) {
  transform: none;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.2);
}

.hm2-icon-button:focus-visible,
.hm2-text-button:focus-visible,
.hm2-user-card:focus-visible,
.hm2-search-field input:focus-visible,
.handler-mobile-v2-return:focus-visible {
  outline: 3px solid rgba(255, 210, 30, 0.95);
  outline-offset: 2px;
}

.hm2-read-only-banner {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-bottom: 1px solid #dbe6f6;
  background: #eaf2ff;
  color: #315079;
  font-size: 12px;
}

.hm2-read-only-banner strong {
  color: #163a76;
}

.hm2-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4d78de;
  box-shadow: 0 0 0 4px rgba(77, 120, 222, 0.13);
}

.hm2-screen-stack {
  min-width: 0;
  padding: 16px;
  outline: none;
}

.hm2-screen {
  min-width: 0;
  animation: hm2-screen-enter 180ms ease-out both;
}

.hm2-list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  margin-bottom: 14px;
}

.hm2-search-field {
  position: relative;
  display: block;
  min-width: 0;
}

.hm2-search-field input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--hm2-line);
  border-radius: 16px;
  background: #f8faff;
  color: var(--hm2-ink);
  font-size: 15px;
  box-shadow: none;
}

.hm2-search-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  z-index: 1;
  color: #6f7d96;
  font-size: 20px;
  transform: translateY(-50%);
  pointer-events: none;
}

#hm2-refresh {
  border: 1px solid var(--hm2-line);
  background: #f8faff;
  color: var(--hm2-blue);
}

#hm2-refresh:hover:not(:disabled) {
  background: #eef4ff;
}

.hm2-state-region {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.hm2-state-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--hm2-line);
  border-radius: 18px;
  background: #f8faff;
}

.hm2-state-card > span,
.hm2-list-summary,
.hm2-power-hero > span,
.hm2-power-grid article > span,
.hm2-eligibility > span {
  color: var(--hm2-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.hm2-state-card strong {
  color: var(--hm2-ink);
  font-size: 17px;
}

.hm2-state-card p,
.hm2-eligibility p,
.hm2-contract-note p,
.hm2-user-identity p {
  margin: 0;
  color: var(--hm2-muted);
  font-size: 13px;
  line-height: 1.5;
}

.hm2-state-error {
  border-color: #f1ccd2;
  background: #fff5f6;
}

.hm2-state-warning {
  border-color: #ead7a8;
  background: #fff9e9;
}

.hm2-state-empty {
  border-style: dashed;
  background: #fbfcff;
}

.hm2-secondary-button {
  justify-self: start;
  min-width: 132px;
  margin-top: 4px;
  padding: 0 14px;
  border: 1px solid var(--hm2-line);
  background: #eef2f8;
  color: #738098;
}

.hm2-list-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
  text-transform: none;
  letter-spacing: 0;
}

.hm2-user-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.hm2-user-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--hm2-line);
  border-radius: 20px;
  background: #fff;
  color: var(--hm2-ink);
  text-align: left;
  box-shadow: 0 8px 24px rgba(34, 68, 126, 0.07);
}

.hm2-user-card:hover:not(:disabled) {
  transform: none;
  border-color: #aac1ec;
  background: #fbfdff;
}

.hm2-user-card[hidden] {
  display: none;
}

.hm2-user-avatar {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 17px;
  background: linear-gradient(145deg, #dfe9ff, #c9d9ff);
  color: #244fae;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.hm2-user-avatar-large {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  font-size: 16px;
}

.hm2-user-card-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hm2-user-card-main > strong {
  overflow: hidden;
  color: var(--hm2-ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm2-user-card-main > small,
.hm2-user-card-subvalues {
  overflow: hidden;
  color: var(--hm2-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm2-user-card-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 5px;
}

.hm2-user-card-values > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.hm2-user-card-values small {
  color: var(--hm2-muted);
  font-size: 10px;
}

.hm2-user-card-values b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm2-disclosure {
  color: #8290a9;
  font-size: 26px;
}

.hm2-user-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.hm2-user-identity .hm2-context-label {
  color: #66738b;
}

.hm2-user-identity h2 {
  margin: 0 0 3px;
  color: var(--hm2-ink);
  font-size: 20px;
  line-height: 1.2;
}

.hm2-power-hero {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--hm2-blue-deep), var(--hm2-blue));
  color: #fff;
  box-shadow: 0 16px 34px rgba(31, 78, 188, 0.22);
}

.hm2-power-hero > span,
.hm2-power-hero small {
  color: rgba(255, 255, 255, 0.74);
}

.hm2-power-hero strong {
  font-size: clamp(32px, 10vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hm2-power-hero small {
  font-size: 12px;
}

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

.hm2-power-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--hm2-line);
  border-radius: 18px;
  background: #fff;
}

.hm2-power-grid article strong {
  overflow: hidden;
  color: var(--hm2-ink);
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm2-power-grid article small {
  color: var(--hm2-muted);
  font-size: 11px;
  line-height: 1.35;
}

.hm2-balance-card {
  grid-column: 1 / -1;
}

.hm2-balance-positive,
.hm2-balance-card-positive strong {
  color: var(--hm2-positive) !important;
}

.hm2-balance-negative,
.hm2-balance-card-negative strong {
  color: var(--hm2-negative) !important;
}

.hm2-balance-zero,
.hm2-balance-card-zero strong {
  color: #42516b !important;
}

.hm2-eligibility,
.hm2-contract-note {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 15px;
  border: 1px solid var(--hm2-line);
  border-radius: 18px;
  background: #f8faff;
}

.hm2-eligibility-positive {
  border-color: #bbe5d7;
  background: #f0fbf7;
}

.hm2-eligibility-negative {
  border-color: #f1c7ce;
  background: #fff4f6;
}

.hm2-eligibility-warning {
  border-color: #ead5a0;
  background: #fff9e9;
}

.hm2-eligibility > strong,
.hm2-contract-note > strong {
  color: var(--hm2-ink);
  font-size: 15px;
}

.hm2-held-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.hm2-held-action {
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 8px;
  border: 1px dashed #cbd5e4;
  border-radius: 16px;
  background: #f8f9fc;
  color: #6f7b91;
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.hm2-held-action small {
  color: #9aa5b8;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hm2-inline-chip,
.hm2-version-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.hm2-chip-info {
  background: #eaf2ff;
  color: #315db5;
}

.hm2-chip-warning {
  background: #fff4d7;
  color: #8b5c00;
}

.hm2-foundation-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px 16px;
  padding: 13px 14px;
  border: 1px solid var(--hm2-line);
  border-radius: 17px;
  background: #f8faff;
}

.hm2-foundation-footer div {
  display: grid;
  gap: 2px;
}

.hm2-foundation-footer strong {
  color: var(--hm2-ink);
  font-size: 12px;
}

.hm2-foundation-footer span {
  color: var(--hm2-muted);
  font-size: 10px;
}

.hm2-version-chip {
  background: #e8efff;
  color: #315db5 !important;
}

.hm2-fixture-controls {
  margin: 0 16px 16px;
  padding: 12px;
  border: 1px dashed #b9c8df;
  border-radius: 16px;
  background: #f5f8fd;
  color: var(--hm2-ink);
}

.hm2-fixture-controls summary {
  min-height: 44px;
  padding: 12px 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

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

.hm2-fixture-grid label {
  display: grid;
  gap: 5px;
  color: var(--hm2-muted);
  font-size: 11px;
}

.hm2-fixture-grid select {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--hm2-line);
  border-radius: 12px;
  background: #fff;
  color: var(--hm2-ink);
}

.hm2-skeleton-card {
  pointer-events: none;
}

.hm2-skeleton {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #e7ecf4 20%, #f4f7fb 45%, #e7ecf4 70%);
  background-size: 240% 100%;
  animation: hm2-skeleton 1.25s ease-in-out infinite;
}

.hm2-skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 17px;
}

.hm2-skeleton-title { width: 55%; height: 14px; }
.hm2-skeleton-copy { width: 78%; height: 10px; }
.hm2-skeleton-values { width: 100%; height: 28px; margin-top: 5px; border-radius: 10px; }

.hm2-detail-skeleton {
  display: grid;
  gap: 14px;
}

.hm2-skeleton-detail-title { width: 62%; height: 24px; }
.hm2-skeleton-hero { width: 100%; height: 132px; border-radius: 22px; }
.hm2-skeleton-grid { width: 100%; height: 220px; border-radius: 20px; }

.handler-mobile-v2-return {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 200;
  min-width: 168px;
  padding: 0 16px;
  border: 1px solid rgba(36, 87, 214, 0.38);
  background: #2457d6;
  color: #fff;
  box-shadow: 0 12px 32px rgba(24, 58, 154, 0.28);
}

.hm2-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes hm2-screen-enter {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes hm2-skeleton {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (min-width: 600px) {
  .handler-mobile-v2-shell {
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: calc(max(24px, env(safe-area-inset-bottom)) + var(--hm2-keyboard-offset));
  }

  .hm2-app-frame {
    min-height: calc(100dvh - 48px);
    border-radius: 28px;
  }

  .hm2-native-app-bar {
    border-radius: 28px 28px 0 0;
  }
}

@media (max-width: 430px) {
  .hm2-app-frame {
    max-width: none;
    box-shadow: none;
  }
}

@media (max-width: 350px) {
  .hm2-native-app-bar {
    padding-right: 10px;
    padding-left: 10px;
  }

  .handler-mobile-v2-shell[data-hm2-screen="managed-users"] .hm2-native-app-bar {
    grid-template-columns: minmax(0, 1fr) 82px;
  }

  .handler-mobile-v2-shell[data-hm2-screen="user-detail"] .hm2-native-app-bar {
    grid-template-columns: 44px minmax(0, 1fr) 82px;
  }

  .hm2-text-button {
    min-width: 82px;
    padding: 0 8px;
    font-size: 11px;
  }

  .hm2-screen-stack {
    padding: 12px;
  }

  .hm2-user-card {
    grid-template-columns: 44px minmax(0, 1fr) 16px;
    gap: 9px;
    padding: 12px;
  }

  .hm2-user-avatar {
    width: 44px;
    height: 44px;
  }

  .hm2-held-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hm2-screen,
  .hm2-skeleton {
    animation: none !important;
  }

  .handler-mobile-v2-shell * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
/* UI_HM2_HANDLER_MOBILE_NATIVE_SHELL_END */
