/* App migration — deliberately uses the same visual language as Nativize. */
.migration-main { padding: 42px 24px 84px; min-height: 68vh; }
.migration-shell { width: 100%; max-width: 1080px; margin-inline: auto; }

.mh-app-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.mh-app-head h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -.04em; margin: 12px 0 10px; }
.mh-app-head p { color: var(--muted); font-size: 17px; max-width: 720px; }
.mh-app-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.mh-kicker, .mh-badge { display: inline-flex; align-items: center; gap: 7px; width: fit-content; padding: 7px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: #c4b5fd; font-size: 11.5px; font-weight: 720; letter-spacing: .035em; }

.mh-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin: 0 0 24px; }
.mh-progress-item { padding: 12px 10px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--muted-2); text-align: center; font-size: 11px; transition: border-color .2s, background .2s; }
.mh-progress-item b { display: block; color: var(--muted); font-size: 13px; margin-bottom: 1px; }
.mh-progress-item.active { border-color: rgba(124,58,237,.6); background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(37,99,235,.1)); box-shadow: var(--shadow-glow); }
.mh-progress-item.active b { color: var(--text); }
.mh-progress-item.done { border-color: rgba(74,222,128,.25); background: rgba(74,222,128,.055); }
.mh-progress-item.done b { color: #86efac; }

.mh-panel, .mh-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); backdrop-filter: blur(10px); }
.mh-panel { padding: clamp(24px, 4vw, 38px); }
.mh-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.mh-panel-head h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.12; letter-spacing: -.03em; margin-bottom: 8px; }
.mh-panel-head p { color: var(--muted); max-width: 720px; }
.mh-panel-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }

