/* Pulse Copier client PWA - visual system.
   Dark theme is the default (as in the design mockups); the light theme follows
   prefers-color-scheme. System font stack only: no external fonts, images or
   scripts, so the page keeps working under style-src 'self'. */

:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .08);
  --field: rgba(255, 255, 255, .04);
  --sheet: #1a1a1e;
  --bar: rgba(11, 11, 13, .92);
  --text: #f2f2f4;
  --muted: #8a8a93;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --line-control: rgba(255, 255, 255, .34);
  --primary: #f4f4f5;
  --on-primary: #0b0b0d;
  --ok: #22f08a;
  --ok-bg: rgba(34, 240, 138, .14);
  --warn: #ffb21e;
  --warn-bg: rgba(255, 178, 30, .14);
  --bad: #ff4d5e;
  --bad-bg: rgba(255, 77, 94, .12);
  --on-danger: #0b0b0d;
  --switch-off: #4b4b55;
  --spectrum: linear-gradient(90deg, #ff3b3b, #ff9f1c, #ffe14d, #3ddc84, #2d9cff, #8b5cf6);
  --glow-login: .28;
  --glow-hero: .5;
  --glow-brand: .55;
  --focus: #f4f4f5;
  --r-control: 18px;
  --r-card: 24px;
  --r-hero: 30px;
  --font: "Urbanist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f2f2ef;
    --surface: #ffffff;
    --surface-2: #f2f2ef;
    --field: #ffffff;
    --sheet: #ffffff;
    --bar: rgba(255, 255, 255, .92);
    --text: #0b0b0d;
    --muted: #6b6b72;
    --line: rgba(0, 0, 0, .09);
    --line-2: rgba(0, 0, 0, .18);
    --line-control: rgba(0, 0, 0, .45);
    --primary: #0b0b0d;
    --on-primary: #ffffff;
    --ok: #0e6b40;
    --ok-bg: rgba(23, 149, 90, .1);
    --warn: #8a5a12;
    --warn-bg: rgba(183, 121, 31, .12);
    --bad: #b32a20;
    --bad-bg: rgba(210, 52, 42, .09);
    --on-danger: #ffffff;
    --switch-off: #6b6b72;
    --glow-login: .22;
    --glow-hero: .35;
    --glow-brand: .35;
    --focus: #0b0b0d;
  }
}

