:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #16181d;
  --muted: #666c78;
  --border: #dfe2e8;
  --accent: #0b6bcb;
  --accent-text: #ffffff;
  --ok: #12855b;
  --warn: #b06000;
  --bad: #c02b2b;
  --code-bg: #f0f1f4;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --card: #1c1f25;
    --text: #e9ebef;
    --muted: #9aa2b1;
    --border: #2c313a;
    --accent: #4c9bee;
    --accent-text: #0b1220;
    --ok: #3ecf8e;
    --warn: #e0a33a;
    --bad: #f0736b;
    --code-bg: #23272f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

h1 { font-size: 18px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 4px; }
h3 { font-size: 14px; margin: 22px 0 8px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

a { color: var(--accent); }
code { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; font-size: .9em; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.status { color: var(--muted); font-size: 13px; }

.nav-tabs {
  display: flex; align-items: center; gap: 4px;
  background: var(--code-bg); padding: 4px; border-radius: 10px;
}
.nav-tab {
  border: none; background: transparent; color: var(--muted);
  padding: 6px 14px; font-size: 13px; font-weight: 500; font-family: inherit;
  border-radius: 7px; cursor: pointer; transition: all 0.15s ease;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.nav-tab:hover { color: var(--text); }
.nav-tab.active {
  background: var(--card); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.tab-badge {
  background: var(--accent); color: var(--accent-text);
  font-size: 11px; padding: 1px 6px; border-radius: 999px; font-weight: 700;
}
.nav-tab-login {
  color: var(--muted);
  gap: 6px;
}
.nav-tab-login:hover {
  color: var(--accent);
}
.nav-tab-login svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.tab-content { display: none; }
.tab-content.active { display: flex; flex-direction: column; gap: 20px; }

.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.dot.off { background: var(--bad); }

main { max-width: 1060px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.count { color: var(--muted); font-weight: 400; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 14px; }
.empty { color: var(--muted); text-align: center; padding: 28px; }

.row { display: flex; gap: 8px; }
.row input { flex: 1; }

input[type="text"], input[type="url"], input[type="number"], input[type="password"], select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input:disabled { opacity: .5; }

label { display: block; font-size: 13px; color: var(--muted); }
label > input, label > select { margin-top: 4px; }
label small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }

.grid2, .grid3 { display: grid; gap: 14px; }
.grid2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.indent { padding-left: 26px; margin-bottom: 6px; }

.check { display: flex; align-items: flex-start; gap: 8px; color: var(--text); font-size: 14px; }
.check input { margin-top: 3px; flex: none; width: auto; }
.check.inline { align-items: center; align-self: end; }
.check span strong { font-weight: 600; }

.channel {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0;
}

.btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.primary:hover:not(:disabled) { color: var(--accent-text); filter: brightness(1.08); }
.btn.danger:hover:not(:disabled) { border-color: var(--bad); color: var(--bad); }

.btn.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex: none;
  transition: all 0.15s ease;
  color: var(--muted);
}
.btn.btn-icon:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
}
.btn.btn-icon.danger:hover:not(:disabled) {
  border-color: var(--bad);
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 8%, var(--card));
}
.btn.btn-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  display: block;
  pointer-events: none;
  transition: transform 0.15s ease;
}
.btn.btn-icon:hover:not(:disabled) svg {
  transform: scale(1.12);
}
.btn.btn-icon.busy svg {
  animation: iconSpin 0.75s linear infinite;
}
@keyframes iconSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.btn.btn-stock {
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex: none;
  transition: filter 0.15s ease, background-color 0.15s ease;
}
.btn.btn-stock.in-stock {
  background-color: #15803d;
  border-color: #15803d;
  color: #ffffff;
}
.btn.btn-stock.in-stock:hover:not(:disabled) {
  background-color: #166534;
  border-color: #166534;
  color: #ffffff;
  filter: brightness(1.08);
}
.btn.btn-stock.out-of-stock {
  background-color: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}
