/* Rocket Profile Checker — Team Rocket design system */

:root {
  --ink: #072739;
  --ink-soft: #436170;
  --cyan: #23ade9;
  --cyan-deep: #087aa8;
  --cyan-soft: #e7f7fd;
  --yellow: #ffdf2b;
  --mint: #72dfbd;
  --paper: #ffffff;
  --canvas: #eff5f6;
  --line: #d6e3e8;
  --line-soft: #e5edef;
  --input-line: #bcd0d9;
  --muted: #81939b;
  --secondary: #607782;
  --danger: #c43d3d;

  --status-run-fg: #075c80;
  --status-run-bg: #dff5fe;
  --status-ok-fg: #087251;
  --status-ok-bg: #dff8ef;
  --status-warn-fg: #7b5610;
  --status-warn-bg: #fff1c9;
  --status-fail-fg: #982b2b;
  --status-fail-bg: #ffe4e4;

  --radius-control: 9px;
  --radius-field: 11px;
  --radius-card: 16px;
  --radius-dialog: 20px;
  --radius-pill: 999px;

  --shadow-panel: 0 18px 50px rgba(7, 39, 57, 0.05);
  --shadow-card: 0 20px 60px rgba(7, 39, 57, 0.07);
  --shadow-button: 0 12px 28px rgba(7, 39, 57, 0.15);
  --shadow-modal: 0 30px 100px rgba(0, 0, 0, 0.35);

  --font-display: "Inter", Arial, sans-serif;
  --font-body: "Poppins", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Author display rules would otherwise beat the UA's [hidden] rule. */
[hidden] { display: none !important; }

html { background: var(--canvas); scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, button, .metric, th, .pill, .chip {
  font-family: var(--font-display);
}

:focus-visible {
  outline: 3px solid rgba(35, 173, 233, 0.32);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: var(--radius-control); font-family: var(--font-display);
  font-weight: 700; text-decoration: none; transition: top 160ms ease;
}
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------- Shell */

.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 30px;
  padding: 34px 24px 28px;
  color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 106% 2%,
      transparent 0 95px,
      rgba(35, 173, 233, 0.33) 96px 99px,
      transparent 100px 146px,
      rgba(35, 173, 233, 0.13) 147px 150px,
      transparent 151px),
    var(--ink);
}

.logo { display: block; width: 150px; height: auto; }

.sidebar-product {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--yellow);
}

.sidebar-nav { display: flex; flex-direction: column; gap: 6px; }

.nav-item {
  appearance: none; text-align: left; cursor: pointer;
  min-height: 44px; padding: 11px 16px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  background: transparent; color: rgba(255, 255, 255, 0.78);
  font-size: 13px; font-weight: 600;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-item.is-active {
  background: var(--cyan); border-color: var(--cyan); color: #fff;
}

.sidebar-user {
  display: flex; align-items: center; gap: 11px;
  padding: 12px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.sidebar-user .avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, 0.14); object-fit: cover;
}
.sidebar-user .user-text { min-width: 0; }
.sidebar-user .user-name {
  margin: 0; font-family: var(--font-display);
  font-size: 12px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user .user-signout {
  font-size: 11px; color: rgba(255, 255, 255, 0.55); text-decoration: none;
  transition: color 160ms ease;
}
.sidebar-user .user-signout:hover { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }

.sidebar-jobs { border-top: 1px solid rgba(255, 255, 255, 0.14); padding-top: 20px; }
.sidebar-label {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.5);
}
.sidebar-jobs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sidebar-jobs button {
  appearance: none; cursor: pointer; width: 100%; text-align: left;
  background: transparent; border: 0; border-radius: var(--radius-control);
  padding: 9px 10px; color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-body); font-size: 12px; line-height: 1.45;
  transition: background 160ms ease, color 160ms ease;
}
.sidebar-jobs button:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar-jobs button.is-active { background: rgba(35, 173, 233, 0.22); color: #fff; }
.sidebar-jobs .job-meta { display: block; font-size: 10px; color: rgba(255, 255, 255, 0.45); }

.workspace {
  padding: 42px clamp(26px, 4vw, 58px) 72px;
  max-width: 1240px; width: 100%;
}
.workspace:focus { outline: none; }

/* ------------------------------------------------------------- Page header */

.page-head { margin-bottom: 30px; max-width: 760px; }
.eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--cyan);
}
.page-head h1 {
  margin: 0; font-size: clamp(32px, 4vw, 44px); font-weight: 600;
  line-height: 1.04; letter-spacing: -0.045em;
}
.lede { margin: 14px 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.7; }

