/* ============================================================
   Envíos Kukin · Panel Admin (Telegram Mini App)
   ============================================================ */
:root {
  --bg: #070a10;
  --bg-2: #0a0f19;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.07);
  --stroke: rgba(255, 255, 255, 0.085);
  --stroke-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f6ff;
  --muted: #8d98b4;
  --muted-2: #65708a;
  --accent: #5b8cff;
  --accent-2: #8b5cf6;
  --accent-3: #22d3a5;
  --danger: #ff6b78;
  --warn: #ffb84d;
  --ok: #3ddc97;
  --cyan: #38d9f5;
  --pink: #ff7ad9;
  --chart-grid: rgba(255, 255, 255, 0.07);
  --chart-text: #7380a0;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(91, 140, 255, 0.16), transparent 55%),
    radial-gradient(700px 480px at 94% 8%, rgba(139, 92, 246, 0.14), transparent 55%),
    radial-gradient(800px 600px at 50% 110%, rgba(34, 211, 165, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }

/* ---------------- Boot / Denied ---------------- */
.boot, .denied {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
  background: radial-gradient(600px 400px at 50% 30%, rgba(91, 140, 255, 0.12), transparent 60%), var(--bg);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.boot.out, .denied.out { opacity: 0; transform: scale(1.02); pointer-events: none; }
.boot-logo { position: relative; width: 96px; height: 96px; display: grid; place-items: center; margin-bottom: 8px; }
.boot-mark {
  width: 66px; height: 66px; border-radius: 22px;
  display: grid; place-items: center;
  font-size: 30px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 44px rgba(91, 140, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: markPulse 2.2s ease-in-out infinite;
}
.boot-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(91, 140, 255, 0.35);
  animation: ringPulse 2.2s var(--ease) infinite;
}
.boot-ring.delay { animation-delay: 1.1s; }
.boot-title { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; }
.boot-sub { color: var(--muted); font-size: 14px; }
.boot-bar { width: 160px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 8px; }
.boot-bar span { display: block; width: 40%; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-3)); animation: bootSlide 1.1s var(--ease) infinite; }

.denied-glow { position: absolute; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 107, 120, 0.16), transparent 65%); filter: blur(8px); animation: breathe 4s ease-in-out infinite; }
.denied-icon {
  position: relative; width: 88px; height: 88px; border-radius: 28px; display: grid; place-items: center;
  font-size: 38px; background: rgba(255, 107, 120, 0.1);
  border: 1px solid rgba(255, 107, 120, 0.25);
  box-shadow: 0 20px 50px rgba(255, 107, 120, 0.15);
  animation: deniedShake .7s var(--ease) .25s both;
}
.denied h1 { position: relative; margin: 6px 0 0; font-size: 25px; letter-spacing: -0.5px; }
.denied p { position: relative; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 320px; }
.denied-note { position: relative; color: var(--muted-2); font-size: 12px; max-width: 300px; line-height: 1.5; margin-top: 4px; }

