@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --blue: #1e6bff;
  --blue-2: #2f8cff;
  --blue-dark: #0b3fb0;
  --navy: #0a1f4d;
  --sky: #eaf2ff;
  --sky-2: #f5f9ff;
  --red: #ff3b47;
  --red-2: #ff6a5c;
  --gold: #ffb02e;
  --green: #12b76a;
  --text: #0f1d3d;
  --muted: #6b7a99;
  --line: #e3eaf7;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(16, 60, 160, .10);
  --shadow-sm: 0 4px 14px rgba(16, 60, 160, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text); background: var(--sky-2); -webkit-font-smoothing: antialiased;
  font-size: 15px; line-height: 1.45;
}
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; }
button { font-family: inherit; }

/* ---------- Botones e inputs ---------- */
.btn {
  border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 600; font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s, box-shadow .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { color: #fff; background: linear-gradient(90deg, var(--blue-dark), var(--blue) 50%, var(--blue-2)); box-shadow: 0 8px 20px rgba(30,107,255,.35); }
.btn.red { color: #fff; background: linear-gradient(90deg, #e8202d, var(--red) 60%, var(--red-2)); box-shadow: 0 8px 20px rgba(255,59,71,.3); }
.btn.green { color: #fff; background: linear-gradient(90deg, #0a9a57, var(--green)); }
.btn.ghost { background: var(--sky); color: var(--blue-dark); }
.btn.white { background: #fff; color: var(--blue-dark); }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.block { width: 100%; }
.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 14px;
  font-size: 15px; font-family: inherit; color: var(--text); outline: none; transition: border .2s, box-shadow .2s;
}
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30,107,255,.12); }
label.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.err-text { color: var(--red); font-size: 13px; }

/* ---------- Layout app ---------- */
.app-shell { min-height: 100vh; padding-bottom: 84px; }
.container { max-width: 1320px; margin: 0 auto; padding: 0 16px; }
.topbar {
  position: sticky; top: 0; z-index: 30; background: #fff;
  border-bottom: 1px solid var(--line);
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--navy); }
.brand img { width: 36px; height: 36px; }
.brand span b { color: var(--red); font-weight: 800; }
.topnav { display: none; gap: 6px; }
.topnav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 14px; }
.topnav a.on, .topnav a:hover { background: var(--sky); color: var(--blue-dark); }
.top-right { display: flex; align-items: center; gap: 10px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--sky); color: var(--blue-dark); cursor: pointer; display: grid; place-items: center; }
.icon-btn svg { width: 20px; height: 20px; }
.dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }

.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(16,60,160,.06);
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; color: var(--muted); padding: 4px 0; font-weight: 500; }
.bottomnav a svg { width: 24px; height: 24px; }
.bottomnav a.on { color: var(--blue); }
.bottomnav a.center span.circle {
  width: 48px; height: 48px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-2)); box-shadow: 0 8px 18px rgba(255,59,71,.4); border: 4px solid #fff;
}
.bottomnav a.center.on span.circle { background: linear-gradient(135deg, var(--blue-dark), var(--blue-2)); box-shadow: 0 8px 18px rgba(30,107,255,.4); }