/* -------------------------------------------------------------- Stat cards */

.stat-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 13px; padding: 18px 20px;
}
.stat.dark { background: var(--ink); border-color: var(--ink); }
.stat .metric {
  display: block; font-size: 29px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
}
.stat.dark .metric { color: var(--yellow); }
.stat .stat-label {
  display: block; margin-top: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  font-family: var(--font-display);
}
.stat.dark .stat-label { color: rgba(255, 255, 255, 0.6); }
.stat.ok .metric { color: var(--status-ok-fg); }
.stat.warn .metric { color: var(--status-warn-fg); }
.stat.fail .metric { color: var(--status-fail-fg); }

/* ------------------------------------------------------------------ Panels */

.panel {
  background: var(--paper); border: 1px solid #d5e3e7;
  border-radius: var(--radius-card); box-shadow: var(--shadow-panel);
  margin-bottom: 24px; overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 19px 22px; border-bottom: 1px solid var(--line-soft);
}
.panel-head.wrap { flex-wrap: wrap; }
.panel-head h2 {
  margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.025em;
}
.panel-body { padding: 22px; }
.panel-body.tight { padding: 16px 22px 22px; }
.panel-body.grid-4 {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
}

.advanced summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 19px 22px; cursor: pointer; list-style: none;
}
.advanced summary::-webkit-details-marker { display: none; }
.advanced[open] summary { border-bottom: 1px solid var(--line-soft); }
.chevron { color: var(--muted); transition: transform 180ms ease; }
.advanced[open] .chevron { transform: rotate(180deg); }

.help { margin: 0 0 18px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.muted { color: var(--muted); font-size: 13px; }
.help code {
  font-size: 12px; background: #f5f9fa; border: 1px solid var(--line-soft);
  border-radius: 5px; padding: 1px 5px;
}

/* ------------------------------------------------------------------ Inputs */

.field-label {
  display: block; margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--secondary);
}

.input {
  width: 100%; min-height: 48px; padding: 12px 15px;
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: #fcfefe; border: 1px solid var(--input-line);
  border-radius: var(--radius-field);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.input::placeholder { color: #9fb3bc; }
.input:hover { border-color: #9dbac6; }
.input:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(35, 173, 233, 0.16);
}
.input[aria-invalid="true"] { border-color: var(--danger); }
.select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23436170' stroke-width='1.7' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
}
.search { margin-bottom: 14px; }

.form-error {
  margin: 14px 0 0; padding: 11px 14px;
  color: var(--status-fail-fg); background: #fff1f1;
  border: 1px solid #f4d3d3; border-radius: var(--radius-control);
  font-size: 13px;
}

/* ----------------------------------------------------------------- Buttons */

.btn {
  appearance: none; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  line-height: 1; text-decoration: none;
  border-radius: var(--radius-pill); border: 1px solid transparent;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-button); }
.btn-primary:hover { background: var(--cyan); transform: translateY(-2px); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--input-line); }
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan-deep); transform: translateY(-2px); }
.btn[disabled], .btn.is-disabled {
  opacity: 0.45; pointer-events: none; box-shadow: none; transform: none;
}
.btn.small { min-height: 42px; padding: 10px 18px; font-size: 11px; border-radius: var(--radius-control); }
.plus { color: var(--yellow); font-size: 16px; line-height: 1; }

.action-bar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 6px; }
.action-bar.left { justify-content: flex-start; margin-top: 18px; }

.icon-btn {
  appearance: none; cursor: pointer; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--ink-soft); font-size: 20px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 160ms ease, color 160ms ease;
}
.icon-btn:hover { border-color: var(--cyan); color: var(--cyan-deep); }