/* ---------------- App shell ---------------- */
.app { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.app-header {
  position: relative; z-index: 20; flex: none;
  padding: calc(var(--safe-top) + 8px) 14px 10px;
  background: linear-gradient(180deg, rgba(7, 10, 16, 0.92), rgba(7, 10, 16, 0.62) 70%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 48px; max-width: 720px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 14px; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(91, 140, 255, 0.28), inset 0 1px 0 rgba(255,255,255,.3);
  overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.brand-text { min-width: 0; }
.brand-title { font-size: 16px; font-weight: 800; letter-spacing: -0.25px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.back-btn {
  width: 40px; height: 40px; flex: none; border-radius: 13px; border: 1px solid var(--stroke);
  background: var(--panel); display: grid; place-items: center; color: var(--text);
  transition: transform .14s var(--ease), background .2s, border-color .2s;
}
.back-btn:active, .back-btn.pressed { transform: scale(.92); background: var(--panel-2); }
.header-title { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.2; }
.header-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.icon-btn {
  width: 40px; height: 40px; flex: none; border-radius: 13px; border: 1px solid var(--stroke);
  background: var(--panel); display: grid; place-items: center; color: var(--muted);
  transition: transform .14s var(--ease), background .2s, color .2s;
}
.icon-btn:active, .icon-btn.pressed { transform: scale(.9); background: var(--panel-2); color: var(--text); }
.icon-btn.spin svg { animation: spin .8s linear infinite; }

.view {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 2px 14px calc(94px + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 720px; width: 100%; margin: 0 auto;
  outline: none;
}
.view::-webkit-scrollbar { display: none; }
.page { animation: pageIn .38s var(--ease) both; }

.tabbar {
  position: relative; z-index: 25; flex: none;
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 2px; padding: 7px 8px calc(7px + var(--safe-bottom));
  background: linear-gradient(0deg, rgba(7, 10, 16, 0.98), rgba(7, 10, 16, 0.82));
  border-top: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
}
.tab {
  position: relative; overflow: hidden; border: 0; background: transparent; color: var(--muted-2);
  border-radius: 14px; padding: 7px 2px 5px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: color .2s, transform .14s var(--ease), background .2s;
}
.tab:active, .tab.pressed { transform: scale(.94); }
.tab.active { color: var(--text); background: rgba(91, 140, 255, 0.1); }
.tab.active::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 18px; height: 2.5px; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-3));
  box-shadow: 0 0 12px rgba(91,140,255,.8);
}
.tab-icon { display: grid; place-items: center; height: 22px; }
.tab-label { font-size: 10px; font-weight: 700; letter-spacing: .15px; }
.tab-badge {
  position: absolute; top: 3px; right: calc(50% - 22px); min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 99px; background: var(--danger); color: #fff; font-size: 9px; font-weight: 800;
  display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg);
}

/* ---------------- Cards / layout ---------------- */
.section { margin-top: 18px; animation: cardIn .45s var(--ease) both; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 0 2px; }
.section-title { font-size: 15px; font-weight: 800; letter-spacing: -0.2px; }
.section-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.section-link { border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 700; padding: 6px 2px; }
.card {
  background: linear-gradient(160deg, rgba(255,255,255,.062), rgba(255,255,255,.025));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
  position: relative;
}
.card + .card { margin-top: 10px; }
.card.tight { padding: 12px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-title { font-size: 13.5px; font-weight: 800; letter-spacing: -0.1px; }
.card-hint { font-size: 11px; color: var(--muted); margin-top: 2px; }
.grid { display: grid; gap: 10px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stagger > * { animation: cardIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 42ms); }

/* Hero */
.hero {
  position: relative; overflow: hidden; border-radius: 26px; padding: 20px 18px 18px;
  background:
    radial-gradient(420px 220px at 85% -10%, rgba(139, 92, 246, 0.42), transparent 65%),
    radial-gradient(360px 200px at 0% 110%, rgba(34, 211, 165, 0.18), transparent 65%),
    linear-gradient(135deg, rgba(91, 140, 255, 0.24), rgba(139, 92, 246, 0.13) 55%, rgba(255,255,255,.03));
  border: 1px solid rgba(122, 156, 255, 0.2);
  box-shadow: 0 22px 54px rgba(33, 60, 140, 0.22);
  animation: cardIn .5s var(--ease) both;
}
.hero::before {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(91,140,255,.32), transparent 65%);
  top: -120px; right: -60px; filter: blur(4px); animation: breathe 6s ease-in-out infinite;
}
.hero-top { display: flex; align-items: flex-start; gap: 12px; position: relative; }
.hero-kicker { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(220, 230, 255, 0.68); }
.hero-title { font-size: 21px; font-weight: 850; letter-spacing: -0.6px; margin-top: 5px; line-height: 1.2; }
.hero-sub { font-size: 12.5px; color: rgba(220, 230, 255, 0.62); margin-top: 5px; }
.hero-amount { margin-top: 16px; position: relative; }
.hero-amount-label { font-size: 11px; color: rgba(220, 230, 255, 0.6); }
.hero-amount-value { font-size: 30px; font-weight: 850; letter-spacing: -1px; margin-top: 2px; line-height: 1.05; }
.hero-amount-value small { font-size: 14px; font-weight: 700; color: rgba(220,230,255,.72); letter-spacing: 0; }
.hero-meta { position: relative; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 10px;
  background: rgba(7, 10, 16, 0.28); border: 1px solid rgba(255,255,255,.1);
  font-size: 11px; font-weight: 700; color: rgba(235, 242, 255, 0.86);
}
.hero-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulseDot 2s infinite; }