.btn.btn-stock.out-of-stock:hover:not(:disabled) {
  background-color: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
  filter: brightness(1.08);
}

@media (prefers-color-scheme: dark) {
  .btn.btn-stock.in-stock {
    background-color: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
  }
  .btn.btn-stock.in-stock:hover:not(:disabled) {
    background-color: #22c55e;
    border-color: #22c55e;
    color: #ffffff;
  }
  .btn.btn-stock.out-of-stock {
    background-color: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
  }
  .btn.btn-stock.out-of-stock:hover:not(:disabled) {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
  }
}

.actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; }

.msg { font-size: 13px; min-height: 18px; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--bad); }
.msg.busy { color: var(--muted); }

/* ---------- cabecera de vista ---------- */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.view-title h2 { margin: 0; font-size: 18px; }
.view-title .hint { margin: 2px 0 0; }
.view-actions { display: flex; align-items: center; gap: 8px; }

.btn-toggle-filters {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: relative;
  font-weight: 500;
}
.btn-toggle-filters.active {
  background: var(--card);
  color: var(--accent);
  border-color: var(--accent);
}
.filter-active-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}
.filter-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- filtros ---------- */
.filter-card {
  padding: 16px 20px;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 18px;
  align-items: flex-end;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.filter-price-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-price-inputs input {
  min-width: 0;
}
.dash {
  color: var(--muted);
}
.filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- catálogo en cuadrícula ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}
.watch-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.watch-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}
.watch-card.disabled {
  opacity: 0.65;
}
.watch-card-img-link {
  text-decoration: none;
  display: block;
}
.watch-card-img-wrap {
  height: 190px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  background: color-mix(in srgb, var(--card) 92%, var(--border));
  border-radius: 8px;
  overflow: hidden;
  padding: 12px;
}
.watch-card-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}
.watch-card:hover .watch-card-img {
  transform: scale(1.03);
}
.watch-card-stock-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.watch-card-title {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  line-height: 1.45;
  color: var(--text);
  margin: 0 0 10px 0;
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 0;
}
.watch-title-link {
  text-decoration: none;
  color: inherit;
}
.watch-title-link:hover .watch-card-title {
  color: var(--accent);
}
.watch-card-price-wrap {
  text-align: center;
  margin-bottom: 10px;
}
.watch-card-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.price-savings {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.price-ref {
  color: var(--muted);
}
.price-save-tag {
  color: var(--ok);
  font-weight: 600;
}
.watch-card-meta {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.4;
}
.watch-card .badges {
  justify-content: center;
  margin-top: 0;
  margin-bottom: 14px;
}
.watch-card .watch-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.watch-card .history,
.watch-card .editor {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.list { display: flex; flex-direction: column; gap: 12px; }

.watch {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.watch.disabled { opacity: .6; }
.watch-head { display: flex; align-items: flex-start; gap: 12px; }
.watch-title { flex: 1; min-width: 0; }
.watch-title h3 {
  margin: 0; font-size: 15px; text-transform: none; letter-spacing: 0;
  color: var(--text); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.watch-title a { text-decoration: none; }
.watch-meta { color: var(--muted); font-size: 13px; margin-top: 3px; }
.watch-actions { display: flex; gap: 6px; flex: none; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge {
  font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: var(--code-bg); color: var(--muted); border: 1px solid var(--border);
}
.badge.price { color: var(--ok); }
.badge.stock { color: var(--warn); }
.badge.err { color: var(--bad); }

.price-now { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); line-height: 28px; white-space: nowrap; flex: none; }

.editor { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.editor fieldset { border: none; margin: 0 0 14px; padding: 0; }
.editor legend { font-size: 13px; color: var(--muted); padding: 0 0 8px; }
.rule-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rule-row .check { flex: none; min-width: 210px; }
.rule-row input[type="number"] { width: 120px; }
.rule-row small { color: var(--muted); font-size: 12px; }

.preview {
  display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap;
  background: var(--code-bg); border-radius: 8px; padding: 12px; margin-bottom: 14px; font-size: 14px;
}
.preview ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; width: 100%; }

.log {
  margin: 0;
  max-height: 320px;
  overflow: auto;
  background: var(--code-bg);
  border-radius: 8px;
  padding: 12px;
  font: 12px/1.6 ui-monospace, "Cascadia Code", Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
}

/* ---------- historial de precios ---------- */

.history { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

.history-head { display: flex; flex-wrap: wrap; gap: 28px; margin-bottom: 8px; }
.figure { display: flex; flex-direction: column; gap: 2px; }
.figure-label { font-size: 12px; color: var(--muted); }
/* Cifras grandes con figuras proporcionales: tabular-nums las dejaría sueltas. */
.figure strong { font-size: 22px; font-weight: 600; }
.figure small { font-size: 12px; color: var(--muted); }
.figure small.ok-text { color: var(--ok); }

.chart-wrap { position: relative; margin: 4px 0 16px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }

.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .area { fill: var(--accent); fill-opacity: .1; stroke: none; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.chart .cursor { stroke: var(--muted); stroke-width: 1; }
/* El texto lleva tokens de tinta, nunca el color de la serie. */
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .point-label { fill: var(--text); font-size: 12px; font-weight: 600; }

.tooltip {
  position: absolute;
  transform: translate(-50%, -140%);
  pointer-events: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgb(0 0 0 / .16);
  display: flex;
  flex-direction: column;
}
.tooltip strong { font-variant-numeric: tabular-nums; }
.tooltip span { color: var(--muted); }

.stats-wrap { overflow-x: auto; }
.stats { width: 100%; min-width: 330px; border-collapse: collapse; font-size: 13px; }
.stats th, .stats td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.stats thead th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.stats tbody th { text-align: left; font-weight: 600; }
.stats tbody th small { font-weight: 400; color: var(--muted); }
.stats td { font-variant-numeric: tabular-nums; }
.stats tbody tr:last-child th, .stats tbody tr:last-child td { border-bottom: none; }
.stats .muted-row td { text-align: left; color: var(--muted); }

/* ---------- modal popup ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.15s ease-out;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 24px 12px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 5;
}
.modal-title-wrap h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.35;
}
.modal-title-wrap .hint {
  margin: 2px 0 0;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
  margin-left: 12px;
}
.modal-close:hover {
  background: var(--code-bg);
  color: var(--text);
}
.modal-body {
  padding: 20px 24px 24px;
}
/* ---------- camelcamelcamel (amazon) ---------- */
.camel-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.camel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.camel-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.camel-badge {
  background: #c9510c;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-block;
}
.camel-btn {
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--card);
}
.camel-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.camel-chart-wrap {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.camel-chart-img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.camel-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- botón y modal de instalación pwa ---------- */
.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-weight: 500;
  transition: all 0.18s ease;
}
.btn-install:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}
.btn-install svg {
  flex-shrink: 0;
}

.modal-install-card {
  max-width: 520px;
}
.install-modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.install-benefits {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.install-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.install-benefit-icon {
  font-size: 22px;
  line-height: 1.2;
}
.install-benefit-item strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.install-benefit-item .hint {
  margin: 0;
  font-size: 12px;
}
.install-guide {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
.install-guide strong {
  color: var(--accent);
}
.install-guide ol {
  margin: 6px 0 0 18px;
  padding: 0;
}
.install-guide li {
  margin-bottom: 4px;
}
.install-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 8px;
}
.install-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.btn-install-ready {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}
.install-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.hidden { display: none !important; }

/* ---------- administración y auth ---------- */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--card);
}
.admin-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-badge {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.admin-user-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.modal-auth-card {
  max-width: 420px;
}
.auth-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

@media (max-width: 860px) {
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .topbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .topbar-right { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
  main { padding: 16px; }
  .filter-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- toast de notificación ---------- */
.app-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #f8fafc;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
  text-align: center;
  max-width: 90vw;
}
.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