.chip {
  appearance: none; cursor: pointer;
  min-height: 42px; padding: 9px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: #fff; color: var(--ink-soft);
  font-size: 12px; font-weight: 700;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.chip:hover { border-color: var(--cyan); color: var(--cyan-deep); }
.chip.is-active { background: var(--cyan-soft); border-color: #8fd6f2; color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------- Dropzone */

.dropzone {
  margin-top: 22px; padding: 52px 24px; cursor: pointer;
  text-align: center; background: #f8fafb;
  border: 2px dashed var(--input-line); border-radius: var(--radius-card);
  transition: border-color 160ms ease, background 160ms ease;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--cyan); background: var(--cyan-soft); }
.dropzone-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-bottom: 14px;
  border-radius: 50%; background: var(--cyan-soft); color: var(--cyan-deep);
  font-size: 20px; font-weight: 700;
}
.dropzone-title {
  margin: 0; font-family: var(--font-display);
  font-size: 19px; font-weight: 600; letter-spacing: -0.02em;
}
.dropzone-hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------- Mapping editor */

.mapping-head, .mapping-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1.1fr) 104px 46px;
  gap: 12px; align-items: center;
}
.mapping-head {
  padding: 0 4px 8px;
  font-family: var(--font-display);
  font-size: 10px; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted);
}
.mapping-row {
  padding: 10px 4px; border-top: 1px solid var(--line-soft);
}
.mapping-row .input { min-height: 46px; }
.mapping-cell { min-width: 0; }
.mapping-cell-label { display: none; }
.remove-cell { display: flex; justify-content: flex-end; }
.switch-cell { display: flex; align-items: center; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; }
.switch input { width: 18px; height: 18px; accent-color: var(--cyan); cursor: pointer; }
.remove-btn {
  appearance: none; cursor: pointer; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--line); background: #fff;
  color: var(--secondary); font-size: 17px; line-height: 1;
  transition: border-color 160ms ease, color 160ms ease;
}
.remove-btn:hover { border-color: var(--danger); color: var(--danger); }

.add-row {
  appearance: none; cursor: pointer; margin-top: 18px;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 10px 20px;
  background: var(--cyan-soft); border: 1px solid #cbebfa;
  border-radius: var(--radius-pill); color: var(--ink);
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  transition: border-color 160ms ease;
}
.add-row:hover { border-color: var(--cyan); }
.add-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--cyan); color: #fff; font-size: 14px;
}

.sample-line {
  margin: 12px 0 0; font-size: 12px; color: var(--muted);
  word-break: break-all;
}

/* ------------------------------------------------------------------- Table */

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th {
  text-align: left; padding: 13px 16px;
  background: #f6fafb; border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 10px; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--secondary);
}
.data-table td {
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
  vertical-align: top; font-size: 13px;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f7fcfe; }
.cell-primary {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: -0.01em; display: block;
}
.cell-secondary { display: block; font-size: 11px; color: var(--muted); }
.cell-reasons { color: var(--ink-soft); font-size: 12px; }

a.profile-link {
  display: inline-block; max-width: 230px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
  color: var(--cyan-deep); text-decoration: none; font-size: 12px;
}
a.profile-link:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }

.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 16px;
}
.pager-text { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------------- Pills */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: var(--radius-pill);
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; white-space: nowrap;
  background: #eef3f5; color: var(--secondary);
}
.pill.running { background: var(--status-run-bg); color: var(--status-run-fg); }
.pill.running::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; animation: pulse 1.5s ease-in-out infinite;
}
.pill.matched, .pill.completed { background: var(--status-ok-bg); color: var(--status-ok-fg); }
.pill.pending, .pill.paused, .pill.ready, .pill.pausing, .pill.draft {
  background: var(--status-warn-bg); color: var(--status-warn-fg);
}
.pill.mismatched, .pill.error, .pill.failed {
  background: var(--status-fail-bg); color: var(--status-fail-fg);
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* --------------------------------------------------------------- Run panel */

.run-panel .panel-body { padding: 22px; }
.run-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 20px;
}
.run-message { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); max-width: 460px; }
.run-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.progress {
  height: 6px; border-radius: var(--radius-pill);
  background: #e2ecef; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--cyan), #7ed4f5);
  transition: width 360ms ease;
}
.progress-text { margin: 10px 0 0; font-size: 12px; color: var(--ink-soft); font-weight: 500; }

.download-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------- Job listing */