/* KPI */
.kpi {
  position: relative; overflow: hidden; padding: 13px 13px 12px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid var(--stroke); min-height: 94px;
  transition: transform .16s var(--ease), border-color .2s, background .2s;
}
.kpi.pressable:active { transform: scale(.97); }
.kpi-top { display: flex; align-items: center; gap: 8px; }
.kpi-icon {
  width: 29px; height: 29px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: rgba(91, 140, 255, 0.14); color: var(--accent);
}
.kpi-icon.green { background: rgba(34, 211, 165, .13); color: var(--accent-3); }
.kpi-icon.violet { background: rgba(139, 92, 246, .15); color: #b79cff; }
.kpi-icon.orange { background: rgba(255, 184, 77, .13); color: var(--warn); }
.kpi-icon.pink { background: rgba(255, 122, 217, .13); color: var(--pink); }
.kpi-icon.red { background: rgba(255, 107, 120, .13); color: var(--danger); }
.kpi-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); }
.kpi-value { font-size: 23px; font-weight: 850; letter-spacing: -0.8px; margin-top: 9px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value small { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 7px; min-height: 16px; }
.kpi-spark { width: 62px; height: 22px; flex: none; opacity: .9; }
.growth { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 800; padding: 3px 6px; border-radius: 7px; }
.growth.up { color: var(--ok); background: rgba(61, 220, 151, .11); }
.growth.down { color: var(--danger); background: rgba(255, 107, 120, .11); }
.growth.flat { color: var(--muted); background: rgba(255,255,255,.05); }

/* Buttons */
.btn {
  position: relative; overflow: hidden; border: 0; border-radius: 14px;
  padding: 12px 16px; font-size: 13.5px; font-weight: 800; letter-spacing: -0.1px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--text); background: var(--panel-2);
  transition: transform .13s var(--ease), filter .2s, background .2s, box-shadow .2s, opacity .2s;
  user-select: none; -webkit-user-select: none;
}
.btn:active, .btn.pressed { transform: scale(.955); filter: brightness(.94); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), #7a63ff); color: #fff; box-shadow: 0 10px 26px rgba(91, 140, 255, .28), inset 0 1px 0 rgba(255,255,255,.28); }
.btn.success { background: linear-gradient(135deg, #1fc98c, #24b6d8); color: #04120d; box-shadow: 0 10px 24px rgba(34, 211, 165, .22); }
.btn.danger { background: linear-gradient(135deg, #ff5a6c, #ff7b63); color: #25060a; box-shadow: 0 10px 24px rgba(255, 107, 120, .2); }
.btn.ghost { background: rgba(255,255,255,.055); border: 1px solid var(--stroke); color: var(--text); }
.btn.soft { background: rgba(91, 140, 255, .13); color: #bcd0ff; border: 1px solid rgba(91,140,255,.2); }
.btn.block { width: 100%; }
.btn.sm { padding: 9px 12px; font-size: 12px; border-radius: 12px; }
.btn.xs { padding: 7px 10px; font-size: 11px; border-radius: 10px; }
.btn.icon-only { width: 38px; height: 38px; padding: 0; border-radius: 12px; flex: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 auto; }
.btn-spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.28); transform: scale(0); animation: ripple .62s var(--ease) forwards; pointer-events: none; }

/* Inputs */
.field { margin-bottom: 13px; }
.field-label { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 0 2px 7px; }
.field-hint { font-size: 11px; color: var(--muted-2); line-height: 1.45; margin-top: 6px; }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--stroke); border-radius: 14px; outline: none;
  background: rgba(0,0,0,.22); padding: 12px 13px; font-size: 14px; font-weight: 600;
  transition: border-color .2s, box-shadow .2s, background .2s;
  appearance: none; -webkit-appearance: none;
}
textarea.input { min-height: 110px; resize: vertical; font-weight: 500; line-height: 1.5; }
.input::placeholder { color: var(--muted-2); font-weight: 500; }
.input:focus { border-color: rgba(91, 140, 255, .65); box-shadow: 0 0 0 3px rgba(91, 140, 255, .14); background: rgba(0,0,0,.28); }
select.input {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px;
}
input[type="date"].input { color-scheme: dark; min-height: 46px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.search-box .input { padding-left: 39px; }
.file-drop {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px;
  border: 1px dashed rgba(255,255,255,.18); background: rgba(255,255,255,.025); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.file-drop:active { background: rgba(255,255,255,.05); }
.file-drop.has-file { border-style: solid; border-color: rgba(91,140,255,.4); background: rgba(91,140,255,.07); }

/* Chips / segmented */
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--stroke); background: var(--panel); color: var(--muted);
  padding: 8px 12px; border-radius: 99px; font-size: 11.5px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform .13s var(--ease), background .2s, color .2s, border-color .2s;
}
.chip:active { transform: scale(.94); }
.chip.active { background: linear-gradient(135deg, rgba(91,140,255,.95), rgba(139,92,246,.95)); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(91,140,255,.24); }
.chip .count { font-size: 9.5px; padding: 1px 5px; border-radius: 99px; background: rgba(0,0,0,.2); }
.segmented { display: flex; background: rgba(0,0,0,.22); border: 1px solid var(--stroke); border-radius: 14px; padding: 3px; gap: 3px; }
.segmented button {
  flex: 1; border: 0; background: transparent; color: var(--muted); padding: 8px 6px; border-radius: 11px;
  font-size: 11.5px; font-weight: 800; transition: background .2s, color .2s, transform .13s var(--ease);
}
.segmented button:active { transform: scale(.96); }
.segmented button.active { background: var(--panel-2); color: var(--text); box-shadow: 0 4px 12px rgba(0,0,0,.2); }

/* Rows / lists */
.row {
  display: flex; align-items: center; gap: 11px; padding: 12px 2px;
  border-bottom: 1px solid rgba(255,255,255,.055);
  transition: background .2s, transform .13s var(--ease);
}
.row:last-child { border-bottom: 0; }
.row.pressable:active { transform: scale(.985); background: rgba(255,255,255,.025); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 13.5px; font-weight: 750; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.row-end { display: flex; align-items: center; gap: 7px; flex: none; }
.row-value { font-size: 13.5px; font-weight: 800; }
.avatar {
  width: 38px; height: 38px; border-radius: 13px; flex: none; display: grid; place-items: center;
  font-size: 12px; font-weight: 850; color: #fff; background: linear-gradient(135deg, #4b78e8, #8b5cf6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28); overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 96px; height: 96px; border-radius: 30px; font-size: 26px; }
.avatar.photo { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 18px; font-size: 22px; }
.avatar.sm { width: 30px; height: 30px; border-radius: 10px; font-size: 10px; }
.avatar.lg { width: 48px; height: 48px; border-radius: 16px; font-size: 15px; }
.avatar.green { background: linear-gradient(135deg, #0fa97a, #36d7c0); }
.avatar.orange { background: linear-gradient(135deg, #e88716, #ffb84d); }
.avatar.red { background: linear-gradient(135deg, #d84257, #ff7b80); }
.avatar.gray { background: linear-gradient(135deg, #4b556b, #6b7690); }
.divider { height: 1px; background: rgba(255,255,255,.07); margin: 12px 0; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 8px;
  font-size: 10px; font-weight: 850; letter-spacing: .15px; white-space: nowrap;
  background: rgba(255,255,255,.06); color: var(--muted);
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.st-pending_admin { background: rgba(255,184,77,.12); color: #ffc76a; }
.badge.st-pending_payer { background: rgba(91,140,255,.14); color: #9dbaff; }
.badge.st-active_payer { background: rgba(56,217,245,.12); color: #74e5fb; }
.badge.st-completed { background: rgba(61,220,151,.12); color: #6aebb4; }
.badge.st-rejected { background: rgba(255,107,120,.12); color: #ff9aa3; }
.badge.st-cancelled { background: rgba(255,255,255,.07); color: #aab3c8; }
.badge.st-pending_correction { background: rgba(255,122,217,.12); color: #ffa3e6; }
.badge.role-P { background: rgba(34,211,165,.12); color: #6aebb4; }
.badge.role-B { background: rgba(255,107,120,.12); color: #ff9aa3; }
.badge.role-A { background: rgba(139,92,246,.14); color: #c3acff; }
.badge.role-C, .badge.role-G { background: rgba(255,255,255,.07); color: #aab3c8; }

/* Verificaciones: palomita dorada, programador, dueño y bot */
.vf-badges { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; flex: none; }
.vf-badge {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .14s var(--ease), filter .2s, box-shadow .2s;
}
.vf-badge:active { transform: scale(.86); }
.vf-badge:focus-visible { outline: 2px solid rgba(255,255,255,.55); outline-offset: 1px; }
.vf-badge svg { width: 10px; height: 10px; display: block; }
.vf-badge.vf-admin {
  background: linear-gradient(145deg, #ffe9a6 0%, #f4c542 42%, #b8860b 100%);
  color: #2b1d00;
  box-shadow: 0 0 0 1px rgba(255,235,170,.65), 0 2px 7px rgba(244,197,66,.38);
}
.vf-badge.vf-programmer {
  border-radius: 5px;
  background: linear-gradient(145deg, #22305c, #0a0e1c);
  color: #74e5fb;
  border: 1px solid rgba(116,229,251,.55);
  box-shadow: 0 0 9px rgba(56,217,245,.25), inset 0 0 5px rgba(56,217,245,.12);
}
.vf-badge.vf-owner {
  background: linear-gradient(145deg, #ffe9a6, #c9a4ff 55%, #8b5cf6);
  color: #24103a;
  box-shadow: 0 0 0 1px rgba(255,255,255,.35), 0 2px 8px rgba(181,123,255,.4);
}
.vf-badge.vf-bot {
  width: 19px; height: 19px;
  background: linear-gradient(145deg, #5b8cff, #38d9f5);
  color: #fff; font-size: 10.5px; line-height: 1;
  box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 2px 8px rgba(56,217,245,.38);
}
.brand-title-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.row-title.row-title-inline { display: flex; align-items: center; gap: 5px; overflow: visible; }
.row-title-inline .row-title-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vf-inline { display: inline-flex; align-items: center; gap: 5px; }

/* Crédito del desarrollador: más pequeño que la foto y el nombre del bot */
.dev-credit {
  display: flex; align-items: center; gap: 6px;
  max-width: 720px; margin: 6px auto 0; padding: 0;
  min-width: 0;
}
.dev-credit .avatar { width: 18px; height: 18px; border-radius: 6px; font-size: 8px; }
.dev-main { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.dev-top { display: flex; align-items: center; gap: 4px; min-width: 0; }
.dev-name { font-size: 10px; font-weight: 800; color: var(--muted); line-height: 1.15; }
.dev-link {
  display: block; font-size: 9.5px; font-weight: 650; color: var(--muted-2); line-height: 1.25;
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dev-link:active { color: var(--accent); }
.dev-credit .vf-badge { width: 13px; height: 13px; border-radius: 4px; }
.dev-credit .vf-badge svg { width: 8px; height: 8px; }
.photo-verify { display: flex; justify-content: center; margin-top: 1px; }
.profile-verify { display: flex; justify-content: center; margin: -4px 0 14px; }

/* Modal de cada verificación */
.vf-modal { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 11px; padding: 6px 2px 10px; }
.vf-modal-icon {
  width: 62px; height: 62px; border-radius: 20px;
  display: grid; place-items: center; font-size: 34px; line-height: 1;
  animation: pop .26s var(--ease) both;
}
.vf-modal-icon.vf-admin {
  background: linear-gradient(145deg, #ffe9a6 0%, #f4c542 42%, #b8860b 100%);
  color: #2b1d00; box-shadow: 0 12px 30px rgba(244,197,66,.26), inset 0 1px 0 rgba(255,255,255,.5);
}
.vf-modal-icon.vf-programmer {
  border-radius: 18px;
  background: linear-gradient(145deg, #22305c, #0a0e1c);
  color: #74e5fb; border: 1px solid rgba(116,229,251,.5);
  box-shadow: 0 12px 30px rgba(56,217,245,.2), inset 0 0 12px rgba(56,217,245,.12);
}
.vf-modal-icon.vf-owner {
  background: linear-gradient(145deg, #ffe9a6, #c9a4ff 55%, #8b5cf6);
  color: #24103a; box-shadow: 0 12px 30px rgba(181,123,255,.26), inset 0 1px 0 rgba(255,255,255,.45);
}
.vf-modal-icon.vf-bot {
  background: linear-gradient(145deg, #5b8cff, #38d9f5);
  color: #fff; box-shadow: 0 12px 30px rgba(56,217,245,.26), inset 0 1px 0 rgba(255,255,255,.35);
}
.vf-modal-text { font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 320px; }
.vf-modal-note { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px rgba(61,220,151,.8); flex: none; }
.status-dot.off { background: var(--muted-2); box-shadow: none; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 8px; font-size: 10.5px; font-weight: 800; background: rgba(255,255,255,.06); color: var(--muted); }

/* Order cards */
.order-card {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: 18px; border: 1px solid var(--stroke);
  background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  transition: transform .15s var(--ease), background .2s, border-color .2s;
}
.order-card + .order-card { margin-top: 8px; }
.order-card:active { transform: scale(.985); background: rgba(255,255,255,.07); }
.order-card::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 99px;
  background: var(--muted-2);
}
.order-card.st-pending_admin::before { background: var(--warn); box-shadow: 0 0 12px rgba(255,184,77,.5); }
.order-card.st-pending_payer::before { background: var(--accent); box-shadow: 0 0 12px rgba(91,140,255,.5); }
.order-card.st-active_payer::before { background: var(--cyan); box-shadow: 0 0 12px rgba(56,217,245,.5); }
.order-card.st-completed::before { background: var(--ok); box-shadow: 0 0 12px rgba(61,220,151,.5); }
.order-card.st-rejected::before { background: var(--danger); }
.order-card.st-pending_correction::before { background: var(--pink); }
.order-main { flex: 1; min-width: 0; }
.order-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.order-id { font-size: 13px; font-weight: 850; letter-spacing: .2px; }
.order-amount { font-size: 15px; font-weight: 850; letter-spacing: -0.3px; margin-top: 6px; }
.order-amount span { color: var(--muted); font-weight: 700; font-size: 12px; }
.order-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.order-arrow { color: var(--muted-2); flex: none; display: grid; place-items: center; }

/* Detail */
.detail-hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 18px;
  background:
    radial-gradient(320px 160px at 100% 0%, rgba(91,140,255,.22), transparent 70%),
    linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid var(--stroke);
  animation: cardIn .4s var(--ease) both;
}
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.detail-id { font-size: 20px; font-weight: 850; letter-spacing: -0.5px; }
.detail-date { font-size: 11px; color: var(--muted); margin-top: 4px; }
.detail-amount-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.detail-amount { font-size: 26px; font-weight: 850; letter-spacing: -1px; }
.detail-arrow { color: var(--muted-2); font-size: 18px; }
.detail-received { font-size: 26px; font-weight: 850; letter-spacing: -1px; color: var(--accent-3); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.detail-item { background: rgba(0,0,0,.16); border: 1px solid rgba(255,255,255,.055); border-radius: 12px; padding: 9px 11px; }
.detail-item .k { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .65px; color: var(--muted-2); }
.detail-item .v { font-size: 12.5px; font-weight: 750; margin-top: 4px; word-break: break-word; line-height: 1.35; }
.copy-row { display: flex; align-items: center; gap: 6px; }
.copy-btn { border: 0; background: rgba(255,255,255,.07); color: var(--muted); border-radius: 7px; padding: 3px 6px; font-size: 9.5px; font-weight: 800; }
.copy-btn:active { transform: scale(.94); }

/* Feedback al copiar: el botón hace pop y se tiñe de verde */
.copy-btn.is-copied { color: var(--ok); background: rgba(61,220,151,.2); box-shadow: 0 0 0 2px rgba(61,220,151,.28); animation: copyPop .45s var(--ease); }
.copy-mini.is-copied { color: var(--ok); background: rgba(61,220,151,.18); border-color: rgba(61,220,151,.45); box-shadow: 0 0 0 2px rgba(61,220,151,.18); animation: copyPop .45s var(--ease); }
.copy-bubble {
  position: fixed; z-index: 95; display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: 9px; font-size: 10.5px; font-weight: 800; white-space: nowrap;
  color: #d9fff0; background: rgba(12, 38, 31, .97); border: 1px solid rgba(61,220,151,.42);
  box-shadow: 0 10px 24px rgba(0,0,0,.45), 0 0 0 3px rgba(61,220,151,.08);
  pointer-events: none; opacity: 0; transform: translateY(7px) scale(.86);
  transition: opacity .18s var(--ease), transform .24s var(--ease);
}
.copy-bubble svg { color: var(--ok); flex: none; }
.copy-bubble.show { opacity: 1; transform: translateY(0) scale(1); }
.dist-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.055); font-size: 12px; }
.dist-line:last-child { border-bottom: 0; }
.dist-card { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: #c9d5f5; word-break: break-all; }
.dist-amount { font-weight: 850; color: var(--accent-3); white-space: nowrap; }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: rgba(255,255,255,.1); }
.timeline-item { position: relative; padding: 5px 0 10px; }
.timeline-item::before { content: ""; position: absolute; left: -17px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(91,140,255,.13); }
.timeline-item.muted-dot::before { background: var(--muted-2); box-shadow: none; }
.timeline-item .t { font-size: 12px; font-weight: 750; }
.timeline-item .d { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.action-bar {
  position: sticky; bottom: 0; z-index: 15; margin: 14px -14px -94px; padding: 10px 14px calc(10px + var(--safe-bottom));
  background: linear-gradient(0deg, rgba(7,10,16,.98) 40%, rgba(7,10,16,.75) 80%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.action-bar-inner { display: flex; gap: 8px; max-width: 720px; margin: 0 auto; }
.action-bar-inner .btn { flex: 1; }

/* Dock de acciones: fijo encima de las pestañas */
.action-dock {
  position: relative; z-index: 18; flex: none;
  padding: 10px 14px calc(10px + 2px);
  background: linear-gradient(0deg, rgba(7,10,16,.99) 55%, rgba(7,10,16,.9));
  border-top: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 -12px 30px rgba(0,0,0,.32);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: dockIn .24s var(--ease) both;
}
.action-dock-inner { display: flex; gap: 8px; max-width: 720px; margin: 0 auto; }
.action-dock-inner .btn { flex: 1; }

/* Selección múltiple (listas al añadir pagador) */
.pick-list { display: flex; flex-direction: column; gap: 7px; }
.pick-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: 13px; border: 1px solid var(--stroke);
  background: rgba(255,255,255,.035); color: var(--text);
  transition: border-color .18s, background .18s, transform .13s var(--ease);
}
.pick-row:active { transform: scale(.985); }
.pick-row.on { border-color: rgba(91,140,255,.55); background: rgba(91,140,255,.12); }
.pick-row .row-main { min-width: 0; flex: 1; }
.pick-row .row-title { font-size: 12.5px; font-weight: 750; }
.pick-row .row-sub { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.pick-check {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  border: 1.5px solid rgba(255,255,255,.2); display: grid; place-items: center;
  color: transparent; background: rgba(0,0,0,.2); transition: all .16s var(--ease);
}
.pick-row.on .pick-check { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--accent), #7a63ff); }
.media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.media-thumb {
  border: 1px solid var(--stroke); background: rgba(0,0,0,.18); border-radius: 12px; padding: 10px;
  display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; color: var(--muted);
  transition: transform .14s var(--ease), background .2s;
}
.media-thumb:active { transform: scale(.97); background: rgba(255,255,255,.05); }

/* Visor modal de comprobantes */
.media-viewer {
  position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column;
  padding: calc(var(--safe-top) + 56px) 14px calc(var(--safe-bottom) + 12px);
  background: rgba(4, 7, 12, .84); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  opacity: 0; transition: opacity .2s var(--ease);
}
.media-viewer.open { opacity: 1; }
.media-viewer-stage {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  overflow: auto; transform: scale(.94); transition: transform .24s var(--ease);
}
.media-viewer.open .media-viewer-stage { transform: scale(1); }
.media-viewer-img {
  max-width: 100%; max-height: 100%; display: block; object-fit: contain;
  border-radius: 14px; background: #0b1018; box-shadow: 0 24px 60px rgba(0,0,0,.55);
  animation: pop .22s var(--ease) both;
}
.media-viewer-pdf { width: 100%; height: 100%; min-height: 320px; border: 0; border-radius: 14px; background: #fff; }
.media-viewer-close {
  position: absolute; top: calc(var(--safe-top) + 10px); right: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(16,23,38,.94); color: var(--text); display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.4);
}
.media-viewer-close:active { transform: scale(.92); }
.media-viewer-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 2px 0; min-height: 34px; }
.media-viewer-title { flex: 1; min-width: 0; font-size: 11.5px; font-weight: 750; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-viewer-download {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px;
  font-size: 11px; font-weight: 800; border-radius: 10px; color: #cfe0ff;
  background: rgba(91,140,255,.16); border: 1px solid rgba(91,140,255,.32);
}
.media-viewer-download:active { transform: scale(.96); }
.media-viewer-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }

/* Switches */
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.055); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .row-main { flex: 1; }
.switch {
  position: relative; width: 46px; height: 27px; border-radius: 99px; border: 1px solid var(--stroke-strong);
  background: rgba(255,255,255,.08); flex: none; padding: 0;
  transition: background .25s var(--ease), border-color .25s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%;
  background: #cdd6ee; box-shadow: 0 2px 6px rgba(0,0,0,.35);
  transition: transform .25s var(--ease), background .25s;
}
.switch[aria-checked="true"] { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.switch[aria-checked="true"]::after { transform: translateX(19px); background: #fff; }
.switch:active { transform: scale(.94); }

/* Actions grid */
.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.action-tile {
  position: relative; overflow: hidden; text-align: left; border: 1px solid var(--stroke);
  background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  border-radius: 17px; padding: 13px 12px; min-height: 92px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  transition: transform .15s var(--ease), background .2s, border-color .2s;
}
.action-tile:active { transform: scale(.965); background: rgba(255,255,255,.07); }
.action-icon { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; background: rgba(91,140,255,.13); color: var(--accent); }
.action-icon.green { background: rgba(34,211,165,.12); color: var(--accent-3); }
.action-icon.violet { background: rgba(139,92,246,.14); color: #c0a8ff; }
.action-icon.orange { background: rgba(255,184,77,.12); color: var(--warn); }
.action-icon.red { background: rgba(255,107,120,.12); color: var(--danger); }
.action-icon.pink { background: rgba(255,122,217,.12); color: var(--pink); }
.action-title { font-size: 12.5px; font-weight: 800; letter-spacing: -.1px; }
.action-sub { font-size: 10px; color: var(--muted); line-height: 1.35; margin-top: -3px; }

/* Charts */
.chart-wrap { position: relative; width: 100%; height: 196px; }
.chart-wrap.compact { height: 160px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.chart-tooltip {
  position: absolute; z-index: 5; pointer-events: none; opacity: 0; transform: translate(-50%, -110%) scale(.96);
  background: rgba(12, 18, 31, 0.96); border: 1px solid rgba(255,255,255,.12); border-radius: 10px;
  padding: 7px 9px; font-size: 10px; font-weight: 700; color: var(--text); white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0,0,0,.4); transition: opacity .12s, transform .12s;
}
.chart-tooltip.show { opacity: 1; transform: translate(-50%, -110%) scale(1); }
.chart-tooltip .tt-value { font-size: 12px; font-weight: 850; margin-top: 2px; }
.chart-tooltip .tt-sub { color: var(--muted); font-size: 9.5px; margin-top: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted); font-weight: 700; }
.legend-dot { width: 7px; height: 7px; border-radius: 3px; }
.donut-layout { display: flex; align-items: center; gap: 16px; }
.donut-wrap { position: relative; width: 128px; height: 128px; flex: none; }
.donut-wrap canvas { width: 100%; height: 100%; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center .v { font-size: 20px; font-weight: 850; letter-spacing: -.5px; }
.donut-center .l { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 800; margin-top: 1px; }
.donut-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.donut-legend .item { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.donut-legend .item .name { flex: 1; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donut-legend .item .val { font-weight: 800; font-size: 11.5px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 92px 1fr 58px; align-items: center; gap: 9px; }
.bar-label { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 7px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; transition: width .8s var(--ease); box-shadow: 0 0 12px rgba(91,140,255,.3); }
.bar-value { font-size: 11px; font-weight: 800; text-align: right; white-space: nowrap; }

/* Notice / empty / error */
.notice { display: flex; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(91,140,255,.08); border: 1px solid rgba(91,140,255,.16); font-size: 11.5px; color: #b9cbf5; line-height: 1.45; }
.notice.warn { background: rgba(255,184,77,.08); border-color: rgba(255,184,77,.18); color: #ffd49a; }
.notice.danger { background: rgba(255,107,120,.08); border-color: rgba(255,107,120,.18); color: #ffb3b9; }
.notice svg { flex: none; margin-top: 1px; }
.empty { padding: 40px 18px; text-align: center; color: var(--muted); }
.empty-icon { width: 58px; height: 58px; border-radius: 20px; margin: 0 auto 12px; display: grid; place-items: center; background: rgba(255,255,255,.05); color: var(--muted-2); }
.empty-title { font-size: 14px; font-weight: 800; color: var(--text); }
.empty-sub { font-size: 11.5px; margin-top: 5px; line-height: 1.45; }
.error-state { padding: 38px 18px; text-align: center; }
.error-state .empty-icon { background: rgba(255,107,120,.1); color: var(--danger); }
.progress { height: 6px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-3)); transition: width .8s var(--ease); }

/* Skeleton */
.sk { position: relative; overflow: hidden; background: rgba(255,255,255,.055); border-radius: 10px; }
.sk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent); transform: translateX(-100%); animation: shimmer 1.3s infinite; }
.sk-line { height: 12px; margin: 7px 0; }
.sk-line.w40 { width: 40%; } .sk-line.w60 { width: 60%; } .sk-line.w80 { width: 80%; }
.sk-card { height: 96px; border-radius: 18px; }
.sk-chart { height: 196px; border-radius: 18px; margin-top: 10px; }
.sk-hero { height: 168px; border-radius: 26px; }

/* Sheet */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.62);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .26s var(--ease);
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 90dvh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #101726, #0a0f19 40%);
  border: 1px solid rgba(255,255,255,.09); border-bottom: 0;
  border-radius: 26px 26px 0 0; box-shadow: 0 -24px 60px rgba(0,0,0,.5);
  transform: translateY(105%); transition: transform .34s var(--ease);
  padding-bottom: var(--safe-bottom);
}
.sheet.open { transform: translateY(0); }
@media (min-width: 640px) {
  .sheet { left: 50%; right: auto; width: 540px; bottom: 22px; border-radius: 26px; border-bottom: 1px solid rgba(255,255,255,.09); transform: translate(-50%, 112%); }
  .sheet.open { transform: translate(-50%, 0); }
}
.drag-handle { width: 42px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.18); margin: 9px auto 2px; flex: none; }
.sheet-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 18px 10px; flex: none; }
.sheet-head-text { flex: 1; min-width: 0; }
.sheet-title { font-size: 17px; font-weight: 850; letter-spacing: -.3px; line-height: 1.25; }
.sheet-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.sheet-close { width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--stroke); background: var(--panel); color: var(--muted); display: grid; place-items: center; flex: none; transition: transform .13s var(--ease), background .2s; }
.sheet-close:active { transform: scale(.9); background: var(--panel-2); }
.sheet-body { overflow-y: auto; padding: 0 18px 18px; -webkit-overflow-scrolling: touch; }
.sheet-actions { display: flex; gap: 8px; padding-top: 6px; }
.sheet-actions .btn { flex: 1; }
.sheet-loading { display: grid; place-items: center; padding: 36px; color: var(--muted); gap: 10px; font-size: 12px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.14); border-top-color: var(--accent); animation: spin .8s linear infinite; }

/* Toasts */
.toasts {
  position: fixed; top: calc(var(--safe-top) + 10px); left: 50%; transform: translateX(-50%);
  z-index: 90; width: min(92vw, 420px); display: flex; flex-direction: column; gap: 7px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: 14px;
  background: rgba(16, 23, 38, 0.97); border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 16px 40px rgba(0,0,0,.4); font-size: 12px; font-weight: 650; line-height: 1.4;
  animation: toastIn .32s var(--ease) both;
}
.toast.out { animation: toastOut .28s var(--ease) both; }
.toast-icon { width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center; flex: none; background: rgba(91,140,255,.15); color: var(--accent); }
.toast.success .toast-icon { background: rgba(61,220,151,.14); color: var(--ok); }
.toast.error .toast-icon { background: rgba(255,107,120,.14); color: var(--danger); }
.toast.warn .toast-icon { background: rgba(255,184,77,.14); color: var(--warn); }

/* Misc */
.fab { position: fixed; right: 16px; bottom: calc(88px + var(--safe-bottom)); z-index: 30; width: 52px; height: 52px; border-radius: 18px; border: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 16px 36px rgba(91,140,255,.4); transition: transform .16s var(--ease); }
.fab:active { transform: scale(.9); }
.kv { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.055); font-size: 12px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 750; text-align: right; word-break: break-word; }
/* Carné/cantidad: dato corto, no necesita ocupar todo el ancho. */
.kv.compact { padding: 7px 0; }
.kv.compact .v { max-width: 190px; font-variant-numeric: tabular-nums; }

/* Varios gestores D por ubicación (provincia). */
.manager-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.manager-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 6px 5px 10px; border-radius: 99px;
  background: rgba(91,140,255,.12); border: 1px solid rgba(91,140,255,.28);
  color: #cfe0ff; font-size: 11px; font-weight: 700; max-width: 100%;
}
.manager-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manager-chip-x {
  width: 20px; height: 20px; flex: none; border-radius: 50%; border: 0;
  display: inline-grid; place-items: center;
  background: rgba(255,92,108,.16); color: #ff9aa3;
  font-size: 11px; font-weight: 900; line-height: 1;
}
.manager-chip-x:active { transform: scale(.9); }
.metric-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.055); }
.metric-row:last-child { border-bottom: 0; }
.metric-row .k { font-size: 12px; color: var(--muted); }
.metric-row .v { font-size: 14px; font-weight: 850; }
.small-note { font-size: 10px; color: var(--muted-2); line-height: 1.4; }
.scroll-x { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }
.date-presets { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 9px; }
.date-presets::-webkit-scrollbar { display: none; }
.date-presets .chip { padding: 7px 10px; font-size: 10.5px; }
.filter-bar { position: sticky; top: 0; z-index: 12; padding: 6px 0 8px; background: linear-gradient(180deg, var(--bg) 78%, rgba(7,10,16,.86) 92%, transparent); }
.load-more { display: flex; justify-content: center; padding: 14px 0 4px; }
.inline-icon { display: inline-flex; vertical-align: -2px; margin-right: 4px; }

@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.987); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes ringPulse { 0% { transform: scale(.72); opacity: .8; } 80%, 100% { transform: scale(1.35); opacity: 0; } }
@keyframes markPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@keyframes bootSlide { 0% { transform: translateX(-120%); } 100% { transform: translateX(420%); } }
@keyframes breathe { 0%,100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes deniedShake { 0%,100% { transform: translateX(0) rotate(0); } 20% { transform: translateX(-7px) rotate(-3deg); } 40% { transform: translateX(7px) rotate(3deg); } 60% { transform: translateX(-4px) rotate(-2deg); } 80% { transform: translateX(4px) rotate(2deg); } }
@keyframes pulseDot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.82); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes pop { 0% { transform: scale(.85); opacity: 0; } 60% { transform: scale(1.04); } 100% { transform: scale(1); opacity: 1; } }
@keyframes copyPop { 0% { transform: scale(1); } 30% { transform: scale(.84); } 65% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes dockIn { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}


/* Galería de fotos */
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
@media (max-width: 360px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.photo-card {
  position: relative; overflow: hidden; border: 1px solid var(--stroke);
  background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  border-radius: 18px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 5px;
  text-align: center; color: var(--text);
  transition: transform .15s var(--ease), background .2s, border-color .2s;
}
.photo-card:active, .photo-card.pressed { transform: scale(.96); background: rgba(255,255,255,.07); }
.photo-card .avatar { box-shadow: 0 6px 18px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.25); }
.photo-card .badge { font-size: 8.5px; padding: 3px 6px; }
.photo-name { width: 100%; font-size: 10.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.photo-sub { width: 100%; font-size: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -2px; }

/* --- Efectivo (admin): filas de resumen y selector de cuentas --- */
.payer-stat-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,.055);
  font-size: 12px;
}
.payer-stat-line:last-child { border-bottom: 0; }
.payer-stat-line .k { color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.payer-stat-line .v { font-weight: 800; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.kpi-sub { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.35; }
.account-pick-list { display: flex; flex-direction: column; gap: 8px; }
.account-pick-row { border-radius: 14px; padding: 10px 12px; }
