/* Radar · estética inspirada en Wallapop (fondo blanco, turquesa, píldoras, tarjetas con foto) */
:root {
  --brand: #13c1ac;
  --brand-hover: #0fae9a;
  --brand-ink: #0b8577;
  --brand-soft: #e6f8f5;
  --text: #253238;
  --text-2: #607d8b;
  --muted: #90a4ae;
  --line: #eceff1;
  --line-2: #cfd8dc;
  --bg: #ffffff;
  --bg-2: #f5f7f8;
  --ship: #8e3fbd;
  --pos: #0b8577;
  --neg: #e5484d;
  --warn: #f5a524;
  --radius: 10px;
  --content: 1060px;

  /* nombres que usa charts.js */
  --accent: var(--brand);
  --border: var(--line);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-ink); text-decoration: none; }
button { font: inherit; }
h1 { font-size: 1.9rem; font-weight: 800; line-height: 1.15; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 800; margin: 0 0 12px; }
.muted { color: var(--text-2); }
.small { font-size: .84rem; }
.right { text-align: right; }
.inline { display: inline; margin: 0; }
.ico { width: 18px; height: 18px; flex: none; }

/* ------------------------------------------------------------ cabecera */
.topbar { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 72px; padding: 0 20px; max-width: 1440px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 8px; flex: none; }
.logo-mark { width: 32px; height: 32px; }
.logo-word { font-size: 1.55rem; font-weight: 800; color: var(--brand); letter-spacing: -.03em; line-height: 1; }
.header-search { flex: 1; max-width: 640px; margin: 0 auto; }
.top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.top-link {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 0; background: none;
  color: var(--text); font-size: .88rem; cursor: pointer; border-radius: 99px; position: relative;
}
.top-link:hover { background: var(--bg-2); }
.top-link .ico { width: 22px; height: 22px; stroke-width: 1.6; }
.top-link .dot { position: absolute; top: 7px; left: 25px; width: 8px; height: 8px; border: 2px solid #fff; box-sizing: content-box; }
.btn-sell { margin-left: 8px; }
.me-link { padding: 6px 12px 6px 6px; font-weight: 700; }
.avatar.avatar-sm { width: 30px; height: 30px; font-size: .85rem; }
.top-link .avatar { display: grid; }

.subnav { border-top: 1px solid var(--line); }
.subnav-inner {
  display: flex; gap: 26px; align-items: center; height: 42px; padding: 0 20px; max-width: 1440px; margin: 0 auto;
  overflow-x: auto; scrollbar-width: none;
}
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav a { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: .86rem; white-space: nowrap; height: 100%; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--brand-ink); }
.subnav a.on { border-bottom-color: var(--brand); font-weight: 700; }
.subnav a.paused { color: var(--muted); }
.subnav .ico { width: 18px; height: 18px; }
.subnav-sep { width: 1px; height: 18px; background: var(--line-2); flex: none; margin: 0 -8px; }

