/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Dark palette (default) */
  --bg:          #0d1117;
  --surface:     #161b22;
  --surface-2:   #21262d;
  --surface-3:   #30363d;
  --border:      #30363d;
  --border-subtle: #21262d;
  --text:        #e6edf3;
  --text-muted:  #7d8590;
  --text-dim:    #484f58;

  --accent:      #388bfd;
  --accent-hover:#58a6ff;
  --accent-subtle: rgba(56,139,253,.12);

  --green:       #3fb950;
  --green-subtle: rgba(63,185,80,.12);
  --amber:       #d29922;
  --amber-subtle: rgba(210,153,34,.12);
  --red:         #f85149;
  --red-subtle:  rgba(248,81,73,.12);
  --purple:      #bc8cff;
  --purple-subtle: rgba(188,140,255,.12);

  --arr-stripe:  rgba(56,139,253,.05);
  --dep-stripe:  rgba(63,185,80,.05);

  --radius:      8px;
  --radius-lg:   12px;
  --shadow:      0 1px 3px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  --shadow-sm:   0 1px 2px rgba(0,0,0,.3);
}

.light {
  --bg:          #f6f8fa;
  --surface:     #ffffff;
  --surface-2:   #f6f8fa;
  --surface-3:   #eaeef2;
  --border:      #d0d7de;
  --border-subtle: #eaeef2;
  --text:        #1f2328;
  --text-muted:  #57606a;
  --text-dim:    #8c959f;
  --accent:      #0969da;
  --accent-hover:#0860ca;
  --accent-subtle: rgba(9,105,218,.08);
  --green:       #1a7f37;
  --green-subtle: rgba(26,127,55,.08);
  --amber:       #9a6700;
  --amber-subtle: rgba(154,103,0,.08);
  --red:         #cf222e;
  --red-subtle:  rgba(207,34,46,.08);
  --arr-stripe:  rgba(9,105,218,.04);
  --dep-stripe:  rgba(26,127,55,.04);
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Theme toggle ─────────────────────────────────────────────────────────── */
body { transition: background .2s, color .2s; }

/* ── Login screen ─────────────────────────────────────────────────────────── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  color: var(--accent);
}
.login-logo svg { width: 100%; height: 100%; }

.login-card h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.login-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 28px;
}

.field-group {
  text-align: left;
  margin-bottom: 16px;
}

.field-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}

.field-group input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-mono);
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.login-error {
  margin-top: 10px;
  font-size: 13px;
  color: var(--red);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, opacity .15s, box-shadow .15s;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-full { width: 100%; justify-content: center; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 6px 10px;
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }

.btn-sm { font-size: 12px; padding: 5px 9px; }

.btn-danger { background: var(--red-subtle); color: var(--red); border: 1px solid transparent; }
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-save { background: var(--green-subtle); color: var(--green); border: 1px solid transparent; }
.btn-save:hover { background: var(--green); color: #fff; }

.btn-clear-row { background: var(--amber-subtle); color: var(--amber); border: 1px solid transparent; }
.btn-clear-row:hover { background: var(--amber); color: #fff; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.header-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--accent);
}

.header-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.header-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 10px;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
  transition: background .3s;
}
.sync-dot.ok  { background: var(--green); }
.sync-dot.err { background: var(--red); animation: pulse-red 1s infinite; }

@keyframes pulse-red { 0%,100%{ opacity:1; } 50%{ opacity:.4; } }

/* ── Main layout ─────────────────────────────────────────────────────────── */
.app-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Legend ──────────────────────────────────────────────────────────────── */
.legend-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 2px;
  flex-wrap: wrap;
}
.legend-item.arr { color: var(--accent); }
.legend-item.dep { color: var(--green); }
.legend-dot.overridden { color: var(--amber); }

/* ── Table ───────────────────────────────────────────────────────────────── */
.table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.flight-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.flight-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.flight-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background .1s;
}
.flight-table tbody tr:last-child { border-bottom: none; }
.flight-table tbody tr.arr-row { background: var(--arr-stripe); }
.flight-table tbody tr.dep-row { background: var(--dep-stripe); }
.flight-table tbody tr:hover { background: var(--surface-2) !important; }
.flight-table tbody tr.overridden-row { outline: 1px solid var(--amber-subtle); outline-offset: -1px; }

