/* ═════════ Amiguitos Perú — panel, azul de confianza, Inter + Sora (oscuro por defecto, claro con [data-theme="light"]) ═════════
   Cuadrícula de 8 px · controles de 44 px · esquinas 10 px (controles) / 12 px (tarjetas) · contenido máx. 1200 px centrado. */
:root {
  --bg: #060a14;
  --side: #0a1020;
  --top: #080d1a;
  --panel: #0e1628;
  --panel-2: #131d33;
  --panel-3: #19243d;
  --field: #0a1120;
  --text: #edf2ff;
  --text-2: #c5d0e8;
  --muted: #94a3c4;
  --faint: #7b8cb0;
  --line: #1c2740;
  --line-soft: #162035;
  --line-strong: #2a3857;
  --accent: #2f6bff;
  --accent-hover: #4c80ff;
  --accent-soft: #101d3d;
  --accent-line: rgba(76, 128, 255, .55);
  --accent-text: #8fb2ff;
  --link: #8fb2ff;
  --on-accent: #fff;
  --ok: #4ade80;   --ok-bg: #0c2a22;
  --warn: #fbbf24; --warn-bg: #2c2410;
  --bad: #f87171;  --bad-bg: #2d1417;  --bad-line: #3a2328;
  --info: #7cb4ff; --info-bg: #10203c;
  --r: 10px;
  --r-lg: 12px;
  --h: 44px;
  --side-w: 248px;
  --display: "Sora", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f9ff;
  --side: #ffffff;
  --top: #ffffff;
  --panel: #ffffff;
  --panel-2: #f3f6fd;
  --panel-3: #e9eef9;
  --field: #ffffff;
  --text: #0a1530;
  --text-2: #26334f;
  --muted: #55647f;
  --faint: #6b7a97;
  --line: #dde5f3;
  --line-soft: #e9eef9;
  --line-strong: #c5d1e8;
  --accent: #1d5bff;
  --accent-hover: #0f49e6;
  --accent-soft: #e8efff;
  --accent-line: rgba(29, 91, 255, .4);
  --accent-text: #1d4fe0;
  --link: #1d4fe0;
  --ok: #047857;   --ok-bg: #d1fae5;
  --warn: #92400e; --warn-bg: #fef3c7;
  --bad: #be123c;  --bad-bg: #ffe4e6;  --bad-line: #fecdd3;
  --info: #1d4ed8; --info-bg: #dbeafe;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh;
  font: 500 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text); background: var(--bg);
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--accent-text); }
h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0; line-height: 1.3; }
h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 16px; }
b, strong { font-weight: 700; }
small, .muted { color: var(--muted); }
::selection { background: var(--accent); color: #fff; }
.ico { width: 18px; height: 18px; flex: 0 0 18px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ═════════ Barra lateral ═════════ */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 30;
  display: flex; flex-direction: column; gap: 24px; padding: 24px 16px;
  background: var(--side); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-txt b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-txt small { font-size: 12px; }
.brand-txt small.admin { color: var(--warn); font-weight: 600; }
.logo { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; background: linear-gradient(135deg, #3b82ff, #1746d6); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.logo .ico { width: 20px; height: 20px; flex-basis: 20px; }
.nav { flex: 1; overflow-y: auto; margin: 0 -8px; padding: 0 8px; scrollbar-width: thin; display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; flex: 0 0 40px; height: 40px; padding: 0 12px;
  border-radius: var(--r); color: var(--muted); font-weight: 500; transition: background .15s, color .15s;
}
:root:not([data-theme="light"]) .nav a { color: #b7c3de; }
.nav a em { font-style: normal; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.nav a.on .ico { color: var(--accent-text); }
.nav-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 0 12px 8px; }
.nav-title + a { margin-top: 0; }
.nav a + .nav-title { padding-top: 16px; }
.count { font-style: normal; font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #1a0b0d; display: grid; place-items: center; }

.side-foot { display: flex; flex-direction: column; gap: 8px; }
.side-btn {
  display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 600;
}
.side-btn .avatar { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 12px; text-transform: uppercase; }
.side-btn span.who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.side-btn small { font-weight: 500; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-btn:hover { color: var(--text); border-color: var(--accent-line); }
.side-btn.on { border-color: var(--accent-line); background: var(--accent-soft); }
.side-btn.out { justify-content: center; gap: 8px; height: var(--h); color: var(--bad); background: var(--bad-bg); border-color: var(--bad-line); }
.side-btn.out .ico { width: 16px; height: 16px; flex-basis: 16px; }
.side-btn.out:hover { color: var(--bad); border-color: var(--bad); }

/* ═════════ Barra superior ═════════ */
.shell { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  padding: 20px 32px; background: var(--top); border-bottom: 1px solid var(--line);
}
.page-head { flex: 1; min-width: 0; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; min-width: 40px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--panel); color: var(--text); font: 600 13px/1 inherit; font-family: inherit;
  cursor: pointer; list-style: none;
}
:root:not([data-theme="light"]) .icon-btn { border-color: #22304d; }
.icon-btn:hover { color: var(--text); border-color: var(--accent-line); }
.icon-btn .ico { width: 18px; height: 18px; color: var(--muted); }
.icon-btn.wide .ico:last-child { width: 14px; height: 14px; flex-basis: 14px; }
.icon-btn[data-toggle-theme] { padding: 0; width: 40px; }
.burger { display: none; }
.when-light { display: none; }
:root[data-theme="light"] .when-light { display: inline-flex; }
:root[data-theme="light"] .when-dark { display: none; }
.wallet-pill {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 14px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--text);
}
.wallet-pill:hover { color: var(--text); border-color: var(--accent-line); }
.wallet-pill > small { font-size: 12px; }
.wallet-pill b { font-variant-numeric: tabular-nums; }
.wallet-pill .plus { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; }
.wallet-pill .plus .ico { width: 14px; height: 14px; flex-basis: 14px; }

/* desplegables */
.dd { position: relative; }
.dd summary::-webkit-details-marker { display: none; }
.dd-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px; padding: 4px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .55); z-index: 40;
}
.dd-menu a { display: flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px; color: var(--text); font-weight: 600; font-size: 13px; }
.dd-menu a:hover { background: var(--panel-2); color: var(--text); }
.dd-menu a.on { color: var(--accent-text); background: var(--accent-soft); }

/* ═════════ Contenido ═════════ */
.main { width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.main > * { margin-top: 0; margin-bottom: 0; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; margin-bottom: 0;
}
.card + .card { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.card-head h2 { margin: 0; display: flex; align-items: center; }
.step { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 12px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 800; }
.grid { display: grid; gap: 24px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.grid.two.stretch { align-items: stretch; }
.grid.order { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.grid.order > div { display: flex; flex-direction: column; gap: 24px; }
.sticky { position: sticky; top: 104px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stats.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stat {
  display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 0 20px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.stat small { display: block; font-weight: 500; font-size: 12px; }
.stat b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.3; }
.stat-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-text); flex: 0 0 44px; }
.stat-ico .ico { width: 20px; height: 20px; flex-basis: 20px; }
.stat.ok .stat-ico { background: var(--ok-bg); color: var(--ok); }
.stat.warn .stat-ico { background: var(--warn-bg); color: var(--warn); }
.stat.info .stat-ico { background: var(--info-bg); color: var(--info); }
.stat:not(:has(.stat-ico)) { flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 16px 24px; }
.stat.big { min-height: 112px; }
.stat.big b { font-size: 30px; letter-spacing: -.02em; }
.stat.hero { background: var(--accent-soft); border-color: var(--accent-line); }
.stat.hero small { color: var(--accent-text); font-weight: 600; }

/* ═════════ Formularios ═════════ */
label { display: block; font-weight: 600; font-size: 13px; margin: 0 0 8px; color: var(--text-2); }
.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
input, select, textarea {
  font: inherit; font-weight: 500; width: 100%; height: var(--h); padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--field); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
:root:not([data-theme="light"]) :is(input, select, textarea) { border-color: #24324f; }
select { padding: 0 12px; }
textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; padding: 0; accent-color: var(--accent); vertical-align: middle; cursor: pointer; }
input[type=file] { height: auto; padding: 10px 14px; }
.input-icon { position: relative; }
.input-icon .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon input { padding-left: 42px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 20px; border: 1px solid transparent; border-radius: var(--r);
  font: inherit; font-weight: 700; cursor: pointer; color: var(--on-accent); background: var(--accent);
  transition: background .15s, border-color .15s, transform .05s; white-space: nowrap;
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.light { background: var(--panel-2); color: var(--text); border-color: var(--line-strong); }
.btn.light:hover { border-color: var(--accent-line); color: var(--text); }
.btn.danger { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover { border-color: var(--bad); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.btn.lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn.block { width: 100%; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 160px; }
.row > .btn, .row > .auto { flex: 0 0 auto; min-width: 0; }
.row > .field { margin-bottom: 0; }
.card > .row + .field, .card > .field + .row { margin-top: 20px; }
.inline { display: inline; }

/* ═════════ Tablas ═════════ */
.table-box { overflow-x: auto; }
.card.table-box { padding: 0; }
.card.table-box > h2, .card.table-box > p, .card.table-box > .card-head { margin: 0; padding: 20px 24px 16px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 0 12px; height: 56px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
th { height: 48px; color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; border-bottom-color: var(--line); }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.link { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.wrap { min-width: 220px; height: auto; padding-top: 12px; padding-bottom: 12px; }
td input, td select { height: 36px; padding: 0 10px; border-radius: 8px; }
td select { min-width: 130px; }
.cat-row td, tbody tr.cat-row:hover td { height: 40px; background: var(--panel-2); font-weight: 700; color: var(--text); font-size: 12px; }
tr.is-off td { opacity: .5; }
tr.is-off td:last-child, tr.is-off td.toggle { opacity: 1; }

/* ═════════ Avisos y etiquetas ═════════ */
.alert { display: flex; gap: 12px; align-items: center; border-radius: var(--r); padding: 14px 16px; font-weight: 600; border: 1px solid transparent; font-size: 13px; }
.alert::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: 0 0 8px; }
.alert.ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.alert.bad { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 28%, transparent); }
.alert.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.alert.info { background: var(--info-bg); color: var(--info); border-color: color-mix(in srgb, var(--info) 28%, transparent); }
.guest-box .alert { margin-bottom: 20px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; font-size: 12px; font-weight: 600; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.muted { background: var(--panel-3); color: var(--muted); }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); align-self: flex-start; max-width: 100%; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 13px; }
:root:not([data-theme="light"]) .tabs a { color: #b7c3de; }
.tabs a.on { background: var(--accent); color: #fff; font-weight: 600; }
.tabs a:hover { color: var(--text); }
.tabs a.on:hover { color: #fff; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.pager a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.pager a:hover { border-color: var(--accent-line); }
.pre { white-space: pre-line; }

/* interruptor (admin servicios) */
.tgl { position: relative; display: inline-block; width: 40px; height: 24px; cursor: pointer; margin: 0; }
.tgl input { opacity: 0; width: 0; height: 0; position: absolute; }
.tgl span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 99px; transition: background .15s; }
.tgl span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.tgl input:checked + span { background: var(--accent); }
.tgl input:checked + span::after { transform: translateX(16px); }
.tgl input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ═════════ Nuevo pedido ═════════ */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--field); color: var(--text-2); font: 500 13px/1 inherit; font-family: inherit; cursor: pointer;
}
:root:not([data-theme="light"]) .chip { border-color: #24324f; background: #0c1322; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); }
.chip small { color: var(--faint); font-weight: 600; }
.chip:hover { border-color: var(--accent-line); color: var(--text); }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); font-weight: 600; }
.summary .svc-title { font-weight: 700; line-height: 1.4; margin: 0 0 16px; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.kv div { background: var(--field); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 10px 14px; }
:root:not([data-theme="light"]) .kv div { border-color: #1c2740; }
.kv small { display: block; font-size: 12px; }
.kv b { font-variant-numeric: tabular-nums; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; margin-top: 0; border-top: 1px solid var(--line); font-weight: 600; }
.total b { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.summary-empty { text-align: center; color: var(--muted); padding: 16px 8px 24px; }
.summary-empty .ico { width: 32px; height: 32px; color: var(--faint); margin-bottom: 8px; }
.search-results { border: 1px solid var(--line-strong); border-radius: var(--r); max-height: 288px; overflow-y: auto; margin-top: 8px; display: none; background: var(--panel); box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); }
.search-results.open { display: block; }
.search-results button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--text); padding: 10px 14px; font: inherit; cursor: pointer; border-bottom: 1px solid var(--line-soft); }
.search-results button:hover { background: var(--panel-2); }
.search-results small { display: block; }
.svc-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* ═════════ Añadir fondos ═════════ */
.steps { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.steps li { display: flex; gap: 14px; }
.steps li .step { margin: 0; flex: 0 0 28px; }
.steps li b { display: block; }
.steps li span { color: var(--muted); font-size: 13px; }
.pay-box { padding: 16px; border-radius: var(--r); background: var(--field); border: 1px dashed var(--line-strong); color: var(--text-2); font-size: 13px; white-space: pre-line; margin-bottom: 20px; }
.moves { list-style: none; margin: 0; padding: 0; }
.moves li { display: flex; align-items: center; gap: 14px; min-height: 60px; border-bottom: 1px solid var(--line-soft); }
.moves li:last-child { border-bottom: 0; }
.moves .mv-ico { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: var(--r); }
.moves .mv-ico .ico { width: 16px; height: 16px; flex-basis: 16px; }
.moves .mv-ico.pos { background: var(--ok-bg); color: var(--ok); }
.moves .mv-ico.neg { background: var(--bad-bg); color: var(--bad); }
.moves .mv-ico.ret { background: var(--info-bg); color: var(--info); }
.moves .mv-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.moves .mv-txt b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moves .mv-txt small { font-size: 12px; }
.moves .mv-amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.moves .mv-amt small { display: block; font-weight: 500; font-size: 12px; }
.mv-amt.pos { color: var(--ok); } .mv-amt.neg { color: var(--bad); } .mv-amt.ret { color: var(--info); }

/* ═════════ Tickets / API / anuncios / vacíos ═════════ */
.thread { display: grid; gap: 12px; }
.msg { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; background: var(--panel); max-width: 760px; width: 100%; }
.msg.staff { border-color: var(--accent-line); background: var(--accent-soft); margin-left: auto; }
.msg header { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.msg header b { color: var(--text); }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
code, pre.code { font-family: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace; font-size: 13px; font-weight: 500; }
code { background: var(--panel-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
pre.code { background: var(--field); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; overflow-x: auto; margin: 12px 0 0; white-space: pre; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font-family: ui-monospace, Consolas, monospace; }
.post h2 { margin-bottom: 4px; }
.post time { display: block; color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.post p { margin: 0; white-space: pre-line; }
.empty { text-align: center; padding: 56px 24px; }
.empty .ico { width: 28px; height: 28px; color: var(--accent-text); }
.empty > .ico { box-sizing: content-box; padding: 14px; border-radius: var(--r-lg); background: var(--accent-soft); margin-bottom: 16px; }
.empty h2 { font-size: 18px; margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 460px; margin: 0 auto; }

/* ═════════ Entrar / registrarse ═════════ */
body.guest { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 72px 16px 32px; }
.guest-tools { position: fixed; top: 16px; right: 16px; display: flex; gap: 8px; }
.guest-back { position: fixed; top: 16px; left: 16px; }
.guest-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.guest-box .brand { justify-content: center; padding: 0; }
.guest-box .brand-txt b { font-size: 20px; }
.guest-box .logo { width: 44px; height: 44px; flex-basis: 44px; border-radius: var(--r-lg); }
.guest-box .logo .ico { width: 24px; height: 24px; }
.guest-box .card { width: 100%; padding: 32px; border-radius: 16px; }
.guest-box h1 { text-align: center; margin-bottom: 4px; }
.guest-box .guest-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.guest-box .btn { height: 48px; font-size: 15px; }
.guest-foot { text-align: center; color: var(--muted); font-size: 13px; margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.guest-foot a { font-weight: 600; }

/* ═════════ Portada ═════════ */
body.lp { background: var(--bg); }
.lp-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.lp-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.lp-head .lp-wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.lp-head .brand { padding: 0; }
.lp-links { display: flex; gap: 4px; margin: 0 auto; }
.lp-links a { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: var(--r); color: var(--muted); font-weight: 600; }
.lp-links a:hover { color: var(--text); background: var(--panel); }
.lp-actions { display: flex; align-items: center; gap: 8px; }
.lp-actions .btn { height: 40px; padding: 0 16px; }
.lp-hero { padding: 96px 0 72px; text-align: center; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 600; }
.lp-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.lp-hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.08; letter-spacing: -.035em; margin: 24px auto 20px; max-width: 820px; }
.lp-hero h1 span { color: var(--accent-text); }
.lp-hero p.lead { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto 32px; line-height: 1.6; }
.lp-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.lp-cta .btn { height: 52px; padding: 0 28px; font-size: 15px; border-radius: var(--r-lg); }
.lp-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 64px auto 0; max-width: 960px; }
.lp-facts div { padding: 20px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); }
.lp-facts b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.lp-facts small { font-size: 13px; }
.lp-nets { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.lp-nets span { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 600; color: var(--text-2); }
.lp-nets i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.lp-sec { padding: 88px 0; border-top: 1px solid var(--line); }
.lp-sec-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.lp-sec-head small { display: block; color: var(--accent-text); font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.lp-sec-head h2 { font-size: clamp(28px, 4vw, 36px); line-height: 1.15; letter-spacing: -.03em; font-weight: 800; margin: 0 0 12px; }
.lp-sec-head p { color: var(--muted); font-size: 16px; margin: 0; }
.lp-grid { display: grid; gap: 16px; }
.lp-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lp-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lp-card { padding: 24px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.lp-card h3 { margin: 8px 0 0; font-size: 16px; font-weight: 700; }
.lp-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.lp-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-text); }
.lp-ico .ico { width: 20px; height: 20px; flex-basis: 20px; }
.lp-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); background: var(--accent); color: #fff; font-weight: 800; font-size: 16px; }
.lp-plat { flex-direction: row; align-items: center; gap: 16px; }
.lp-plat .dot { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: var(--r); background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); font-weight: 800; font-size: 16px; }
.lp-plat div { display: flex; flex-direction: column; min-width: 0; }
.lp-plat b { font-size: 15px; }
.lp-plat small { font-size: 13px; }
.lp-table { margin-top: 24px; }
.lp-table .tabs { margin-bottom: 16px; }
.lp-faq { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.lp-faq details { border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); }
.lp-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 0 24px; font-weight: 700; cursor: pointer; list-style: none; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary .ico { color: var(--muted); transition: transform .2s; }
.lp-faq details[open] summary .ico { transform: rotate(180deg); }
.lp-faq details p { margin: 0; padding: 0 24px 20px; color: var(--muted); line-height: 1.6; }
.lp-band { padding: 48px; border-radius: 16px; background: var(--accent-soft); border: 1px solid var(--accent-line); text-align: center; }
.lp-band h2 { font-size: clamp(26px, 3.5vw, 32px); letter-spacing: -.03em; font-weight: 800; margin: 0 0 12px; }
.lp-band p { color: var(--muted); margin: 0 auto 28px; max-width: 520px; font-size: 16px; }
.lp-foot { border-top: 1px solid var(--line); padding: 32px 0; }
.lp-foot .lp-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 13px; }
.lp-foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.lp-foot a { color: var(--muted); }
.lp-foot a:hover { color: var(--text); }

/* ═════════ Móvil ═════════ */
@media (max-width: 1080px) {
  .grid.order { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .lp-grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid.two { grid-template-columns: minmax(0, 1fr); }
  .lp-links { display: none; }
  .lp-head .lp-actions { margin-left: auto; }
  .lp-grid.g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .side { transform: translateX(-100%); transition: transform .2s; }
  #nav-toggle:checked ~ .side { transform: none; box-shadow: 0 0 50px rgba(0,0,0,.5); }
  #nav-toggle:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 25; }
  .shell { margin-left: 0; }
  .burger { display: inline-flex; padding: 0; width: 44px; height: 44px; }
  .topbar { padding: 12px 16px; gap: 12px; flex-wrap: nowrap; }
  .page-head h1 { font-size: 18px; }
  .page-head p { display: none; }
  .main { padding: 20px 16px 32px; gap: 16px; }
  .card { padding: 20px 16px; }
  .top-actions .dd, .top-actions [data-toggle-theme] { display: none; }
  .wallet-pill > small { display: none; }
  .lp-wrap { padding: 0 16px; }
  .lp-hero { padding: 64px 0 48px; }
  .lp-sec { padding: 64px 0; }
  .lp-band { padding: 32px 20px; }
}
@media (max-width: 560px) {
  .lp-grid.g3, .lp-grid.g4 { grid-template-columns: minmax(0, 1fr); }
  .lp-head .lp-actions .btn.light, .lp-head .lp-actions .dd { display: none; }
  .lp-cta .btn { width: 100%; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 12px; gap: 10px; min-height: 72px; }
  .stat-ico { width: 36px; height: 36px; flex-basis: 36px; }
  .stat b { font-size: 16px; }
  .kv { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.scrim { display: none; }
.moves .mv-amt small { color: var(--muted); }
td.wrap small { display: block; font-size: 12px; }
.lp-facts small { display: block; }
.lp-plat:hover { border-color: var(--accent-line); }
.lp-hero h1 { text-wrap: balance; }
.lp-hero h1 span { display: block; }
.lp-plats { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.lp-plats > .lp-card { flex: 0 1 270px; }
.lp-table .tabs { display: flex; width: fit-content; margin: 0 auto 16px; }

/* ═════════ Contraseña con ojito ═════════ */
.pw { position: relative; }
.pw input { padding-right: 48px; }
.pw-eye { position: absolute; top: 0; right: 0; width: 44px; height: var(--h); display: grid; place-items: center; background: none; border: 0; color: var(--faint); cursor: pointer; border-radius: 0 var(--r) var(--r) 0; }
.pw-eye:hover { color: var(--text); }
.pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.pw-eye .ico { width: 18px; height: 18px; }
.pw-eye .eye-off, .pw-eye[aria-pressed="true"] .eye-on { display: none; }
.pw-eye[aria-pressed="true"] .eye-off { display: inline-flex; }
input::-ms-reveal { display: none; }

/* ═════════ Entrar con Google / Discord ═════════ */
.social { display: grid; gap: 10px; }
.social-btn { width: 100%; justify-content: center; gap: 10px; font-weight: 600; }
.social-btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--faint); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ═════════ Portada: texto a la izquierda, acceso a la derecha ═════════ */
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 56px; align-items: center; text-align: left; }
.lp-hero-grid .lp-eyebrow { margin: 0; }
.lp-hero-grid h1 { margin: 24px 0 20px; max-width: none; font-size: clamp(36px, 5vw, 56px); }
.lp-hero-grid p.lead { margin: 0 0 32px; max-width: 560px; }
.lp-hero-grid .lp-cta, .lp-hero-grid .lp-nets { justify-content: flex-start; }
.lp-hero-grid .lp-nets { margin-top: 32px; }
.lp-auth-card { padding: 28px; border-radius: 16px; box-shadow: 0 24px 60px -32px rgba(0, 0, 0, .6); }
.lp-auth-card h2 { font-size: 20px; margin: 0 0 4px; }
.lp-auth-sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.lp-auth-card .btn.block { height: 48px; font-size: 15px; }
.lp-auth-card .field { margin-bottom: 16px; }
.lp-auth-card form .btn { margin-top: 4px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 24px; border-radius: var(--r-lg); background: var(--field); border: 1px solid var(--line); }
.seg button { height: 38px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--accent); color: #fff; }
.lp-auth-me { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.lp-auth-me .avatar { display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; text-transform: uppercase; width: 48px; height: 48px; flex: 0 0 48px; font-size: 18px; }
.lp-auth-me p { margin: 0; color: var(--muted); font-size: 13px; }
.lp-hero .lp-facts { margin-top: 64px; max-width: none; }
#acceso { scroll-margin-top: 96px; }
@media (max-width: 1000px) {
  .lp-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; text-align: center; }
  .lp-hero-grid p.lead { margin: 0 auto 32px; }
  .lp-hero-grid .lp-cta, .lp-hero-grid .lp-nets { justify-content: center; }
  .lp-auth { width: 100%; max-width: 440px; margin: 0 auto; text-align: left; }
}
@media (max-width: 560px) {
  .lp-auth-card { padding: 24px 16px; }
  .lp-hero .lp-facts { margin-top: 40px; }
}

/* Recordar acceso + ¿olvidaste tu contraseña? + pie de la tarjeta */
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: -4px 0 20px; font-size: 13px; }
.login-row .check { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--text-2); font-weight: 500; cursor: pointer; }
.login-row a { font-weight: 600; }
.lp-auth-foot { text-align: center; color: var(--muted); font-size: 13px; margin: 20px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.lp-auth-foot a { font-weight: 600; }

/* ═════════ Marca: títulos en Sora, botón principal con brillo azul ═════════ */
h1, h2, h3, .brand-txt b, .stat b, .wallet-pill b { font-family: var(--display); letter-spacing: -.02em; word-spacing: .07em; }
.brand-txt b { font-weight: 700; }
.logo .ico { stroke-width: 2.2; }
.guest-box .card { border-radius: 20px; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .7); }
body.guest { background: radial-gradient(720px 420px at 50% -10%, rgba(47, 107, 255, .22), transparent 65%), var(--bg); }
:root[data-theme="light"] body.guest { background: radial-gradient(720px 420px at 50% -10%, rgba(29, 91, 255, .14), transparent 65%), var(--bg); }

/* ═════════ Guías (artículos): /guide.php ═════════ */
body.doc { display: flex; flex-direction: column; background: radial-gradient(720px 420px at 50% -10%, rgba(47, 107, 255, .2), transparent 65%), var(--bg); }
:root[data-theme="light"] body.doc { background: radial-gradient(720px 420px at 50% -10%, rgba(29, 91, 255, .12), transparent 65%), var(--bg); }
.doc-wrap { width: 100%; max-width: 780px; margin: 0 auto; padding: 0 24px; }
.doc-head { border-bottom: 1px solid var(--line); }
.doc-head .doc-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; max-width: 1180px; }
.doc-head .brand { padding: 0; }
.doc-actions { display: flex; align-items: center; gap: 8px; }
.doc-main { flex: 1; padding-top: 32px; padding-bottom: 72px; }
.doc-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; font-weight: 600; font-size: 13px; color: var(--muted); }
.doc-back:hover { color: var(--text); }
.doc-back .ico { width: 16px; height: 16px; }
.doc-article { padding: 40px; border-radius: 20px; font-size: 16px; line-height: 1.75; color: var(--text-2); font-weight: 400; }
.doc-kicker { display: block; color: var(--accent-text); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.doc-article h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; line-height: 1.15; color: var(--text); text-wrap: balance; }
.doc-lead { font-size: 18px; color: var(--muted); margin: 12px 0 28px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.doc-article h2 { font-size: 20px; font-weight: 700; color: var(--text); margin: 32px 0 10px; }
.doc-article p { margin: 0 0 16px; }
.doc-article ol, .doc-article ul { margin: 0 0 16px; padding-left: 24px; display: grid; gap: 10px; }
.doc-article li::marker { color: var(--accent-text); font-weight: 700; }
.doc-article > :last-child { margin-bottom: 0; }
.doc-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 20px; padding: 28px 32px; border-radius: 20px; border-color: var(--accent-line); background: var(--accent-soft); }
.doc-cta h2 { font-size: 20px; margin-bottom: 4px; }
.doc-cta p { margin: 0; color: var(--muted); }
.doc-more-title { font-size: 18px; margin: 40px 0 16px; }
.doc-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.doc-more a { display: grid; gap: 4px; padding: 18px 20px; color: var(--text); }
.doc-more a:hover { border-color: var(--accent-line); }
.doc-more small { color: var(--muted); font-weight: 400; }
.doc-foot { border-top: 1px solid var(--line); padding: 24px 0; color: var(--faint); font-size: 13px; }
.doc-foot .doc-wrap { max-width: 1180px; }
@media (max-width: 640px) {
  .doc-wrap { padding: 0 16px; }
  .doc-article { padding: 24px 18px; }
  .doc-more { grid-template-columns: minmax(0, 1fr); }
  .doc-cta { padding: 22px 18px; }
  .doc-cta .btn { width: 100%; }
  .doc-actions .dd { display: none; }
}