/* ------------------------------------------------------------ búsqueda en píldora */
.search-pill {
  display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 6px 0 16px;
  border: 1px solid var(--muted); border-radius: 99px; background: var(--bg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-pill:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search-pill .ico { color: var(--text-2); }
.search-pill input { flex: 1; border: 0; outline: 0; background: none; font: inherit; color: var(--text); min-width: 0; height: 100%; }
.search-pill input::placeholder { color: var(--text-2); }

/* ------------------------------------------------------------ botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 20px; border-radius: 99px; border: 1px solid transparent;
  font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-line { background: var(--bg); border-color: var(--line-2); color: var(--text); }
.btn-line:hover { border-color: var(--brand); color: var(--brand-ink); }
.btn-danger { background: var(--bg); border-color: var(--line-2); color: var(--neg); margin-right: auto; }
.btn-danger:hover { border-color: var(--neg); }
.btn-small { height: 32px; padding: 0 14px; font-size: .8rem; }
.btn-block { width: 100%; height: 46px; font-size: 1rem; }
.link-btn { border: 0; background: none; color: var(--brand-ink); font-weight: 700; cursor: pointer; padding: 0 0 0 4px; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center;
  border: 0; background: rgba(255, 255, 255, .92); color: var(--text); cursor: pointer;
  box-shadow: 0 1px 4px rgba(37, 50, 56, .18); transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.icon-btn:hover { color: var(--brand-ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .ico { width: 16px; height: 16px; }
.icon-btn-line { box-shadow: none; border: 1px solid var(--line-2); background: var(--bg); }
.icon-btn-line:hover { border-color: var(--brand); }
.follow-btn.is-on { color: var(--brand-ink); border-color: var(--brand); background: var(--brand-soft); }
.follow-btn.is-on .ico { fill: currentColor; }

/* ------------------------------------------------------------ página */
.page { max-width: var(--content); margin: 0 auto; padding: 28px 16px 80px; }
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.flash-error { background: #fdecec; color: #b42318; }
.error-line { color: var(--neg); font-size: .84rem; margin: -6px 0 10px; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--bg-2); color: var(--text-2); vertical-align: middle; }
.tag-on { background: var(--brand-soft); color: var(--brand-ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-ok { background: var(--brand); }
.dot-warn { background: var(--warn); }
.dot-bad { background: var(--neg); }

/* hero */
.hero { text-align: center; padding: 34px 0 30px; }
.hero h1 { font-size: 1.75rem; }
.hero p { font-size: 1.45rem; margin: 0 0 30px; color: var(--text); }
.hero-search { display: flex; align-items: center; gap: 12px; max-width: 1030px; margin: 0 auto; }
.hero-search .search-pill { flex: 1; height: 40px; }
.hero-search .btn { height: 32px; padding: 0 22px; }

.status-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 34px; }
.pill-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: var(--bg-2); font-size: .82rem; color: var(--text-2); }
.pill-bad { background: #fdecec; color: #b42318; }

/* estanterías (carruseles) */
.shelf { margin-bottom: 44px; }
.shelf.is-paused .rail { opacity: .55; }
.shelf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.shelf-head h2 { font-size: 1.65rem; margin: 0 0 2px; letter-spacing: -.01em; }
.shelf-sub { margin: 0; color: var(--text-2); font-size: 1rem; }
.shelf-sub b { color: var(--text); }
.shelf-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.see-all { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: .86rem; margin-left: 8px; }
.see-all .ico { width: 16px; height: 16px; }
.shelf-empty { padding: 30px 0; }

.rail-wrap { position: relative; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 177px; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-bottom: 14px; scrollbar-width: thin; scrollbar-color: #b0bec5 transparent;
}
.rail::-webkit-scrollbar { height: 5px; }
.rail::-webkit-scrollbar-thumb { background: #b0bec5; border-radius: 99px; }
.rail .card-item { scroll-snap-align: start; }
.rail-btn {
  position: absolute; top: 95px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: #fff; color: var(--text); box-shadow: 0 2px 10px rgba(37, 50, 56, .22);
  display: grid; place-items: center; cursor: pointer; transition: opacity .15s ease;
}
.rail-btn.prev { left: -12px; }
.rail-btn.next { right: -12px; }
.rail-btn[hidden] { display: none; }

/* ------------------------------------------------------------ tarjeta de anuncio */
.card-item { position: relative; min-width: 0; }
.card-media { display: block; position: relative; aspect-ratio: 177 / 214; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.card-media:hover img { transform: scale(1.03); }
.no-img { display: block; width: 100%; height: 100%; }
.card-item.is-gone .card-media img { filter: grayscale(.85); opacity: .7; }
.card-item.is-excluded { opacity: .45; }
.flag { position: absolute; left: 8px; top: 8px; font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.flag.static { position: static; box-shadow: none; }
.flag-deal { background: var(--brand); color: #fff; }
.flag-reserved { background: #dc2626; color: #fff; }
.flag-gone { background: var(--text); color: #fff; }
.card-tools { position: absolute; right: 8px; top: 8px; opacity: 0; transition: opacity .15s ease; }
.card-item:hover .card-tools, .card-item.is-excluded .card-tools { opacity: 1; }
@media (hover: none) { .card-tools { opacity: 1; } }
.card-body { padding: 9px 2px 0; display: grid; gap: 2px; }
.card-price { font-weight: 800; font-size: 1rem; }
.card-price s { font-weight: 600; font-size: .8rem; color: var(--muted); margin-left: 3px; }
.card-title { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-ship { display: flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; }
.card-ship .ico { width: 14px; height: 14px; }
.ship-yes { color: var(--ship); }
.ship-no { color: var(--text-2); font-weight: 600; }
.card-meta { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-margin { justify-self: start; margin-top: 3px; font-size: .74rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.card-margin.pos { background: var(--brand-soft); color: var(--brand-ink); }
.card-margin.neg { background: #fdecec; color: #c0262d; }

.grid-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 26px 14px; }

/* ------------------------------------------------------------ análisis */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.kpi span { font-size: .8rem; color: var(--text-2); font-weight: 600; }
.kpi strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.kpi em { font-style: normal; font-size: .8rem; color: var(--muted); }
.panel { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; min-width: 0; }
.panel-head p { margin: -6px 0 14px; }
.margin-box { margin-bottom: 14px; }
.margins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.margin { background: var(--bg-2); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.margin span { font-size: .82rem; color: var(--text-2); font-weight: 600; }
.margin strong { font-size: 1.4rem; font-weight: 800; }
.margin em { font-style: normal; font-size: .78rem; color: var(--muted); }
.margin.pos strong { color: var(--pos); }
.margin.neg strong { color: var(--neg); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.chart-box { position: relative; height: 240px; }

.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th { text-align: left; font-size: .74rem; color: var(--text-2); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th.right { text-align: right; }
.table td { padding: 8px; border-bottom: 1px solid var(--line); }
.table td.right { white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

.listing { margin-top: 36px; }
.listing-head h2 { font-size: 1.5rem; margin-bottom: 12px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 22px; }
.filter-bar .sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
.chip { height: 34px; display: inline-flex; align-items: center; padding: 0 15px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--text); font-size: .84rem; font-weight: 600; transition: border-color .15s ease, background-color .15s ease; }
.chip:hover { border-color: var(--text-2); }
.chip.on { background: var(--text); border-color: var(--text); color: #fff; }
.sort-form { margin: 0 0 0 auto; }
.select-pill {
  height: 34px; display: inline-flex; align-items: center; gap: 4px; padding: 0 6px 0 15px; border-radius: 99px;
  border: 1px solid var(--line-2); font-size: .84rem; font-weight: 600; color: var(--text-2);
}
.select-pill:focus-within { border-color: var(--brand); }
.select-pill select { border: 0; background: none; font: inherit; font-weight: 700; color: var(--text); cursor: pointer; outline: 0; padding: 0 4px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 30px; }
.legend { margin-top: 24px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.empty { text-align: center; padding: 50px 20px; }

/* ------------------------------------------------------------ formularios */
.form-page { max-width: 760px; margin: 0 auto; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .88rem; margin-bottom: 10px; }
.form-page h1 { margin-bottom: 20px; }
.form { display: grid; gap: 14px; }
.form-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 14px; }
.form-card h2 { margin: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { grid-template-columns: repeat(3, 1fr); }
.row-4 { grid-template-columns: repeat(4, 1fr); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--text); }
.field small { font-weight: 500; color: var(--text-2); }
.field input, .field textarea {
  font: inherit; font-size: .95rem; font-weight: 500; color: var(--text); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field textarea { resize: vertical; }
.hint { font-size: .82rem; color: var(--text-2); margin: 0; }
.switches { display: flex; gap: 28px; flex-wrap: wrap; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { width: 42px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; transition: background-color .2s ease; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s ease; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-soft); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* login */
.login { max-width: 380px; margin: 50px auto; display: grid; gap: 14px; text-align: center; }
.login-logo { display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 6px; }
.login-logo .logo-mark { width: 44px; height: 44px; }
.login-logo .logo-word { font-size: 2.1rem; }
.login .field { text-align: left; }
.login p { margin: -8px 0 8px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .cols { grid-template-columns: 1fr; }
  .row-4 { grid-template-columns: 1fr 1fr; }
  .top-link span { display: none; }
}
@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .btn-sell span { display: none; }
  .btn-sell { width: 40px; padding: 0; }
  .subnav-inner { padding: 0 16px; }
  .hero { padding: 12px 0 20px; }
  .hero h1 { font-size: 1.4rem; }
  .hero p { font-size: 1.1rem; margin-bottom: 18px; }
  .hero-search .btn { padding: 0 14px; }
  .shelf-head { flex-direction: column; align-items: flex-start; }
  .shelf-head h2 { font-size: 1.3rem; }
  .shelf-sub { font-size: .88rem; }
  .rail { grid-auto-columns: 150px; }
  .rail-btn { display: none; }
  .row, .row-3, .row-4, .margins { grid-template-columns: 1fr; }
  .grid-items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .kpi strong { font-size: 1.3rem; }
  h1 { font-size: 1.5rem; }
  .form-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* retoques */
.field small { font-size: .78rem; line-height: 1.35; }
.card-margin.zero { background: var(--bg-2); color: var(--text-2); }
.margin.zero strong { color: var(--text-2); }

/* gangas */
.margins { grid-template-columns: repeat(4, 1fr); }
.deal-tile { background: var(--brand); color: #fff; }
.deal-tile span, .deal-tile em { color: rgba(255, 255, 255, .88); }
.deal-tile strong { color: #fff; }
.model-box { margin-bottom: 14px; }
.segmented { display: inline-flex; padding: 4px; gap: 4px; background: var(--bg-2); border-radius: 99px; justify-self: start; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 99px; font-weight: 700; font-size: .88rem; color: var(--text-2); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.segmented input:checked + span { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(37, 50, 56, .15); }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); }
@media (max-width: 900px) { .margins { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .margins { grid-template-columns: 1fr; } }

/* coches */
#search-form:has(input[name=kind][value=car]:checked) .general-only { display: none; }
#search-form:not(:has(input[name=kind][value=car]:checked)) .car-only { display: none; }
.kind-switch { justify-self: start; }
.kind-switch span { height: 40px; padding: 0 22px; font-size: .95rem; }
.segmented { flex-wrap: wrap; }
.field > .segmented { margin-top: 2px; }
.chip-checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 99px;
  border: 1px solid var(--line-2); font-size: .84rem; font-weight: 600; color: var(--text); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.chip-check span:hover { border-color: var(--text-2); }
.chip-check input:checked + span { background: var(--text); border-color: var(--text); color: #fff; }
.chip-check input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
.card-car { font-size: .8rem; color: var(--text); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.card-car2 { font-size: .74rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eco { display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 99px; font-size: .66rem; font-weight: 800; color: #fff; background: var(--muted); }
.eco-0 { background: #1f6fd1; }
.eco-eco { background: linear-gradient(90deg, #1f6fd1 50%, #2ea44f 50%); }
.eco-c { background: #2ea44f; }
.eco-b { background: #e0a800; color: #3b2600; }

/* vendedor */
.card-seller { font-size: .74rem; font-weight: 700; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-seller.risky { color: #b45309; }
.card-seller.risky::before { content: "⚠ "; }

/* avisos: destinatarios */
.recipients { display: grid; gap: 10px; margin-bottom: 18px; }
.recipient { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; scroll-margin-top: 140px; }
.recipient:target { border-color: var(--brand); }
.recipient.is-paused { opacity: .6; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; flex: none; }
.recipient-body { flex: 1; min-width: 0; }
.recipient-name { font-weight: 800; }
.recipient-state { font-size: .82rem; margin-top: 2px; }
.state-ok { color: var(--pos); }
.state-pending, .state-paused { color: #b45309; }
.state-none { color: var(--text-2); }
.state-error { color: var(--neg); }
.recipient-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.add-recipient { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; align-items: start; }
.add-recipient > .btn { margin-top: 24px; }
.pass-form { flex-basis: 100%; display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; padding-top: 12px; border-top: 1px solid var(--line); }
.pass-form[hidden] { display: none; }
.matrix td, .matrix th { vertical-align: middle; }
.matrix th.center, .matrix td.center { text-align: center; }
.matrix tr.is-off td { opacity: .55; }
.switch-only { justify-content: center; }
.col-toggle { font-size: .72rem; padding: 0; font-weight: 600; }
@media (max-width: 600px) {
  .recipient-actions { width: 100%; justify-content: flex-start; }
  .add-recipient, .pass-form { grid-template-columns: 1fr; }
  .add-recipient > .btn { margin-top: 0; }
}
.panel + .panel { margin-top: 14px; }

/* regulador automático */
.tune { display: grid; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); }
.tune .switch { font-weight: 600; }
#search-form:not(:has(input[name=auto_tune]:checked)) .tune-fields { display: none; }
#search-form:has(input[name=alert_mode][value=all]:checked) .tune { display: none; }
.tune-now { font-size: 1.5rem; font-weight: 800; color: var(--brand-ink); line-height: 1.2; }
.tune .field input { background: var(--bg); }