/* ------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font: 400 16px/1.45 var(--font);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (prefers-color-scheme: dark) { body { -webkit-font-smoothing: antialiased; } }
h1, h2, h3, p, ul { margin: 0; }
[hidden] { display: none !important; }
.ico {
  width: 22px; height: 22px; display: block; flex: none; fill: none;
  stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
main:focus,
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible { outline: none; }
.skip {
  position: absolute; top: -100px; left: 16px; z-index: 20; padding: 12px 16px;
  border-radius: 999px; background: var(--primary); color: var(--on-primary);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: calc(8px + env(safe-area-inset-top)); }

/* ------------------------------------------------------ typography */
.display { font-size: 40px; font-weight: 300; line-height: 1.05; letter-spacing: -.01em; }
.page-title { font-size: 28px; font-weight: 300; line-height: 1.15; overflow-wrap: anywhere; }
.page-sub { font-size: 15px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
h3 { font-size: 16px; font-weight: 500; line-height: 1.3; }
.eyebrow, .panel-sub { font-size: 13px; color: var(--muted); }
.status-text {
  font-size: clamp(30px, 10.26vw, 40px); font-weight: 300; line-height: 1.05;
  overflow-wrap: anywhere;
}
.hero-sub { font-size: 13px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.note { font-size: 13px; line-height: 1.45; color: var(--muted); padding: 0 8px; text-wrap: pretty; }
.hint { font-size: 13px; line-height: 1.4; color: var(--muted); }

/* --------------------------------------------------- app bar / views */
main { max-width: 640px; margin: 0 auto; }
.bar {
  position: sticky; top: 0; z-index: 10; background: var(--bar);
  border-bottom: 1px solid var(--line); padding: 8px 16px;
  padding-top: calc(8px + env(safe-area-inset-top));
}
.bar-inner { display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 0 auto; }
.bar-title {
  flex: 1; min-width: 0; font-size: 18px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.view { display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 24px; }
.page-head { display: flex; flex-direction: column; gap: 2px; padding: 4px 6px 6px; }

.toast {
  position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 15;
  display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 14px 16px;
  border-radius: 16px; border: 1px solid var(--line-2); background: var(--sheet);
  color: var(--text); font-size: 15px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.toast::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

/* ---------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px; border: 1px solid transparent; border-radius: var(--r-control);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 16px; font-weight: 600;
  text-align: center; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.btn.pill { min-height: 56px; padding: 12px 24px; border-radius: 999px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.outline { background: transparent; border-color: var(--line-control); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.round { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 999px; }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.bar .btn.pill { min-height: 44px; padding: 8px 16px; font-size: 14px; }
@media (hover: hover) {
  .btn.primary:hover { opacity: .88; }
  .btn.outline:hover { background: var(--surface); }
  .btn.ghost:hover { background: var(--surface-2); }
  #accounts-list .card:hover { background: var(--surface-2); border-color: var(--line-2); }
}

/* ------------------------------------------------------------ forms */
form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 8px; }
label { font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], select {
  width: 100%; height: 56px; padding: 0 18px; border: 1px solid var(--line-control);
  border-radius: var(--r-control); background: var(--field); color: var(--text);
  font: inherit; font-size: 17px;
}
input::placeholder { color: var(--muted); opacity: 1; }
.select-wrap { position: relative; display: flex; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 48px; }
.select-wrap::after {
  content: ""; position: absolute; top: 50%; right: 20px; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted);
  transform: rotate(45deg); pointer-events: none;
}
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg label { position: relative; display: block; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span {
  display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 6px 4px;
  border: 1px solid var(--line-control); border-radius: var(--r-control); background: var(--field);
  color: var(--muted); font-size: 14px; font-weight: 600; text-align: center;
}
.seg input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.switch {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px;
  padding: 0 16px 0 18px; border: 1px solid var(--line-control); border-radius: var(--r-control);
  color: var(--text); font-size: 16px; cursor: pointer;
}
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch-track { position: relative; flex: none; width: 52px; height: 32px; margin-left: auto; border-radius: 999px; background: var(--switch-off); }
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { left: 23px; background: var(--on-primary); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--focus); outline-offset: 2px; }

.error {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px;
  background: var(--bad-bg); color: var(--bad); font-size: 15px; line-height: 1.4;
}
.error::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* -------------------------------------------------- chips and badges */
span.pill {
  display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
span.pill.ok { color: var(--ok); background: var(--ok-bg); }
span.pill.warn { color: var(--warn); background: var(--warn-bg); }
span.pill.bad { color: var(--bad); background: var(--bad-bg); }
.badge { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.badge::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.pos-win { color: var(--ok); }
.badge.pos-loss { color: var(--warn); }

/* ------------------------------------------------------------- login */
.login {
  position: relative; overflow: hidden; gap: 0; padding: 0;
  min-height: calc(100vh - env(safe-area-inset-bottom));
  min-height: calc(100dvh - env(safe-area-inset-bottom));
}
.login::before {
  content: ""; position: absolute; top: -120px; left: -60px; right: -60px; height: 340px;
  background: var(--spectrum); filter: blur(90px); opacity: var(--glow-login); pointer-events: none;
}
.brand-side { position: relative; padding: calc(28px + env(safe-area-inset-top)) 24px 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.brand-name { font-size: 18px; font-weight: 600; letter-spacing: .16em; }
.brand-tag, .brand-headline { display: none; }
.login-body { position: relative; flex: 1; display: flex; flex-direction: column; gap: 24px; padding: 40px 24px 28px; }

/* ------------------------------------------------------- list rows */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cards:empty { display: none; }
.card .t { font-size: 15px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.card .s { font-size: 13px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

#accounts-list .card {
  appearance: none; -webkit-appearance: none; position: relative; display: grid;
  grid-template-columns: auto 1fr; grid-template-areas: "tile title" "tile sub" "pill pill";
  column-gap: 12px; row-gap: 2px; align-items: center; width: 100%; padding: 14px 16px;
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  -webkit-tap-highlight-color: transparent;
}
#accounts-list .card::before, #accounts-list .card::after { content: ""; grid-area: tile; }
#accounts-list .card::before {
  width: 40px; height: 40px; border-radius: 14px;
  background: linear-gradient(135deg, #ffe14d, #ff9f1c); box-shadow: 0 6px 18px rgba(255, 170, 30, .35);
}
#accounts-list .card::after {
  justify-self: center; align-self: center; width: 18px; height: 14px;
  border: 2px solid #1a1200; border-radius: 3px;
  background: linear-gradient(#1a1200, #1a1200) 0 3px / 100% 2px no-repeat;
}
#accounts-list .t { grid-area: title; align-self: end; font-size: 16px; }
#accounts-list .s { grid-area: sub; align-self: start; }
#accounts-list span.pill { grid-area: pill; justify-self: start; margin-top: 8px; }

#positions-list .card, #executions-list .card {
  display: flex; flex-direction: column; gap: 8px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
}
#positions-list .pos-win, #positions-list .pos-loss {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-top: 4px; padding: 10px 12px; border-radius: 14px;
  font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums;
}
#positions-list .pos-win::before, #positions-list .pos-loss::before {
  content: "Resultado"; font-size: 12px; font-weight: 400; color: var(--muted);
}
#positions-list .pos-win { color: var(--ok); background: var(--ok-bg); }
#positions-list .pos-loss { color: var(--bad); background: var(--bad-bg); }
#executions-list .card { align-items: flex-start; }
#executions-list span.pill { order: -1; }
#executions-list .s { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
#executions-list .s:last-child { padding: 0; background: none; font-size: 12px; }

/* ------------------------------------------------------ account detail */
.hero {
  --state-glow: var(--spectrum);
  position: relative; overflow: hidden; display: grid; align-items: center;
  grid-template-columns: auto 1fr; grid-template-areas: "eyebrow eyebrow" "tile state" "tile sub";
  column-gap: 12px; row-gap: 10px; padding: 18px 20px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-hero);
}
.hero:has(.dot.ok) { --state-glow: linear-gradient(90deg, #22f08a, #00d1ff, #3b82f6, #a855f7); }
.hero:has(.dot.warn) { --state-glow: linear-gradient(90deg, #ff6a00, #ffb21e, #ffe14d, #ff6a00); }
.hero:has(.dot.bad) { --state-glow: linear-gradient(90deg, #ff2d55, #ff4d5e, #c026d3); }
.hero::before {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -110px; height: 170px;
  background: var(--state-glow); filter: blur(50px); opacity: var(--glow-hero); pointer-events: none;
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--state-glow); }
.hero > * { position: relative; }
.hero .eyebrow { grid-area: eyebrow; }
.status-text { grid-area: state; }
.hero-sub { grid-area: sub; align-self: start; }

/* app.js resets this element to class "dot ok|warn|bad": it is the 48px state tile. */
.dot {
  grid-area: tile; position: relative; width: 48px; height: 48px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ok); background: var(--ok-bg); box-shadow: 0 0 24px var(--ok-bg);
}
.dot::before, .dot::after { content: ""; position: absolute; }
.dot.ok::before {
  left: 50%; top: 50%; width: 12px; height: 7px; margin: -5px 0 0 -7px;
  border-left: 3px solid currentColor; border-bottom: 3px solid currentColor; border-radius: 1px;
  transform: rotate(-45deg);
}
.dot.ok::after { content: none; }
.dot.warn { color: var(--warn); background: var(--warn-bg); box-shadow: 0 0 24px var(--warn-bg); }
.dot.warn::before, .dot.warn::after { top: 16px; width: 5px; height: 16px; border-radius: 2px; background: currentColor; }
.dot.warn::before { left: 17px; }
.dot.warn::after { left: 26px; }
.dot.bad { color: var(--bad); background: var(--bad-bg); box-shadow: 0 0 24px var(--bad-bg); }
.dot.bad::before, .dot.bad::after { left: 22.5px; top: 15px; width: 3px; height: 18px; border-radius: 2px; background: currentColor; }
.dot.bad::before { transform: rotate(45deg); }
.dot.bad::after { transform: rotate(-45deg); }

.confirm {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 28px 20px 20px;
  background: var(--sheet); border: 1px solid var(--line-2); border-radius: 34px;
}
.confirm::before {
  content: ""; position: absolute; top: 12px; left: 50%; width: 40px; height: 4px; margin-left: -20px;
  border-radius: 2px; background: var(--line-2);
}
.confirm-text { margin-bottom: 8px; font-size: 26px; font-weight: 300; line-height: 1.15; text-wrap: pretty; }

/* ------------------------------------------------------------ panels */
.panel {
  display: flex; flex-direction: column; gap: 14px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
}
.panel-head { display: flex; align-items: center; gap: 12px; }
.panel-head-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.tile { width: 40px; height: 40px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; color: #fff; }
.tile-risk { background: linear-gradient(135deg, #22f08a, #14b8a6); box-shadow: 0 6px 18px rgba(34, 240, 138, .35); }
.tile-positions { background: linear-gradient(135deg, #2d9cff, #8b5cf6); box-shadow: 0 6px 18px rgba(77, 124, 255, .4); }
.tile-signals { background: linear-gradient(135deg, #8b5cf6, #ec4899); box-shadow: 0 6px 18px rgba(139, 92, 246, .4); }
.summary {
  padding: 12px 14px; border-radius: 16px; background: var(--surface-2);
  font-size: 14px; line-height: 1.45; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}

/* ------------------------------------------------------ empty states */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px; text-align: center; font-size: 24px; font-weight: 300; line-height: 1.2; text-wrap: balance;
}
.empty-tile {
  width: 72px; height: 72px; border-radius: 24px; display: flex; align-items: center; justify-content: center; flex: none;
  color: #fff; background: linear-gradient(135deg, #2d9cff, #8b5cf6); box-shadow: 0 10px 30px rgba(77, 124, 255, .4);
}
.empty-tile .ico { width: 32px; height: 32px; }
.empty-tile.is-signals { background: linear-gradient(135deg, #8b5cf6, #ec4899); box-shadow: 0 10px 30px rgba(139, 92, 246, .4); }
.empty-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 18px;
  margin-top: 8px; padding: 28px 22px 34px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-hero);
}
.empty-card::before {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -110px; height: 170px;
  background: var(--spectrum); filter: blur(50px); opacity: var(--glow-hero); pointer-events: none;
}
.empty-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--spectrum); }
.empty-card > * { position: relative; }
.empty-card .empty { align-items: flex-start; padding: 0; text-align: left; font-size: 30px; line-height: 1.1; }
.empty-card .empty-tile {
  width: 52px; height: 52px; border-radius: 18px; color: var(--text);
  background: var(--surface-2); box-shadow: none;
}
/* With linked accounts the empty text is hidden and only the link button remains. */
.empty-card:has(#accounts-empty[hidden]) { margin-top: 12px; padding: 0; background: none; border: 0; border-radius: 0; overflow: visible; }
.empty-card:has(#accounts-empty[hidden])::before, .empty-card:has(#accounts-empty[hidden])::after { content: none; }

/* ---------------------------------------------------------- motion */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn, #accounts-list .card, .seg span, .switch-track, .switch-track::after {
    transition: background-color .2s, border-color .2s, color .2s, left .2s, opacity .2s, transform .12s;
  }
  .btn:active { transform: scale(.98); }
  .btn[disabled] { animation: pulse 1.2s ease-in-out infinite; }
}
@keyframes pulse { 0%, 100% { opacity: .55 } 50% { opacity: 1 } }

/* ------------------------------------------------------- wide screens */
@media (min-width: 480px) {
  #accounts-list .card { grid-template-columns: auto 1fr auto; grid-template-areas: "tile title pill" "tile sub pill"; }
  #accounts-list span.pill { align-self: center; justify-self: end; margin-top: 0; }
}
@media (min-width: 960px) {
  .login { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; padding: 16px; }
  .login::before { content: none; }
  .brand-side {
    display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
    padding: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  }
  .brand-side::before {
    content: ""; position: absolute; left: -10%; right: -10%; bottom: -160px; height: 320px;
    background: var(--spectrum); filter: blur(70px); opacity: var(--glow-brand); pointer-events: none;
  }
  .brand-side::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--spectrum); }
  .brand-side > * { position: relative; }
  .brand-mark { width: 44px; height: 44px; border-radius: 15px; }
  .brand-name { font-size: 20px; }
  .brand-tag {
    display: inline-flex; align-items: center; height: 30px; padding: 0 12px; margin-left: 6px;
    border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--muted);
  }
  .brand-headline { display: block; padding-bottom: 40px; font-size: 64px; font-weight: 300; line-height: 1; letter-spacing: -.02em; }
  .login-body { justify-content: center; padding: 40px 0; }
  .login-body > * { width: 100%; max-width: 420px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 360px) {
  .view { padding-left: 12px; padding-right: 12px; }
  .brand-side, .login-body { padding-left: 20px; padding-right: 20px; }
  .seg span { font-size: 13px; }
}

/* Close-all: a destructive action, visibly apart from the primary actions. */
.btn-danger { color: var(--warn); border-color: var(--warn); }
/* Text color follows the theme so the label keeps WCAG AA contrast on the amber. */
.btn-danger-solid { background: var(--warn); color: var(--on-danger); border-color: transparent; }
.btn-danger-solid:disabled { opacity: .45; cursor: not-allowed; }

/* Per-leg close: the action sits at the foot of its position card. */
#positions-list .row-foot { display: flex; align-items: center; gap: 12px; }
#positions-list .row-foot .s { flex: 1; min-width: 0; }
#positions-list .row-foot .btn { flex: none; margin-left: auto; }
#positions-list .confirm-text {
  margin-bottom: 0; font-size: 17px; font-weight: 500; line-height: 1.4;
}
/* A confirmation nested in a card keeps the card's corner rhythm. */
#positions-list .confirm, .panel .confirm { border-radius: 20px; }

/* Danger zone: unlinking has no undo, so its panel is visibly apart. */
.panel.danger { border-color: var(--bad); }
.panel.danger h3 { color: var(--bad); }
.danger-facts {
  list-style: disc; display: grid; gap: 6px; padding-left: 20px;
  font-size: 14px; line-height: 1.5; text-wrap: pretty;
}