.job-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 190px auto;
  gap: 16px; align-items: center;
  padding: 16px 4px; border-top: 1px solid var(--line-soft);
}
.job-card:first-child { border-top: 0; padding-top: 4px; }
.job-name {
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  letter-spacing: -0.015em; margin: 0;
}
.job-sub { margin: 3px 0 0; font-size: 11px; color: var(--muted); }
.job-progress { font-size: 12px; color: var(--ink-soft); }
.job-actions { display: flex; gap: 8px; justify-content: flex-end; }

.empty {
  text-align: center; padding: 42px 24px;
}
.empty h3 { margin: 0 0 8px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.empty p { margin: 0 0 20px; color: var(--ink-soft); font-size: 13px; }

/* --------------------------------------------------------- Modals & toasts */

.backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(3, 25, 37, 0.62); backdrop-filter: blur(5px);
}

.modal {
  position: fixed; z-index: 50;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 52px); overflow: auto;
  background: var(--paper); border-radius: var(--radius-dialog);
  box-shadow: var(--shadow-modal);
}
.modal-head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
}
.modal-head h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.modal-body { padding: 24px; }

.kv-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.kv-table th, .kv-table td {
  text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-soft);
  font-size: 12px; vertical-align: top;
}
.kv-table th {
  width: 26%; font-family: var(--font-body); font-weight: 600; color: var(--secondary);
}
.kv-table td.value { color: var(--ink); word-break: break-word; }
.kv-table .verdict { width: 108px; }

.tag-mini {
  display: inline-block; padding: 1px 7px; border-radius: var(--radius-pill);
  background: var(--cyan-soft); border: 1px solid #cbebfa;
  font-family: var(--font-display); font-size: 9px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--cyan-deep);
  vertical-align: 1px;
}

.check-line { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; }
.check-line.pass { color: var(--status-ok-fg); }
.check-line.fail { color: var(--status-fail-fg); }

.probe-block {
  margin-top: 18px; padding: 16px; background: #f8fafb;
  border: 1px solid var(--line-soft); border-radius: 12px;
}
.probe-block h3 {
  margin: 0 0 10px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan-deep);
}
.probe-block pre {
  margin: 0; max-height: 260px; overflow: auto;
  font-size: 11px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  color: var(--ink-soft);
}
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--cyan-soft); border: 1px solid #cbebfa;
  font-size: 11px; color: var(--ink);
}

.toast {
  position: fixed; z-index: 60; left: 50%; bottom: 28px;
  transform: translateX(-50%);
  padding: 13px 22px; border-radius: var(--radius-pill);
  background: var(--ink); color: #fff;
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-button); max-width: min(560px, calc(100vw - 32px));
}
.toast.is-error { background: var(--danger); }

/* -------------------------------------------------------------- Responsive */

@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-body.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mapping-head { display: none; }
  .mapping-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px 12px; padding: 18px 4px;
  }
  .mapping-cell-label {
    display: block; margin-bottom: 6px;
    font-family: var(--font-display);
    font-size: 10px; font-weight: 700; letter-spacing: 0.09em;
    text-transform: uppercase; color: var(--muted);
  }
  .switch-cell { align-items: flex-end; }
  .remove-cell { grid-column: 1 / -1; justify-content: flex-end; }
  .job-card { grid-template-columns: minmax(0, 1fr) auto; }
  .job-card .job-progress, .job-card .pill-cell { grid-column: 1; }
}

@media (max-width: 780px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: static; height: auto; flex-direction: column; gap: 20px;
    padding: 22px 18px;
  }
  .sidebar-nav { flex-direction: row; }
  .nav-item { flex: 1; text-align: center; }
  .sidebar-jobs { display: none; }
  .workspace { padding: 30px 18px 56px; }
  .action-bar { justify-content: stretch; }
  .action-bar .btn { flex: 1 1 auto; }
  .download-row .btn { flex: 1 1 auto; }
}

@media (max-width: 440px) {
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .panel-body.grid-4 { grid-template-columns: minmax(0, 1fr); }
  .mapping-row { grid-template-columns: minmax(0, 1fr); }
  .remove-cell { justify-content: flex-start; }
  .job-card { grid-template-columns: minmax(0, 1fr); }
  .job-actions { justify-content: flex-start; }
  .run-actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