.mh-btn { --pad: 11px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: var(--pad); border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: 600 14px/1.2 inherit; cursor: pointer; text-decoration: none; transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s; }
.mh-btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.1); }
.mh-btn.primary { color: #fff; border-color: transparent; background: var(--grad); box-shadow: var(--shadow-glow); }
.mh-btn.primary:hover { box-shadow: 0 24px 60px -16px rgba(124,58,237,.7); }
.mh-btn.danger { color: #fff; background: linear-gradient(135deg,#dc2626,#f97316); border-color: transparent; }
.mh-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.mh-choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mh-primary-sources { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; }
.mh-primary-target { grid-template-columns: minmax(280px, 390px); }
.mh-choice { min-height: 166px; padding: 22px; cursor: pointer; position: relative; overflow: hidden; transition: transform .25s var(--ease), border-color .25s, background .25s; }
.mh-choice:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.mh-choice.selected { border-color: rgba(124,58,237,.75); background: linear-gradient(135deg, rgba(124,58,237,.13), rgba(37,99,235,.07)); box-shadow: inset 0 0 0 1px rgba(124,58,237,.22); }
.mh-choice.disabled { opacity: .46; cursor: not-allowed; transform: none; }
.mh-choice .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.mh-choice .ico { font-size: 24px; line-height: 1; }
.mh-choice h3 { font-size: 17px; letter-spacing: -.02em; margin-bottom: 7px; }
.mh-choice p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.mh-more { margin-top: 16px; }
.mh-more > summary { width: fit-content; padding: 8px 12px; border-radius: 999px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; font-weight: 650; cursor: pointer; }
.mh-more[open] > summary { margin-bottom: 14px; color: var(--text); }
.mh-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.mh-status.full { color: #86efac; background: rgba(74,222,128,.11); }
.mh-status.guided { color: #fde68a; background: rgba(250,204,21,.1); }
.mh-status.soon { color: #cbd5e1; background: rgba(148,163,184,.1); }

.mh-upload { margin-top: 20px; padding: 28px; border: 1px dashed rgba(167,139,250,.42); border-radius: var(--radius); background: linear-gradient(135deg, rgba(124,58,237,.08), rgba(37,99,235,.045)); text-align: center; }
.mh-upload b { display: block; font-size: 17px; }
.mh-upload input { max-width: 100%; margin-top: 14px; color: var(--muted); }
.mh-upload input::file-selector-button { margin-right: 12px; padding: 9px 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-2); color: var(--text); font-weight: 650; cursor: pointer; }

.mh-form { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; margin-top: 18px; }
.mh-field label { display: block; color: var(--text); font-size: 13px; font-weight: 650; margin-bottom: 7px; }
.mh-field input, .mh-field select { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 13px; background: rgba(5,6,14,.55); color: var(--text); font: inherit; outline: none; }
.mh-field input:focus, .mh-field select:focus { border-color: rgba(124,58,237,.75); box-shadow: 0 0 0 3px rgba(124,58,237,.1); }
.mh-field small { display: block; margin-top: 6px; color: var(--muted-2); font-size: 11.5px; }

.mh-note, .mh-error { margin-top: 16px; padding: 14px 16px; border: 1px solid rgba(96,165,250,.22); border-radius: 14px; background: rgba(96,165,250,.075); color: #bfdbfe; font-size: 13px; line-height: 1.55; }
.mh-note.warn { color: #fde68a; border-color: rgba(250,204,21,.22); background: rgba(250,204,21,.07); }
.mh-note.danger, .mh-error { color: #fecdd3; border-color: rgba(251,113,133,.25); background: rgba(251,113,133,.075); }

.mh-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 18px 0; }
.mh-stat { padding: 16px; border: 1px solid var(--border); border-radius: 15px; background: rgba(255,255,255,.025); }
.mh-stat b { display: block; font-size: 24px; line-height: 1.1; margin-bottom: 5px; }
.mh-stat span { color: var(--muted); font-size: 11px; }
.mh-risk.safe { color: #86efac; }
.mh-risk.warn { color: #fde68a; }
.mh-risk.danger { color: #fecdd3; }

.mh-list { display: grid; gap: 10px; }
.mh-list-row { padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.025); color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.mh-list-row strong { display: block; color: var(--text); margin-bottom: 3px; }
.mh-paywall { margin-top: 22px; padding: 28px; border: 1px solid rgba(124,58,237,.3); border-radius: var(--radius); background: linear-gradient(135deg, rgba(124,58,237,.13), rgba(37,99,235,.08)); text-align: center; }
.mh-paywall h3 { font-size: 22px; margin-bottom: 8px; }
.mh-paywall p { max-width: 620px; margin-inline: auto; color: var(--muted); }
.mh-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.mh-trust-row { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; color: var(--muted); font-size: 12px; }
.mh-trust-row span::before { content: "✓"; margin-right: 6px; color: #4ade80; }

.mh-two { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; align-items: start; }
.mh-side { display: grid; gap: 10px; position: sticky; top: calc(var(--header-space) + 12px); }
.mh-side a { display: block; padding: 17px; color: inherit; text-decoration: none; }
.mh-side a.active { border-color: rgba(124,58,237,.65); background: rgba(124,58,237,.09); }
.mh-side h3 { font-size: 14px; margin-bottom: 3px; }
.mh-side p { color: var(--muted); font-size: 12px; }
.mh-side > .mh-btn { display: inline-flex; padding: 10px 15px; }

.mh-command { margin: 12px 0; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: rgba(5,6,14,.55); }
.mh-command-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 13px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.mh-command pre { margin: 0; padding: 15px; overflow-wrap: anywhere; white-space: pre-wrap; color: #d8d9e8; font: 12px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace; }
.mh-copy { padding: 6px 10px; font-size: 11px; }
.mh-files { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mh-file { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.mh-file p { color: var(--muted); font-size: 13px; }
.mh-file .mh-actions { justify-content: flex-start; margin-top: auto; }
.mh-check { display: flex; gap: 11px; align-items: flex-start; padding: 13px 8px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.mh-check input { margin-top: 4px; accent-color: var(--violet); }
.mh-empty, .mh-loading { padding: 64px 20px; color: var(--muted); text-align: center; }
.mh-toast { position: fixed; right: 18px; bottom: 18px; z-index: 100; padding: 12px 15px; border: 1px solid var(--border-strong); border-radius: 14px; background: rgba(18,18,31,.96); color: var(--text); box-shadow: var(--shadow); font-size: 13px; }
.mh-hidden { display: none !important; }

@media (max-width: 900px) {
  .mh-choice-grid { grid-template-columns: repeat(2, 1fr); }
  .mh-stats { grid-template-columns: repeat(3, 1fr); }
  .mh-two { grid-template-columns: 1fr; }
  .mh-side { grid-template-columns: repeat(3, 1fr); position: static; order: -1; }
  .mh-files { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .migration-main { padding: 26px 14px 64px; }
  .mh-app-head { align-items: flex-start; flex-direction: column; }
  .mh-app-head h1 { font-size: 38px; }
  .mh-app-tools { justify-content: flex-start; }
  .mh-progress { grid-template-columns: repeat(5, 108px); overflow-x: auto; padding-bottom: 6px; }
  .mh-choice-grid, .mh-primary-sources, .mh-primary-target, .mh-form { grid-template-columns: 1fr; }
  .mh-stats { grid-template-columns: 1fr 1fr; }
  .mh-side { grid-template-columns: 1fr; }
  .mh-panel { padding: 22px; }
  .mh-panel-actions .mh-btn { flex: 1; }
}