main.page { padding-top: 16px; padding-bottom: 30px; animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; border: 1px solid #eef3fb; }
.card + .card { margin-top: 14px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 12px; }
.section-title h3 { font-size: 17px; margin: 0; }
.section-title a { font-size: 13.5px; font-weight: 500; }
.page-head { margin: 4px 2px 16px; }
.page-head h2 { font-size: 22px; }
.page-head p { color: var(--muted); margin: 0; font-size: 14px; }

/* ---------- Hero / banner ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; color: #fff; padding: 22px 20px 20px;
  background: radial-gradient(120% 140% at 100% 0%, #3aa0ff 0%, var(--blue) 35%, var(--blue-dark) 75%, var(--navy) 100%);
  box-shadow: var(--shadow);
}
.hero::before { content: ''; position: absolute; inset: auto -40px -60px auto; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero::after { content: ''; position: absolute; left: -60px; top: -80px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,59,71,.18); filter: blur(10px); }
.hero h1 { font-size: 24px; font-weight: 800; position: relative; z-index: 1; }
.hero p { margin: 0 0 12px; opacity: .9; position: relative; z-index: 1; font-size: 14px; max-width: 420px; }
.hero .hero-drone { position: relative; z-index: 1; width: 100%; max-width: 420px; margin: -6px auto -10px; filter: drop-shadow(0 18px 20px rgba(0,0,0,.25)); animation: hover 3.5s ease-in-out infinite; }
@keyframes hover { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero .tag { display: inline-block; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); padding: 4px 12px; border-radius: 999px; font-size: 12px; margin-bottom: 10px; position: relative; z-index: 1; }

.notice { background: #fff4e5; color: #8a5300; border: 1px solid #ffd99b; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; margin-bottom: 14px; }

/* ---------- Acciones rápidas ---------- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text); font-size: 12.5px; font-weight: 500; text-align: center; }
.quick a .qi { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-sm); }
.quick a .qi svg { width: 26px; height: 26px; }
.qi.c1 { background: linear-gradient(135deg, #2f8cff, #0b3fb0); }
.qi.c2 { background: linear-gradient(135deg, #ff6a5c, #e8202d); }
.qi.c3 { background: linear-gradient(135deg, #22c6ff, #1e6bff); }
.qi.c4 { background: linear-gradient(135deg, #ffb02e, #ff7a1a); }

/* ---------- Saldo ---------- */
.balance-card {
  margin-top: 16px; border-radius: 22px; padding: 18px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy), var(--blue-dark) 55%, var(--blue));
}
.balance-card .lbl2 { opacity: .8; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.balance-card .big { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin: 2px 0 12px; }
.balance-card .big small { font-size: 15px; font-weight: 600; opacity: .8; }
.balance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.balance-grid div { background: rgba(255,255,255,.1); border-radius: 14px; padding: 8px 10px; }
.balance-grid span { display: block; font-size: 11.5px; opacity: .8; }
.balance-grid b { font-size: 15px; }
.balance-card .wave { position: absolute; right: -30px; top: -30px; width: 160px; opacity: .14; }
.eye { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; opacity: .85; }

/* ---------- Paquetes ---------- */
.pkg-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.pkg {
  background: #fff; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid #eef3fb;
  display: grid; grid-template-columns: 128px 1fr; gap: 0; position: relative; transition: box-shadow .2s;
}
@media (hover: hover) and (pointer: fine) { .pkg:hover { box-shadow: var(--shadow); } }
.pkg .pimg { background: linear-gradient(160deg, var(--sky), #d6e6ff); display: grid; place-items: center; padding: 8px; position: relative; }
.pkg .pimg img { width: 100%; height: 100%; max-height: 120px; object-fit: contain; }
.pkg .lvl { position: absolute; top: 8px; left: 8px; background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.pkg .pbody { padding: 12px 14px; }
.pkg h4 { font-size: 16px; margin: 0 0 2px; }
.pkg .pdesc { color: var(--muted); font-size: 12px; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pkg .rate { position: absolute; top: 10px; right: 10px; background: linear-gradient(90deg, #ff8a3d, var(--red)); color: #fff; font-weight: 700; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.pkg .pline { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin: 2px 0; }
.pkg .pline b { color: var(--text); }
.pkg .pline .blue { color: var(--blue); }
.pkg .pfoot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.pkg .price { font-size: 19px; font-weight: 800; color: var(--blue-dark); }
.pkg .price small { font-size: 12px; font-weight: 600; color: var(--muted); }

/* ---------- Listas ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li .lic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--sky); color: var(--blue); }
.li .lic svg { width: 20px; height: 20px; }
.li .lic.pos { background: #e7f8ef; color: var(--green); }
.li .lic.neg { background: #ffecee; color: var(--red); }
.li .lim { flex: 1; min-width: 0; }
.li .lim b { display: block; font-size: 14px; font-weight: 600; }
.li .lim span { font-size: 12px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .lia { text-align: right; font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.li .lia.pos { color: var(--green); }
.li .lia.neg { color: var(--red); }
.li .lia small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.menu-list a { color: var(--text); }
.menu-list .li { cursor: pointer; }
.chev { color: #b4c0d8; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 14px; }
.empty img { width: 140px; margin: 0 auto 8px; opacity: .8; }

.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--sky); color: var(--blue-dark); }
.st-pending, .st-sending { background: #fff4e5; color: #b26b00; }
.st-approved, .st-active, .st-paid { background: #e7f8ef; color: #0a8a4e; }
.st-completed { background: #e8efff; color: var(--blue-dark); }
.st-rejected, .st-failed, .st-blocked, .st-cancelled { background: #ffecee; color: #d0202c; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.tabs button { border: 0; background: #fff; color: var(--muted); padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); }
.tabs button.on { background: var(--blue); color: #fff; }

/* ---------- Inversiones ---------- */
.inv { display: flex; gap: 12px; align-items: center; }
.inv img { width: 76px; height: 58px; object-fit: contain; background: var(--sky); border-radius: 12px; padding: 4px; flex-shrink: 0; }
.inv .im { flex: 1; min-width: 0; }
.progress { height: 8px; background: var(--sky); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-2)); border-radius: 999px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.kv div { background: var(--sky-2); border-radius: 10px; padding: 6px 8px; }
.kv span { display: block; font-size: 11px; color: var(--muted); }
.kv b { font-size: 13.5px; }

/* ---------- Recarga / retiro ---------- */
.method-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.method-opts label { position: relative; cursor: pointer; }
.method-opts input { position: absolute; opacity: 0; }
.method-opts .mo { border: 2px solid var(--line); border-radius: 16px; padding: 14px 12px; display: flex; align-items: center; gap: 10px; font-weight: 600; background: #fff; transition: .2s; }
.method-opts .mo svg { width: 26px; height: 26px; color: var(--blue); flex-shrink: 0; }
.method-opts .mo small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.method-opts input:checked + .mo { border-color: var(--blue); background: var(--sky); box-shadow: 0 0 0 4px rgba(30,107,255,.1); }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chips button { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 4px; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--text); }
.chips button.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.copy-row:last-child { border-bottom: 0; }
.copy-row span { color: var(--muted); font-size: 13px; }
.copy-row b { font-size: 14px; text-align: right; word-break: break-all; }
.copy-btn { border: 0; background: #e7f8ef; color: #0a8a4e; font-weight: 600; font-size: 12px; padding: 5px 12px; border-radius: 999px; cursor: pointer; flex-shrink: 0; }
.addr-box { background: var(--sky); border: 1.5px dashed #a9c4f5; border-radius: 16px; padding: 14px; text-align: center; }
.addr-box code { display: block; font-size: 14px; word-break: break-all; font-weight: 600; color: var(--navy); margin: 6px 0 10px; }
.warn-box { background: #fff1f2; border: 1px solid #ffc9cd; color: #a3141f; border-radius: 14px; padding: 12px 14px; font-size: 13px; margin-top: 12px; }
.warn-box ul { margin: 6px 0 0; padding-left: 18px; }
.upload {
  border: 2px dashed #b9cdf2; border-radius: 16px; background: var(--sky-2); padding: 20px; text-align: center; cursor: pointer;
  color: var(--muted); font-size: 14px; position: relative;
}
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload .plus { font-size: 34px; color: var(--blue); line-height: 1; }
.upload img { max-height: 220px; margin: 0 auto; border-radius: 10px; }
.summary { background: var(--sky-2); border-radius: 14px; padding: 12px 14px; margin-top: 14px; }
.summary div { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; }
.summary .total { font-weight: 700; font-size: 16px; color: var(--blue-dark); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }

/* ---------- Equipo ---------- */
.team-head { background: linear-gradient(135deg, var(--red), #ff7a5c 50%, var(--gold)); color: #fff; border-radius: 22px; padding: 18px; box-shadow: var(--shadow); }
.team-head .link { background: rgba(255,255,255,.18); border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; word-break: break-all; }
.team-head .link button { background: #fff; color: var(--red); border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 700; cursor: pointer; flex-shrink: 0; }
.lvl-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.lvl-cards .card { text-align: center; padding: 12px 6px; margin: 0; }
.lvl-cards b { font-size: 22px; display: block; color: var(--blue-dark); }
.lvl-cards span { font-size: 12px; color: var(--muted); }
.lvl-cards em { font-style: normal; font-size: 11.5px; color: var(--red); font-weight: 600; }

/* ---------- Perfil ---------- */
.profile-head { background: linear-gradient(135deg, var(--blue-dark), var(--blue) 60%, var(--blue-2)); color: #fff; border-radius: 22px; padding: 20px; display: flex; gap: 14px; align-items: center; }
.avatar { width: 60px; height: 60px; border-radius: 50%; background: #fff; color: var(--blue); display: grid; place-items: center; font-weight: 800; font-size: 24px; flex-shrink: 0; }
.profile-head small { opacity: .85; display: block; }
.vip { display: inline-block; background: linear-gradient(90deg, #ffd36b, var(--gold)); color: #6b3d00; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-top: 4px; }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 62px - 84px - 40px); min-height: 380px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.chat-head img { width: 36px; }
.chat-head small { display: block; color: var(--green); font-size: 12px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; background: var(--sky-2); display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 78%; padding: 9px 13px; border-radius: 16px; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg img { max-width: 220px; border-radius: 10px; margin-bottom: 4px; cursor: pointer; }
.msg time { display: block; font-size: 10.5px; opacity: .7; margin-top: 3px; text-align: right; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; height: 44px; max-height: 120px; }
.chat-form .attach { position: relative; overflow: hidden; }
.chat-form .attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(140% 90% at 50% 0%, #3aa0ff 0%, var(--blue) 30%, var(--blue-dark) 62%, var(--navy) 100%); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 26px; padding: 26px 22px; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.auth-card .brand { justify-content: center; font-size: 22px; margin-bottom: 4px; }
.auth-card .auth-drone { width: 220px; margin: -4px auto 0; }
.auth-card p.sub { text-align: center; color: var(--muted); margin: 0 0 6px; font-size: 14px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.phone-in { display: flex; gap: 8px; }
.phone-in .pre { width: 86px; flex-shrink: 0; text-align: center; background: var(--sky); font-weight: 600; }

/* ---------- Modal y toasts ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(10,25,60,.55); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { background: #fff; border-radius: 22px; padding: 22px; width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-x { position: absolute; top: 10px; right: 12px; border: 0; background: var(--sky); width: 32px; height: 32px; border-radius: 50%; font-size: 20px; cursor: pointer; color: var(--muted); }
.modal h3 { margin-right: 30px; }
.confirm-text { font-size: 15px; margin: 6px 0 16px; }
.row-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
#toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 32px); max-width: 420px; }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 14px; font-size: 14px; box-shadow: var(--shadow); opacity: 0; transform: translateY(-10px); transition: .3s; }
.toast.show { opacity: 1; transform: none; }
.toast.err { background: #d0202c; }

.buy-sum { display: flex; gap: 14px; align-items: center; background: var(--sky); border-radius: 16px; padding: 12px; margin: 10px 0; }
.buy-sum img { width: 110px; }
.loader { display: grid; place-items: center; padding: 60px 0; }
.loader i { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--sky); border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Empresa ---------- */
.about-photo { border-radius: 18px; width: 100%; max-height: 320px; object-fit: cover; margin-bottom: 12px; }
.owner { display: flex; gap: 14px; align-items: center; background: var(--sky); border-radius: 16px; padding: 12px; margin-top: 12px; }
.owner img, .owner .avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.about-text { white-space: pre-line; color: #33425f; }
.feat { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.feat div { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; font-size: 13px; color: var(--muted); }
.feat b { display: block; color: var(--text); font-size: 14px; margin-bottom: 2px; }
.feat svg { width: 26px; height: 26px; color: var(--blue); margin-bottom: 4px; }

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .pkg-grid { grid-template-columns: repeat(2, 1fr); }
  .pkg { grid-template-columns: 1fr; }
  .pkg .pimg { height: 170px; }
  .pkg .pimg img { max-height: 160px; }
  .hero { padding: 30px; }
  .hero h1 { font-size: 30px; }
}
@media (min-width: 900px) {
  .app-shell { padding-bottom: 30px; }
  .bottomnav { display: none; }
  .topnav { display: flex; }
  .pkg-grid { grid-template-columns: repeat(4, 1fr); }
  .home-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
  .home-grid .balance-card { margin-top: 0; }
  .hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 280px; }
  .hero .hero-drone { margin: 0; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
  .two-col > .card + .card { margin-top: 0; }
  .narrow { max-width: 640px; margin: 0 auto; }
  .chat { height: calc(100vh - 62px - 60px); }
  .feat { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 559px) {
  .pkg .rate { top: auto; bottom: 10px; left: 8px; right: auto; font-size: 11px; padding: 3px 8px; }
}

/* ---------- Chat por temas ---------- */
.msg.sys { align-self: center; background: #eef3fb; color: var(--muted); font-size: 12.5px; text-align: center; max-width: 92%; border-radius: 12px; }
.topics { background: #fff; border-radius: 16px; padding: 14px; border: 1px solid var(--line); margin-top: 6px; }
.topic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.topic-grid button { display: flex; align-items: center; gap: 10px; text-align: left; border: 1.5px solid var(--line); background: var(--sky-2); border-radius: 14px; padding: 12px; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 13.5px; color: var(--text); transition: .15s; }
.topic-grid button:hover { border-color: var(--blue); background: var(--sky); }
.topic-grid svg { width: 22px; height: 22px; color: var(--blue); flex-shrink: 0; }
.admin-btn { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px 16px; border-radius: 18px; color: #fff; background: linear-gradient(90deg, var(--navy), #13306f); box-shadow: var(--shadow); }
.admin-btn > span { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.12); display: grid; place-items: center; }
.admin-btn svg { width: 22px; height: 22px; }
.admin-btn div { flex: 1; }
.admin-btn small { display: block; opacity: .75; font-size: 12px; }

/* ---------- Pantallas grandes: usar todo el ancho ---------- */
@media (min-width: 900px) {
  .narrow { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
  .span-all { grid-column: 1 / -1; }
  .profile-page > .balance-card, .profile-page > .admin-btn { grid-column: 1; }
  .profile-page > .menu-list { grid-column: 2; grid-row: 2 / span 3; }
  .narrow > .page-head, .narrow > .notice, .narrow > p, .narrow > .profile-head { grid-column: 1 / -1; }
  .narrow > #body { display: contents; }
  .narrow > .card, .narrow > .balance-card, .narrow > .admin-btn, .narrow > form.card, #body > .card { margin: 0 !important; }
  .narrow .card + .card { margin-top: 0; }
  .chat-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
  .chat-wrap > .card { margin-top: 0 !important; }
  .chat-wrap > .chat:only-child { grid-column: 1 / -1; }
  .topic-grid { grid-template-columns: repeat(3, 1fr); }
  .two-col { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
}

/* ---------- Plan inactivo (abre en X días) ---------- */
.pkg.locked .pimg img { filter: grayscale(1); opacity: .45; }
.pkg.locked .rate { background: #9aa7c0; }
.pkg.locked h4, .pkg.locked .price { color: #7d8aa6; }
.pkg .soon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(10,31,77,.88); color: #fff; font-weight: 700; font-size: 12.5px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; box-shadow: var(--shadow-sm); }

.bonus-line { margin-top: 10px; background: rgba(255,255,255,.12); border: 1px dashed rgba(255,255,255,.35); border-radius: 12px; padding: 8px 12px; font-size: 13px; }
.bonus-line small { display: block; opacity: .75; font-size: 11.5px; }
.auth-card .bonus-line { border-style: solid; text-align: center; margin: 6px 0 4px; }

/* iPhone/Safari: evita que las tarjetas se "dupliquen" o dejen rastros al hacer scroll */
.pkg, .card, .balance-card, .hero { -webkit-transform: translateZ(0); transform: translateZ(0); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.pkg .pbody { min-width: 0; }
.pkg .pdesc { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: unset; }