.flight-table td {
  padding: 10px 14px;
  vertical-align: middle;
}

/* type badge */
.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  white-space: nowrap;
}
.type-badge.arr { background: var(--accent-subtle); color: var(--accent); }
.type-badge.dep { background: var(--green-subtle); color: var(--green); }

/* callsign */
.callsign {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.airline-name { color: var(--text-muted); font-size: 12px; }
.route-cell   { color: var(--text-muted); font-size: 12px; font-family: var(--font-mono); }

.sched-time {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
}

.aircraft-type { color: var(--text-muted); font-size: 12px; }

/* status select */
.status-select {
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 28px 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  font-family: var(--font-body);
  cursor: pointer;
  outline: none;
  min-width: 150px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d8590' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color .15s, box-shadow .15s;
}
.status-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle); }
.status-select.has-override { border-color: var(--amber); color: var(--amber); background-color: var(--amber-subtle); }

/* status colours */
.status-select[data-val="Scheduled"]    { }
.status-select[data-val="En Route"]     { border-color: var(--accent); color: var(--accent); background-color: var(--accent-subtle); }
.status-select[data-val="Within 20nm"]  { border-color: var(--purple); color: var(--purple); background-color: var(--purple-subtle); }
.status-select[data-val="Landed"]       { border-color: var(--green); color: var(--green); background-color: var(--green-subtle); }
.status-select[data-val="Departed"]     { border-color: var(--green); color: var(--green); background-color: var(--green-subtle); }
.status-select[data-val="Delayed"]      { border-color: var(--amber); color: var(--amber); background-color: var(--amber-subtle); }
.status-select[data-val="Cancelled"]    { border-color: var(--red); color: var(--red); background-color: var(--red-subtle); }
.status-select[data-val="AOG/Maintenance"] { border-color: var(--red); color: var(--red); background-color: var(--red-subtle); }
.status-select[data-val="Custom"]       { border-color: var(--amber); color: var(--amber); background-color: var(--amber-subtle); }

/* custom status input */
.custom-status-input {
  background: var(--surface-2);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 5px 10px;
  font-size: 12px;
  color: var(--amber);
  font-family: var(--font-body);
  outline: none;
  width: 140px;
  margin-top: 4px;
  display: none;
}
.custom-status-input:focus { box-shadow: 0 0 0 3px var(--amber-subtle); }
.custom-status-input.visible { display: block; }

/* note input */
.note-input {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-body);
  outline: none;
  width: 180px;
  transition: border-color .15s;
}
.note-input:focus { border-color: var(--accent); color: var(--text); background: var(--surface-2); box-shadow: 0 0 0 3px var(--accent-subtle); }

/* action buttons cell */
.action-cell {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

/* override indicator dot */
.override-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
  margin-right: 4px;
}

/* loading row */
.loading-row td {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Override pills ──────────────────────────────────────────────────────── */
.override-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.override-summary h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}

.override-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.override-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--amber-subtle);
  border: 1px solid var(--amber);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--amber);
}

.override-pill .pill-callsign {
  font-family: var(--font-mono);
  font-weight: 600;
}

.override-pill .pill-status { opacity: .8; }

.override-pill .pill-remove {
  cursor: pointer;
  opacity: .6;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  transition: opacity .15s;
}
.override-pill .pill-remove:hover { opacity: 1; }

.no-overrides { color: var(--text-dim); font-size: 13px; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: fadeUp .2s ease;
  max-width: 320px;
}
.toast.ok  { border-color: var(--green); color: var(--green); background: var(--green-subtle); }
.toast.err { border-color: var(--red); color: var(--red); background: var(--red-subtle); }

@keyframes fadeUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* ── Utilities ───────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .flight-table thead th:nth-child(6),
  .flight-table tbody td:nth-child(6) { display: none; } /* hide aircraft */
  .header-sub { display: none; }
  .note-input { width: 120px; }
}

@media (max-width: 640px) {
  .app-header { padding: 0 14px; height: 54px; }
  .app-main { padding: 14px 14px 60px; }
  .flight-table thead th:nth-child(3),
  .flight-table tbody td:nth-child(3) { display: none; } /* hide airline */
  .status-select { min-width: 120px; }
}

