/* migration.js — "Bring your data in" hub */
.mig { display: flex; flex-direction: column; gap: 14px; }
.mig-card { }

/* The one line on the page: what it is FOR. Deliberately not a card and not
   boxed — the intro CARD it replaces (.mig-intro, a bordered panel with a brand
   stripe) read as a notice you had to deal with before starting. A plain line of
   text under the title reads as a caption, which is what it is.
   Sits in the content column, not the topbar's #pageSub slot: that slot is
   `display:none` app-wide now (it feeds the h1's title= instead), and even while
   it was painted it was a ~236px column that stacked a 43-character sentence into
   2–5 lines. The long version of this argument is at LEDE in migration.js. */
.mig-lede { font-size: 13.5px; color: var(--ink-soft); margin: -4px 0; }

/* Demo mode: one line, warm but not a full alarm panel. */
.mig-demo {
  font-size: 13px; padding: 8px 11px; border-radius: 10px;
  background: color-mix(in srgb, var(--warn, #d97706) 12%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--warn, #d97706) 40%, var(--line));
}

/* method cards — an icon and a verb, nothing else. `align-items: center` (was
   flex-start, for a title + description block that no longer exists) so the icon
   sits on the label's line instead of hanging above an empty space. */
.mig-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.mig-method {
  display: flex; gap: 10px; align-items: center; text-align: left;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); cursor: pointer; transition: border-color .15s, transform .05s;
}
.mig-method:hover { border-color: var(--brand, #2e6fc4); }
.mig-method:active { transform: translateY(1px); }
.mig-method-ic { font-size: 22px; line-height: 1; flex: 0 0 auto; }

/* field-set designer */
.mig-fields { display: flex; flex-direction: column; gap: 5px; }
.mig-frow {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); user-select: none;
}
.mig-frow.off { opacity: .5; }
.mig-frow.dragging { border-color: var(--brand, #2e6fc4); box-shadow: 0 6px 18px rgba(0,0,0,.14); opacity: .96; }
.mig-grip { cursor: grab; color: var(--ink-faint, #9aa4b2); font-size: 16px; line-height: 1; padding: 2px 3px; }
.mig-grip:active { cursor: grabbing; }
.mig-flabel { font-weight: 600; }
.mig-ftype { font-size: 11px; color: var(--ink-soft); background: var(--panel-2, rgba(127,127,127,.1)); padding: 1px 7px; border-radius: 999px; }
.mig-mv {
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: 7px; width: 26px; height: 26px; line-height: 1; cursor: pointer; font-size: 12px;
}
.mig-mv:hover { border-color: var(--brand, #2e6fc4); }

/* staging grid */
.mig-gridwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.mig-grid { width: 100%; border-collapse: collapse; }
.mig-grid th { position: sticky; top: 0; background: var(--panel-2, var(--panel)); font-size: 12px; white-space: nowrap; padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.mig-grid td { padding: 3px 5px; border-bottom: 1px solid var(--line); }
.mig-grid td input, .mig-grid td select { width: 100%; min-width: 96px; box-sizing: border-box; }
.mig-grid .mig-rn { width: 34px; min-width: 34px; text-align: right; color: var(--ink-soft); font-size: 12px; }
.mig-commit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

/* flagged (unclear/invalid) cells + the confirm-before-import warning bar */
.mig-grid td input.mig-warn, .mig-grid td select.mig-warn { border: 1.5px solid var(--warn, #d97706); background: color-mix(in srgb, var(--warn, #d97706) 9%, transparent); }
.mig-warnbar { margin-top: 10px; padding: 9px 12px; border-radius: 10px; font-size: 13px; }
.mig-warnbar:empty { display: none; }
.mig-warnbar.ok { background: color-mix(in srgb, var(--good, #16a34a) 10%, transparent); color: var(--good, #16a34a); }
.mig-warnbar.warn { background: color-mix(in srgb, var(--warn, #d97706) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warn, #d97706) 40%, transparent); }
.mig-warnlist { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }

/* admission-form designer canvas */
.af-el { border: 1px solid transparent; border-radius: 3px; }
.af-el:hover { border-color: color-mix(in srgb, var(--brand, #2e6fc4) 55%, transparent); }
.af-grip { cursor: move; color: var(--brand, #2e6fc4); font-size: 11px; line-height: 1; opacity: .5; touch-action: none; }
.af-el:hover .af-grip { opacity: 1; }

@media (max-width: 640px) {
  .mig-ftype { display: none; }
  .mig-method { padding: 10px 12px; }
}