/* Now Boarding status select colour */
.status-select[data-val="Now Boarding"] {
  border-color: #a78bfa;
  color: #a78bfa;
  background-color: rgba(139, 92, 246, 0.12);
  animation: boarding-pulse 1.5s ease-in-out infinite;
}
@keyframes boarding-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

/* Live countdown in admin action cell */
.boarding-countdown-admin {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius);
  padding: 4px 10px;
  letter-spacing: 0.05em;
}

/* ── Manual flight entry ─────────────────────────────────────────────────── */
.manual-entry-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px 24px;
  box-shadow: var(--shadow-sm);
}

.manual-entry-section h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.manual-hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 18px;
  line-height: 1.5;
}

.manual-form { display: flex; flex-direction: column; gap: 16px; }

.manual-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.mfield {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mfield label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.mf-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text);
  font-family: var(--font-body);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.mf-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle); }
.mf-time { font-family: var(--font-mono); }

.mf-select {
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 28px 7px 10px;
  font-size: 13px;
  color: var(--text);
  font-family: var(--font-body);
  outline: none;
  width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d8590' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
  transition: border-color .15s;
}
.mf-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-subtle); }

.manual-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Manual row pill in overrides summary */
.override-pill.manual {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent);
}

/* Taxiing status select */
.status-select[data-val="Taxiing"] {
  border-color: #d29922;
  color: #d29922;
  background-color: rgba(210, 153, 34, 0.12);
  animation: taxiing-pulse 0.9s ease-in-out infinite;
}
@keyframes taxiing-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* Taxiing countdown in admin action cell */
.taxiing-countdown-admin {
  color: #d29922 !important;
  background: rgba(210, 153, 34, 0.12) !important;
  border-color: rgba(210, 153, 34, 0.3) !important;
}

/* On Final status select */
.status-select[data-val="On Final"] {
  border-color: #3fb950;
  color: #3fb950;
  background-color: rgba(63, 185, 80, 0.12);
  animation: onfinal-pulse 1.2s ease-in-out infinite;
}
@keyframes onfinal-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* On Final countdown in admin action cell */
.onfinal-countdown-admin {
  color: #3fb950 !important;
  background: rgba(63, 185, 80, 0.12) !important;
  border-color: rgba(63, 185, 80, 0.3) !important;
}

/* ── Google Sheets Integration ───────────────────────────────────────────── */
.sheets-section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
}
.sheets-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 6px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.sheets-step {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
}
.sheets-step:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 12px;
}
.sheets-step-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-2);
  margin-bottom: 10px;
}
.sheets-url-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.sheets-url-input {
  flex: 1;
  min-width: 260px;
}
.sh-gid-select {
  width: 110px;
  flex-shrink: 0;
}
.sheets-url-status {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-2);
  min-height: 18px;
}
.sheets-url-status.ok  { color: #3fb950; }
.sheets-url-status.err { color: #f85149; }

/* Column mapper grid */
.col-mapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.col-map-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 8px 10px;
  border: 1px solid var(--border);
}
.col-map-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .05em;
  width: 80px;
  flex-shrink: 0;
}
.col-map-sel {
  flex: 1;
  font-size: 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  padding: 4px 24px 4px 8px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d8590' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}
.col-map-sel:focus { outline: none; border-color: var(--accent); }
.sheets-mapper-actions {
  display: flex;
  gap: 8px;
}

/* Patches list */
.sh-patches-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  min-height: 28px;
}
.sh-patch-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-1);
}
.sh-patch-pill .patch-key   { color: var(--accent); font-weight: 600; }
.sh-patch-pill .patch-field { color: var(--text-2); font-style: italic; }
.sh-patch-pill .patch-val   { color: #3fb950; }
.sh-patch-pill .pill-remove {
  margin-left: auto;
  cursor: pointer;
  opacity: .6;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
}
.sh-patch-pill .pill-remove:hover { opacity: 1; color: #f85149; }

.sh-patch-add-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.sh-patch-sel { min-width: 130px; }
.sh-patch-val { flex: 1; min-width: 140px; }
