/* MailGamer — identidad: negro profundo + rojo neón + plata. Proporción 70 / 20 / 10 */
:root {
  --bg: #08090D; --bg2: #0E1015; --card: #14161D; --surface: #1B1E27; --line: rgba(255, 255, 255, .10);
  --red: #FF2525; --red2: #D90429; --silver: #AEB6C2; --muted: #9298A5; --text: #FFFFFF; --soft: #D9DCE2;
  --green: #22C55E; --yellow: #FACC15; --err: #EF4444; --blue: #3B82F6;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; background: var(--bg); color: var(--soft);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--silver); text-decoration: none; }
a:hover { color: var(--text); }
h1, h2, h3 { color: var(--text); margin: 0; letter-spacing: .02em; }
h2 { font-size: 16px; text-transform: uppercase; letter-spacing: .08em; }
h3 { font-size: 15px; margin: 18px 0 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--silver); }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; color: var(--text); }
small { display: block; color: var(--muted); font-size: 12.5px; }
.muted { color: var(--muted); } .hint { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; } .center { text-align: center; }
.t-green { color: var(--green) !important; } .t-red { color: var(--red) !important; } .t-yellow { color: var(--yellow) !important; }

/* ---------- Estructura ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 264px; flex: 0 0 264px; background: #07070A; border-right: 1px solid #1c1e25;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30; overflow: hidden;
}
.side::after { /* destello rojo inferior */
  content: ""; position: absolute; right: -70px; bottom: -70px; width: 190px; height: 190px; pointer-events: none;
  background: linear-gradient(135deg, transparent 49%, rgba(255, 43, 43, .55) 50%, rgba(217, 4, 41, .12) 62%, transparent 63%);
}
.brand { display: block; position: relative; z-index: 1; line-height: 0; }
.brand img { display: block; width: 100%; height: auto; -webkit-mask-image: linear-gradient(#000 86%, transparent); mask-image: linear-gradient(#000 86%, transparent); }
.side nav {
  position: relative; z-index: 1; flex: 1; overflow-y: auto; margin: 4px 0 0 12px; padding: 14px 14px 14px 12px;
  border-left: 1px solid rgba(255, 43, 43, .65); border-top: 1px solid rgba(255, 43, 43, .25); border-top-left-radius: 22px;
  box-shadow: inset 8px 0 16px -12px rgba(255, 43, 43, .8);
}
.side nav a, .side-foot a {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 14px; margin-bottom: 10px;
  background: #13151B; border: 1px solid #1d2028; color: var(--text); font-weight: 500; font-size: 16px; transition: .15s;
}
.side nav a:hover, .side-foot a:hover { background: #1b1e27; border-color: rgba(255, 43, 43, .45); color: var(--text); }
.side nav a.on, .side-foot a.on {
  background: linear-gradient(180deg, #FF2B2B 0%, #B00018 55%, #7A0010 100%); border-color: #FF7A7A; color: #fff; font-weight: 600;
  box-shadow: 0 0 18px rgba(255, 43, 43, .65), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.side-foot { position: relative; z-index: 1; padding: 16px 40px 8px 16px; border-top: 1px solid rgba(255, 43, 43, .45); }
.side .ico { width: 24px; height: 24px; flex: 0 0 24px; }
.ico { width: 19px; height: 19px; flex: 0 0 19px; color: inherit; }
.main { flex: 1; min-width: 0; }
.top {
  display: flex; align-items: center; gap: 14px; padding: 14px 26px; border-bottom: 1px solid var(--line);
  background: rgba(11, 11, 15, .9); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20;
}
.top h1 { font-size: 19px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 10px; }
.who-name { color: var(--text); font-weight: 600; }
.burger { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px; cursor: pointer; }
.burger span { display: block; width: 18px; height: 2px; background: var(--silver); margin: 3px 0; }
.content { padding: 24px 26px 60px; max-width: 1280px; }
.back { color: var(--muted); font-size: 13.5px; }

/* ---------- Tarjetas y estadísticas ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { flex: 1; min-width: 160px; }
.cards.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 20px; }
.cards.two .card { margin-bottom: 0; } .cards.two { margin-bottom: 20px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  background: linear-gradient(160deg, #191c26, var(--card)); border: 1px solid var(--line); border-top: 2px solid var(--red);
  border-radius: var(--radius); padding: 16px 18px; display: block;
}
a.stat:hover { border-color: #3a3f49; border-top-color: var(--red); }
.stat span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.stat b { display: block; color: var(--text); font-size: 28px; line-height: 1.25; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 9px 18px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--text); word-break: break-word; }
.meter { margin-bottom: 14px; }
.meter-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.bar { height: 6px; background: rgba(255, 255, 255, .09); border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red2), var(--red)); border-radius: 6px; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px -8px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 600; }
td { padding: 11px 12px; border-bottom: 1px solid #20232b; vertical-align: middle; white-space: nowrap; }
td small { white-space: normal; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .02); }
td b { color: var(--text); font-weight: 600; }
.r { text-align: right; }
.actions { white-space: normal; min-width: 250px; } .actions form { display: inline; } .actions > * { margin: 2px 0 2px 4px; }
.empty { text-align: center; color: var(--muted); padding: 26px 12px; }

/* ---------- Etiquetas ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .09); color: var(--silver); white-space: nowrap; }
.b-green { background: rgba(34, 197, 94, .14); color: var(--green); }
.b-yellow { background: rgba(250, 204, 21, .14); color: var(--yellow); }
.b-red { background: rgba(239, 68, 68, .16); color: #ff6b6b; }
.b-blue { background: rgba(59, 130, 246, .16); color: #7fb0ff; }
.svc { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 14.5px; white-space: nowrap; }
.svc::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--red)); box-shadow: 0 0 8px var(--c, var(--red)); }

/* ---------- Botones y formularios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; white-space: nowrap;
  font: inherit; font-weight: 600; padding: 9px 16px; border-radius: 9px;
  background: var(--surface); color: var(--text); border: 1px solid rgba(255, 255, 255, .14); transition: .15s;
}
.btn:hover { border-color: var(--red); color: var(--text); }
.btn-primary { background: linear-gradient(180deg, var(--red), var(--red2)); border-color: var(--red2); box-shadow: 0 0 16px rgba(255, 43, 43, .22); }
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 0 22px rgba(255, 43, 43, .4); }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; color: #ff6b6b; border-color: rgba(239, 68, 68, .4); }
.btn-danger:hover { background: rgba(239, 68, 68, .14); border-color: var(--err); color: #ff8b8b; }
.btn-wa { background: rgba(34, 197, 94, .14); color: var(--green); border-color: rgba(34, 197, 94, .4); }
.btn-wa:hover { border-color: var(--green); color: var(--green); }
.btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 7px; }
.btn-xs { padding: 2px 8px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; margin-top: 12px; padding: 12px; }
label { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 5px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; outline: none;
}
input:focus, select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 43, 43, .16); }
input[type=color] { padding: 4px; height: 42px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input, .filters select { margin: 0; width: auto; min-width: 150px; padding: 8px 11px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.tabs a.on { border-color: var(--red); color: var(--text); background: rgba(255, 43, 43, .1); }
.alert { padding: 11px 15px; border-radius: 9px; margin-bottom: 16px; border: 1px solid; }
.alert.ok { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .35); color: #86efac; }
.alert.err { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .4); color: #fca5a5; }
.alert.warn { background: rgba(250, 204, 21, .08); border-color: rgba(250, 204, 21, .35); color: #fde68a; }

textarea { min-height: 240px; resize: vertical; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; line-height: 1.55; }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.note { background: var(--card); border: 1px solid var(--line); border-top: 2px solid var(--red); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; }
.note h3 { margin: 0; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 16px; word-break: break-word; }
.note pre { flex: 1; margin: 10px 0 12px; padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; color: var(--soft); white-space: pre-wrap; word-break: break-word; max-height: 230px; overflow: auto; font: 13.5px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; }
.note .actions { min-width: 0; text-align: right; }
.price-pair small { display: inline; }

/* ---------- Modales ---------- */
.modal { background: var(--card); color: var(--soft); border: 1px solid #3a3f49; border-top: 2px solid var(--red); border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 28px)); }
.modal::backdrop { background: rgba(0, 0, 0, .72); }
.modal form { padding: 22px; }
.modal h3 { margin-top: 0; color: var(--text); font-size: 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* ---------- Acceso / membresía vencida ---------- */
body.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(900px 500px at 50% -10%, rgba(255, 43, 43, .16), transparent 60%), var(--bg);
}
.auth-card { width: min(410px, 100%); background: var(--card); border: 1px solid var(--line); border-top: 2px solid var(--red); border-radius: 16px; padding: 28px; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.auth-card.wide { width: min(640px, 100%); }
.auth-card form { text-align: left; margin-top: 18px; }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-logo { width: 100%; max-width: 300px; height: auto; border-radius: 14px; margin: -6px auto 14px; display: block; }
.blocked h1 { color: var(--red); font-size: 26px; text-transform: uppercase; letter-spacing: .06em; }
.blocked .lead { color: var(--text); font-size: 16px; margin: 8px 0 4px; }
.blocked .phone { display: block; font-size: 32px; font-weight: 800; color: var(--text); letter-spacing: .05em; margin: 6px 0 10px; }
.blocked-icon { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; font-size: 30px; font-weight: 800; color: var(--red); border: 2px solid var(--red); box-shadow: 0 0 22px rgba(255, 43, 43, .45); }
.lead { color: var(--soft); }

/* ---------- Móvil ---------- */
@media (max-width: 860px) {
  .side { position: fixed; left: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: 20px 0 60px rgba(0, 0, 0, .6); }
  .side.open { transform: none; }
  .burger { display: block; }
  .top { padding: 12px 16px; } .content { padding: 16px 14px 50px; }
  .who-name { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .card { padding: 16px; } .table-wrap { margin: 0 -16px -6px; padding: 0 16px; }
  .stat b { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* =====================================================================
   Rediseño del panel (kit visual): barra superior, título, KPI y paneles
   ===================================================================== */
body {
  background:
    radial-gradient(720px 320px at 100% 0, rgba(255, 37, 37, .10), transparent 70%),
    linear-gradient(315deg, rgba(255, 37, 37, .07) 0, transparent 22%),
    var(--bg);
  background-attachment: fixed;
}
.main { position: relative; }
.main::before { /* figura decorativa, sutil y sin tapar datos */
  content: ""; position: absolute; top: 62px; right: 0; width: 522px; height: 146px; pointer-events: none; z-index: 0;
  background: url(hero.jpg) right top / cover no-repeat; opacity: .5; mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 45%), linear-gradient(to bottom, #000 45%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent, #000 45%), linear-gradient(to bottom, #000 45%, transparent); mask-composite: intersect;
}
.content { position: relative; z-index: 1; padding: 26px 26px 60px; max-width: 1640px; }

/* Barra superior */
.top { background: rgba(5, 6, 8, .92); border-bottom: 1px solid var(--line); padding: 10px 26px; min-height: 62px; gap: 12px; }
.top::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--red), transparent); opacity: .7; }
.top-brand { display: none; font-weight: 800; font-style: italic; font-size: 19px; letter-spacing: .03em; color: var(--text); }
.top-brand b { color: var(--red); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.bell { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--text); }
.bell:hover { border-color: rgba(255, 37, 37, .6); }
.bell .ico { width: 21px; height: 21px; }
.bell i { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font: 700 11px/19px inherit; font-style: normal; text-align: center; box-shadow: 0 0 10px rgba(255, 37, 37, .7); }
.user-menu { position: relative; padding-left: 12px; border-left: 1px solid var(--line); }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 6px; border-radius: 12px; color: var(--text); font-weight: 600; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--card); }
.user-menu summary > .ico { width: 16px; height: 16px; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; background: var(--card); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; padding: 6px; box-shadow: 0 18px 40px rgba(0, 0, 0, .6); z-index: 40; }
.user-menu .menu a { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px; color: var(--soft); font-weight: 500; }
.user-menu .menu a:hover { background: var(--surface); color: var(--text); }
.member { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; white-space: nowrap; color: var(--green); background: rgba(34, 197, 94, .10); border: 1px solid rgba(34, 197, 94, .55); }
.member .ico { color: var(--yellow); }
.member.warn { color: var(--yellow); background: rgba(250, 204, 21, .08); border-color: rgba(250, 204, 21, .5); }
.member.admin { color: #ff7b7b; background: rgba(255, 37, 37, .10); border-color: rgba(255, 37, 37, .5); }
.member.admin .ico { color: var(--red); }

/* Título de página */
.page-title { display: flex; align-items: center; gap: 16px; margin: 4px 0 30px; padding-bottom: 14px; position: relative; }
.page-title h1 { font-size: 34px; line-height: 1.15; font-weight: 800; letter-spacing: 0; min-width: 0; overflow-wrap: anywhere; }
.page-title::before { content: ""; position: absolute; left: 0; bottom: 0; width: min(420px, 100%); height: 1px; background: linear-gradient(90deg, rgba(255, 255, 255, .22), transparent); }
.page-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 90px; height: 3px; border-radius: 3px; background: var(--red); box-shadow: 0 0 12px rgba(255, 37, 37, .8); }
.ibox { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 12px; display: grid; place-items: center; color: #FF5555; background: linear-gradient(160deg, #23161a, var(--surface)); border: 1px solid rgba(255, 37, 37, .35); box-shadow: 0 0 18px rgba(255, 37, 37, .12); }
.ibox .ico { width: 27px; height: 27px; }

/* Tarjetas KPI */
.stats { gap: 20px; margin-bottom: 26px; }
.stat { position: relative; background: linear-gradient(170deg, #1a1c24, var(--card)); border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 10px 28px rgba(0, 0, 0, .28); }
.stat::after { content: ""; position: absolute; left: 18%; right: 0; bottom: -1px; height: 2px; border-radius: 0 0 var(--radius) 0; background: linear-gradient(90deg, transparent, var(--red)); opacity: .85; }
.stat.ok::after { background: linear-gradient(90deg, transparent, var(--green)); }
a.stat:hover { border-color: rgba(255, 37, 37, .45); border-top-color: rgba(255, 37, 37, .45); }
.stat span { color: var(--soft); font-size: 12.5px; letter-spacing: .04em; }
.stat b { font-size: 32px; font-weight: 800; }
.stat small em { font-style: normal; font-weight: 600; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.kpi { display: flex; align-items: center; gap: 14px; }
.kpi > div { border-left: 1px solid var(--line); padding-left: 14px; min-width: 0; }
.kpi .ibox { width: 54px; height: 54px; flex-basis: 54px; color: #FF5555; display: grid; }
.member .mlabel { display: inline; color: inherit; }

/* Paneles */
.card { position: relative; background: linear-gradient(175deg, #181a22, var(--card) 40%); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0, 0, 0, .28); }
.card::before { content: ""; position: absolute; top: -1px; left: -1px; width: 54px; height: 54px; border-top-left-radius: var(--radius); pointer-events: none; background: linear-gradient(135deg, rgba(255, 37, 37, .85) 0, rgba(255, 37, 37, .18) 20%, transparent 42%); }
.card::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -1px; height: 2px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--red), transparent); box-shadow: 0 0 14px rgba(255, 37, 37, .55); opacity: .8; }
.card > * { position: relative; }
.card-head { margin: -20px -20px 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 16.5px; }
.head-ico { color: #FF5555; display: grid; place-items: center; }
.head-ico .ico { width: 30px; height: 30px; }
.cards.two { gap: 20px; }
.empty-state { text-align: center; padding: 34px 16px 30px; color: var(--muted); }
.empty-state > .ico { width: 58px; height: 58px; color: #8d93a0; stroke-width: 1.2; margin-bottom: 10px; }
.empty-state strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.empty-state p { margin: 0; }
.empty-state a { color: var(--soft); text-decoration: underline; text-underline-offset: 3px; }
td { border-bottom-color: rgba(255, 255, 255, .06); }
th { border-bottom-color: var(--line); }
.btn { border-radius: 12px; } .btn-sm { border-radius: 9px; }
input, select, textarea { border-color: rgba(255, 255, 255, .14); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

@media (max-width: 860px) {
  .top { padding: 10px 14px; }
  .top-brand { display: block; }
  .main::before { display: none; }
  .content { padding: 18px 14px 50px; }
  .page-title { margin-bottom: 22px; gap: 12px; }
  .page-title h1 { font-size: 26px; }
  .ibox { width: 44px; height: 44px; flex-basis: 44px; }
  .card-head { margin: -16px -16px 14px; padding: 14px 16px; }
  .member { padding: 7px 10px; font-size: 12.5px; }
  .user-menu { padding-left: 8px; }
  .user-menu summary > .ico { display: none; }
  .top-right { gap: 8px; }
}
@media (max-width: 480px) {
  .member .mlabel, .top-brand { display: none; }
  .top { gap: 8px; }
  .kpis { grid-template-columns: 1fr; }
}

/* ---------- Lista de precios ---------- */
.page-actions { display: flex; align-items: center; gap: 20px; margin: -18px 0 24px; }
.page-actions p { flex: 1; margin: 0; color: var(--soft); }
.page-actions .btn { margin-left: auto; }
.btn-lg { padding: 13px 26px; font-size: 16.5px; border-radius: 12px; }
.card-glow { border-color: rgba(255, 37, 37, .55); box-shadow: 0 0 22px rgba(255, 37, 37, .16), 0 10px 28px rgba(0, 0, 0, .3); padding: 18px 20px 12px; }
.card-glow::before { display: none; }
.price-table th, .price-table td { text-align: center; }
.price-table .l { text-align: left; }
.price-table thead th { border-bottom: 0; text-transform: none; letter-spacing: 0; font-size: 15.5px; font-weight: 700; color: var(--text); padding: 6px 12px; }
.price-table thead .sub th { font-size: 14px; font-weight: 600; color: var(--soft); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.grp { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 9px 14px; border-radius: 10px; font-size: 16px; }
.grp .ico { width: 19px; height: 19px; }
.grp-screen { background: linear-gradient(180deg, rgba(139, 61, 255, .30), rgba(139, 61, 255, .12)); border: 1px solid rgba(160, 100, 255, .55); }
.grp-screen .ico { color: #c9a6ff; }
.grp-account { background: linear-gradient(180deg, rgba(255, 37, 37, .34), rgba(255, 37, 37, .12)); border: 1px solid rgba(255, 37, 37, .55); }
.grp-account .ico { color: #ff7b7b; }
.th-ico { display: inline-flex; align-items: center; gap: 8px; }
.th-ico .ico { width: 18px; height: 18px; color: var(--silver); }
.price-table tbody td { padding: 9px 12px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.price-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .018); }
.price-table .num { color: var(--text); font-weight: 700; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.price-table .dash { color: var(--muted); }
.price-table .sep { border-left: 1px solid rgba(255, 255, 255, .06); }
.price-table .actions { min-width: 270px; text-align: right; }
.price-table .btn .ico { width: 16px; height: 16px; }
.svc-cell { display: flex; align-items: center; gap: 16px; }
.svc-cell b { font-size: 17px; }
.svc-tile { width: 50px; height: 50px; flex: 0 0 50px; border-radius: 13px; display: grid; place-items: center; font-size: 24px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); background: linear-gradient(150deg, rgba(255, 255, 255, .22), rgba(0, 0, 0, .28)), var(--c, var(--red)); box-shadow: 0 0 14px -4px var(--c, var(--red)); }
.pill { display: inline-block; padding: 5px 14px; border-radius: 20px; font-weight: 700; font-size: 14px; background: rgba(255, 255, 255, .07); color: var(--soft); white-space: nowrap; }
.pill-g { background: rgba(34, 197, 94, .18); color: #4ade80; box-shadow: 0 0 12px rgba(34, 197, 94, .18); }
.pill-r { background: rgba(239, 68, 68, .18); color: #ff7b7b; }
@media (max-width: 860px) {
  .page-actions { flex-direction: column; align-items: stretch; margin-top: -8px; }
  .svc-tile { width: 42px; height: 42px; flex-basis: 42px; font-size: 20px; }
}

/* ---------- Clientes: cuentas activas ---------- */
td.wrap { white-space: normal; max-width: 420px; }
.chip { display: inline-flex; align-items: center; gap: 7px; margin: 2px 4px 2px 0; padding: 3px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 600; color: var(--text); background: rgba(255, 255, 255, .07); border: 1px solid var(--line); white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--red)); }
tr.detail > td { padding: 0 12px 14px; background: rgba(0, 0, 0, .25); white-space: normal; }
tr.detail:hover > td { background: rgba(0, 0, 0, .25); }
table.inner { border: 1px solid var(--line); border-left: 2px solid var(--red); border-radius: 10px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
table.inner th { font-size: 11px; padding: 8px 12px; }
table.inner td { padding: 8px 12px; }

/* ---------- Mis cuentas: barra de herramientas y tabla con banda ---------- */
.toolbar { flex-wrap: wrap; gap: 12px; }
.toolbar p { min-width: 240px; }
.toolbar .btn { margin-left: 0; padding: 11px 18px; }
.toolbar .btn .ico { width: 17px; height: 17px; }
.toolbar .filters { flex-wrap: wrap; gap: 12px; }
.field-ico { position: relative; display: inline-flex; align-items: center; }
.field-ico > .ico { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--silver); pointer-events: none; }
.field-ico input, .field-ico select { margin: 0; padding: 11px 14px 11px 40px; min-width: 230px; background: var(--card); border-radius: 12px; }
.band-table thead th { background: linear-gradient(180deg, rgba(255, 37, 37, .22), rgba(255, 37, 37, .10)); border-bottom: 1px solid rgba(255, 37, 37, .35); text-transform: none; letter-spacing: 0; font-size: 15.5px; font-weight: 700; color: var(--text); padding: 15px 14px; }
.band-table thead th:first-child { border-top-left-radius: 12px; }
.band-table thead th:last-child { border-top-right-radius: 12px; }
.band-table .th-ico .ico { color: #ff7b7b; }
.band-table tbody td { padding: 13px 14px; font-size: 15.5px; color: var(--text); }
.band-table .svc-cell b { font-size: 16.5px; }
.band-table .btn .ico { width: 16px; height: 16px; }
.band-table .btn-sm { padding: 8px 14px; font-size: 14px; }
.band-table .pill, .band-table .badge { margin-left: 6px; }
.band-table td a:not(.btn) { color: var(--text); }
.band-table td a:not(.btn):hover { color: #ff7b7b; }
@media (max-width: 860px) {
  .toolbar .filters, .field-ico, .field-ico input, .field-ico select { width: 100%; }
  .toolbar .btn { flex: 1; }
}

/* ---------- Imágenes de servicios ---------- */
.svc-tile.has-img { background: #0d0e12; box-shadow: 0 0 0 1px var(--line); overflow: hidden; text-shadow: none; }
.svc-tile.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.icon-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .02); }
.icon-item > div { flex: 1; min-width: 0; }
.icon-item b { color: var(--text); overflow-wrap: anywhere; }
.icon-item .btn .ico { width: 16px; height: 16px; }
.wrap-chips { margin: 0 0 6px; }
input[type=file] { padding: 8px; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: 12px; padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .14); background: var(--surface); color: var(--text); cursor: pointer; }

/* ---------- Ventas: selector de periodo ---------- */
.period { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 22px; padding: 16px 20px; }
.period .tabs { flex: 1; min-width: 260px; align-self: center; }
.period .tabs a { padding: 8px 14px; font-size: 14px; font-weight: 600; }
.period .filters { align-items: flex-end; }
.period .filters label { margin: 0; }
.period .filters input { min-width: 150px; margin-top: 4px; }
.period .hint { flex-basis: 100%; margin: 0; }
.period .hint b { color: var(--text); }

/* =====================================================================
   TELÉFONO: barra inferior, tablas como tarjetas, formularios tipo hoja
   ===================================================================== */
.tabbar, .scrim { display: none; }

@media (max-width: 860px) {
  /* Menú lateral deslizable con fondo oscurecido */
  .side { width: min(300px, 86vw); flex-basis: auto; z-index: 60; padding-bottom: env(safe-area-inset-bottom); }
  .side.open + .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .68); backdrop-filter: blur(2px); }
  .side nav { overflow-y: auto; }
  .burger { display: none; }
  .top-brand { display: block; }

  /* Barra de navegación inferior */
  .tabbar {
    display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(8, 9, 13, .96); backdrop-filter: blur(10px); border-top: 1px solid rgba(255, 37, 37, .45);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0, 0, 0, .55);
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px;
    background: none; border: 0; border-radius: 12px; color: var(--muted); font-family: inherit; font-size: 10.5px; font-weight: 600; line-height: 1.1; cursor: pointer; padding: 4px 0; min-width: 0;
  }
  .tabbar .ico { width: 23px; height: 23px; }
  .tabbar .on { color: #fff; background: linear-gradient(180deg, rgba(255, 37, 37, .30), rgba(255, 37, 37, .08)); box-shadow: inset 0 2px 0 var(--red); }
  .tabbar .on .ico { color: #ff5555; }
  .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  /* Controles cómodos para el dedo; 16px evita el zoom automático de iPhone */
  input, select, textarea { font-size: 16px; min-height: 46px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
  .btn-xs { min-height: 32px; padding: 5px 10px; }
  .card-head { gap: 10px; }
  .card-head h2 { flex-basis: 100%; }
  .card-head .filters, .card-head .filters input, .card-head .filters select { width: 100%; }
  .card-head > .btn, .card-head > a.btn { flex: 1; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
  .stat { padding: 16px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { flex-direction: column; align-items: flex-start; gap: 10px; }
  .kpi > div { border-left: 0; padding-left: 0; }
  .kpi .ibox { width: 42px; height: 42px; flex-basis: 42px; }
  .kpis .kpi:last-child { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .cards.two { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dt { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin-top: 10px; }
  .notes { grid-template-columns: 1fr; }
  .period { padding: 14px 16px; }
  .period .tabs, .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; flex-basis: 100%; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: 0 0 auto; padding: 9px 14px; }
  .period .filters { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .period .filters input { min-width: 0; width: 100%; }
  .period .filters .btn { grid-column: 1 / -1; }
  .page-actions p { font-size: 14px; }
  .icon-grid { grid-template-columns: 1fr; }
  .alert { font-size: 14.5px; }
  .user-menu .menu { position: fixed; right: 10px; top: 60px; }

  /* Formularios como hoja que sube desde abajo */
  .modal { width: 100% !important; max-width: 100%; margin: auto 0 0; border-radius: 20px 20px 0 0; border-left: 0; border-right: 0; border-bottom: 0; max-height: 92vh; max-height: 92dvh; overflow: hidden; }
  .modal form { padding: 18px 16px 0; max-height: 92vh; max-height: 92dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .modal form::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); margin: -6px auto 14px; }
  .modal-actions { position: sticky; bottom: 0; margin: 10px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
  .modal-actions .btn { flex: 1; }
  textarea { min-height: 200px; }
}

@media (max-width: 1439px) {
  /* Tablas → tarjetas */
  .table-wrap { overflow: visible; margin: 0; padding: 0; }
  table.cardy, table.cardy > tbody, table.cardy > tbody > tr, table.cardy > tbody > tr > td { display: block; width: 100%; }
  table.cardy > thead { display: none; }
  table.cardy > tbody > tr { border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; margin-bottom: 12px; background: rgba(255, 255, 255, .025); }
  table.cardy > tbody > tr:last-child { margin-bottom: 0; }
  table.cardy > tbody > tr > td {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; min-width: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06); border-left: 0; white-space: normal; text-align: right; background: none !important; font-size: 15px;
  }
  table.cardy > tbody > tr > td:last-child { border-bottom: 0; }
  table.cardy > tbody > tr > td[data-label]::before { content: attr(data-label); flex: 0 0 36%; text-align: left; color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
  table.cardy td > .v { min-width: 0; overflow-wrap: anywhere; }
  table.cardy td > .v small { display: block; }
  /* la primera celda es el título de la tarjeta */
  table.cardy > tbody > tr > td:first-child { justify-content: flex-start; text-align: left; padding: 12px 0; font-size: 16px; }
  table.cardy > tbody > tr > td:first-child::before { display: none; }
  table.cardy > tbody > tr > td:first-child > .v { width: 100%; }
  table.cardy > tbody > tr > td.actions { justify-content: flex-start; flex-wrap: wrap; gap: 8px; padding: 12px 0; min-width: 0 !important; text-align: left; }
  table.cardy > tbody > tr > td.actions > * { margin: 0; }
  table.cardy > tbody > tr > td.actions > .btn, table.cardy > tbody > tr > td.actions > form { flex: 1 1 auto; display: flex; }
  table.cardy > tbody > tr > td.actions form .btn { flex: 1; }
  table.cardy > tbody > tr > td.full { display: block; text-align: center; }
  table.cardy > tbody > tr > td.dash { display: none; }
  table.cardy > tbody > tr > td.wrap { max-width: none; }
  table.cardy td .chip, table.cardy td .badge, table.cardy td .pill { margin: 2px 0 2px 4px; }
  table.cardy td code { overflow-wrap: anywhere; }
  /* detalle desplegable de clientes */
  table.cardy > tbody > tr.detail { border: 0; padding: 0; margin: -6px 0 12px; background: none; }
  table.cardy > tbody > tr.detail[hidden] { display: none; }
  table.cardy > tbody > tr.detail > td { padding: 0; }
  table.inner { border: 0; border-radius: 0; overflow: visible; }
  table.inner.cardy > tbody > tr { border-left: 2px solid var(--red); background: rgba(0, 0, 0, .25); }
  .price-table .actions { min-width: 0; }
}

@media (max-width: 380px) {
  .kpis { grid-template-columns: 1fr; }
  .kpi { flex-direction: row; align-items: center; }
  .tabbar a, .tabbar button { font-size: 9.5px; }
}

@media (max-width: 860px) {
  .tabbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .meter-top { gap: 10px; }
  .member.admin { padding: 9px 10px; }
}

/* Lista de precios en pantallas medianas: columnas más compactas para que no haga falta desplazar */
@media (min-width: 1440px) and (max-width: 1700px) {
  .price-table .actions { min-width: 0; white-space: nowrap; }
  .price-table .btn-danger .lbl { display: none; }
  .price-table tbody td, .price-table thead th { padding-left: 8px; padding-right: 8px; }
  .price-table .svc-cell { gap: 12px; }
  .price-table .svc-cell small { white-space: nowrap; }
}
@media (max-width: 400px) {
  .period .filters { grid-template-columns: 1fr; }
}

/* Tabletas y portátiles pequeños: las tarjetas van en dos columnas */
@media (min-width: 721px) and (max-width: 1439px) {
  table.cardy > tbody { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  table.cardy > tbody > tr { margin-bottom: 0; }
  table.cardy > tbody > tr.detail, table.cardy > tbody > tr:only-child { grid-column: 1 / -1; }
  table.cardy > tbody > tr.detail { margin: 0; }
  table.inner.cardy > tbody { grid-template-columns: 1fr 1fr; }
}
/* Portátiles (1440–1700 px): tablas más compactas para que quepan sin desplazar */
@media (min-width: 1440px) and (max-width: 1700px) {
  .side { width: 232px; flex-basis: 232px; }
  .side nav a, .side-foot a { font-size: 15px; padding: 12px 13px; gap: 11px; }
  .side-foot { padding-right: 24px; }
  .content { padding-left: 20px; padding-right: 20px; }
  td, th { padding-left: 9px; padding-right: 9px; }
  .band-table thead th, .band-table tbody td { padding: 12px 9px; font-size: 14.5px; }
  .band-table .btn-danger .lbl { display: none; }
  .band-table .svc-tile { width: 42px; height: 42px; flex-basis: 42px; font-size: 20px; }
  .actions { min-width: 0; }
  td .btn-sm { padding: 5px 9px; }
}
@media (min-width: 861px) and (max-width: 1439px) {
  .cards.two { grid-template-columns: 1fr; }
  .side { width: 232px; flex-basis: 232px; }
  .side nav a, .side-foot a { font-size: 15px; padding: 12px 13px; gap: 11px; }
}
@media (max-width: 350px) {
  .top-brand { display: none; }
  .content { padding-left: 10px; padding-right: 10px; }
  .card { padding: 14px 12px; }
  .card-head { margin: -14px -12px 12px; padding: 12px; }
  .page-title h1 { font-size: 22px; }
  table.cardy > tbody > tr { padding: 4px 10px; }
  table.cardy > tbody > tr > td[data-label]::before { flex-basis: 34%; }
}

/* ---------- Detalle de cuenta: filas con ícono ---------- */
.detail-cards .card-glow { padding: 20px 22px 16px; }
.detail-cards .card-head { margin: -20px -22px 10px; padding: 18px 22px; }
.detail-cards .card-head h2 { font-size: 22px; text-transform: none; letter-spacing: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-cards .card-head h2 .svc { font-size: 24px; font-weight: 800; }
.detail-cards .card-head h2 .svc::before { width: 16px; height: 16px; border-radius: 50%; }
.detail-cards .card-head h2 .badge { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .18); }
.detail-cards .card-head .head-ico + h2 { text-transform: uppercase; letter-spacing: .04em; font-weight: 800; }
.btn-outline { background: rgba(255, 37, 37, .06); border-color: rgba(255, 37, 37, .7); box-shadow: 0 0 14px rgba(255, 37, 37, .18); }
.btn-outline .ico { width: 18px; height: 18px; color: #ff5555; }
.btn-pill { border-radius: 20px; padding: 4px 11px; gap: 6px; vertical-align: middle; }
.btn-pill .ico { width: 14px; height: 14px; }
.rows .row { display: grid; grid-template-columns: 26px minmax(120px, 190px) 1fr; align-items: center; gap: 0 14px; padding: 7px 0; }
.rows .row > .ico { width: 22px; height: 22px; color: var(--soft); }
.rows .k { color: var(--soft); font-size: 15.5px; }
.rows .val { border-left: 1px solid rgba(255, 255, 255, .16); padding-left: 22px; min-width: 0; overflow-wrap: anywhere; color: var(--text); }
.rows .val b { font-size: 16.5px; font-weight: 700; margin-right: 8px; }
.rows .val .secret { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .03em; }
.rows-lg .row { padding: 10px 0; }
.rows-lg .row > .ico { color: #ff5555; }
.rows-lg .row:last-child > .ico { color: var(--green); }
.rows-lg .val b { font-size: 18px; }
.rows .val b.big { font-size: 22px; }
.info-line { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.info-line .ico { width: 18px; height: 18px; flex: 0 0 18px; }
@media (max-width: 720px) {
  .rows .row { grid-template-columns: 24px 1fr; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
  .rows .row:last-child { border-bottom: 0; }
  .rows .k { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
  .rows .val { grid-column: 2; border-left: 0; padding-left: 0; }
  .detail-cards .card-head h2 .svc { font-size: 20px; }
  .detail-cards .card-glow { padding: 16px; }
  .detail-cards .card-head { margin: -16px -16px 8px; padding: 14px 16px; }
}

/* ---------- Botón «Volver» en barra ---------- */
.back-bar {
  position: relative; display: inline-flex; align-items: center; gap: 12px; width: fit-content; max-width: 100%; margin: -8px 0 22px; padding: 8px 18px 8px 8px;
  border-radius: 16px; border: 1px solid rgba(255, 37, 37, .55); color: var(--text); overflow: hidden;
  background: linear-gradient(115deg, #15161c 0%, #15161c 68%, rgba(255, 37, 37, .16) 68.2%, rgba(255, 37, 37, .05) 82%, #15161c 82.2%);
  box-shadow: 0 0 18px rgba(255, 37, 37, .22), inset 0 -2px 0 var(--red); transition: .15s;
}
.back-bar:hover { color: #fff; border-color: var(--red); box-shadow: 0 0 26px rgba(255, 37, 37, .45), inset 0 -2px 0 var(--red); }
.back-bar .arrow { width: 46px; height: 40px; flex: 0 0 46px; display: grid; place-items: center; border-radius: 11px; border: 1px solid rgba(255, 37, 37, .8); background: rgba(255, 37, 37, .10); box-shadow: 0 0 12px rgba(255, 37, 37, .3); transition: transform .15s; }
.back-bar:hover .arrow { transform: translateX(-3px); }
.back-bar .arrow .ico { width: 24px; height: 24px; stroke-width: 2.2; }
.back-bar .txt { font-size: 19px; font-weight: 800; padding-left: 16px; border-left: 1px solid rgba(255, 37, 37, .7); line-height: 1.5; }
@media (max-width: 720px) { .back-bar { margin-top: -4px; } .back-bar .txt { font-size: 17px; } }

/* ---------- Botón «Instalar app» ---------- */
.btn-install {
  position: relative; display: inline-flex; align-items: center; gap: 12px; height: 42px; padding: 0 18px 0 16px;
  border-radius: 999px; border: 1px solid rgba(255, 37, 37, .55); color: var(--text); overflow: hidden; cursor: pointer;
  background: linear-gradient(115deg, #15161c 0%, #15161c 55%, rgba(255, 37, 37, .18) 55.3%, rgba(255, 37, 37, .06) 72%, #15161c 72.3%);
  box-shadow: 0 0 16px rgba(255, 37, 37, .22), inset 0 -2px 0 var(--red); transition: .15s; font: inherit;
}
.btn-install:hover { color: #fff; border-color: var(--red); box-shadow: 0 0 24px rgba(255, 37, 37, .45), inset 0 -2px 0 var(--red); }
.btn-install:disabled { opacity: .55; cursor: default; }
.btn-install .ico { width: 20px; height: 20px; flex: 0 0 auto; color: #fff; filter: drop-shadow(0 0 6px rgba(255, 37, 37, .85)); }
.btn-install span { font-size: 14px; font-weight: 800; padding-left: 12px; border-left: 1px solid rgba(255, 37, 37, .7); line-height: 1.2; white-space: nowrap; }
.btn-install.block { width: 100%; justify-content: center; margin-top: 12px; }
@media (max-width: 560px) { .btn-install span { display: none; } .btn-install { padding: 0 11px; gap: 0; } }


/* ---------- Landing (index.php) — paleta y tokens del kit de rediseño ---------- */
body.landing {
  --bg: #050509; --bg2: #10080D; --card: #100D12; --surface: #171920; --line: rgba(255, 255, 255, .10);
  --red: #FF202F; --red2: #B80E20; --panel-edge: #4B111B;
  background:
    radial-gradient(1100px 520px at 8% 0%, rgba(255, 32, 47, .16), transparent 60%),
    radial-gradient(1100px 520px at 92% 0%, rgba(255, 32, 47, .16), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 90px),
    var(--bg);
  overflow-x: clip; position: relative;
}
body.landing .btn { border-radius: 22px; }
body.landing .btn-sm { border-radius: 16px; }
body.landing .btn-lg { border-radius: 22px; padding: 14px 28px; font-size: 16.5px; }
body.landing .btn-primary { box-shadow: 0 0 22px rgba(255, 31, 54, .32); }
body.landing .btn-ghost { border-color: rgba(255, 255, 255, .20); }

.lnd-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 3vw, 48px); width: 100%; }
.lnd-brand img { height: 36px; display: block; }
.lnd-top-right { display: flex; align-items: center; gap: 12px; }

.lnd-hero {
  position: relative; text-align: center; padding: 40px clamp(16px, 3vw, 48px) 10px; width: 100%; z-index: 2; overflow: visible;
}

/* Panel central: esquinas 34px y borde rojo luminoso (design_tokens del kit) */
.lnd-panel {
  position: relative; z-index: 2; max-width: 980px; margin: 0 auto; padding: 46px clamp(20px, 4vw, 64px) 44px;
  border-radius: 34px; border: 1px solid rgba(255, 32, 47, .72);
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .022) 0 2px, transparent 2px 60px),
    linear-gradient(165deg, #16101a 0%, var(--card) 55%, #0b0a0f 100%);
  box-shadow: 0 0 24px rgba(255, 32, 47, .38), 0 24px 70px rgba(0, 0, 0, .55), inset 0 0 60px rgba(255, 32, 47, .05);
}
.lnd-hero-logo { height: 96px; width: auto; object-fit: contain; display: block; margin: 0 auto 14px; filter: drop-shadow(0 0 24px rgba(255, 32, 47, .4)); }
.lnd-hero h1 { font-size: clamp(26px, 4.2vw, 42px); line-height: 1.15; margin: 0 0 14px; font-weight: 800; }
.lnd-h1-line { display: block; width: min(420px, 70%); height: 2px; margin: 0 auto 20px; background: linear-gradient(90deg, transparent, var(--red), transparent); box-shadow: 0 0 14px rgba(255, 32, 47, .7); }
.lnd-hero .lead { font-size: 16.5px; max-width: 640px; margin: 0 auto; color: #B9B9C4; }
.lnd-hero-cta { display: flex; justify-content: center; gap: 14px; margin-top: 30px; flex-wrap: wrap; position: relative; z-index: 2; }

/* fondo decorativo del hero, recortado para que nunca invada otras secciones */
.lnd-hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.lnd-neon { position: absolute; top: -20%; width: 2px; height: 140%; background: linear-gradient(var(--red), transparent 70%); opacity: .45; box-shadow: 0 0 14px rgba(255, 32, 47, .6); }
.lnd-neon.l1 { left: 18%; transform: rotate(14deg); }
.lnd-neon.l2 { left: 23%; transform: rotate(14deg); opacity: .25; }
.lnd-neon.l3 { right: 19%; transform: rotate(-14deg); }
/* franjas rojas diagonales de las esquinas */
.lnd-streak { position: absolute; top: -30%; width: 150px; height: 170%; opacity: .5; background: linear-gradient(90deg, transparent, rgba(255, 32, 47, .55) 45%, rgba(255, 32, 47, .9) 50%, rgba(255, 32, 47, .55) 55%, transparent); filter: blur(6px); }
.lnd-streak.s-left { left: -40px; transform: rotate(18deg); }
.lnd-streak.s-right { right: -40px; transform: rotate(-18deg); }
@media (max-width: 900px) { .lnd-hero-bg { display: none; } }

/* tiles genéricos de apps (sin logos de marcas reales) */
.tile { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; box-shadow: 0 8px 18px rgba(0, 0, 0, .5), 0 0 0 1px var(--line) inset; }
.tile svg { width: 26px; height: 26px; }
.tile.c-red { background: linear-gradient(155deg, rgba(255, 32, 47, .35), var(--surface)); color: #ff5c6b; }
.tile.c-blue { background: linear-gradient(155deg, rgba(59, 130, 246, .32), var(--surface)); color: #7cb0ff; }
.tile.c-green { background: linear-gradient(155deg, rgba(34, 197, 94, .32), var(--surface)); color: #6fe6a0; }
.tile.c-purple { background: linear-gradient(155deg, rgba(168, 85, 247, .32), var(--surface)); color: #c99bff; }

/* Ilustración izquierda: panel de iconos + control */
.lnd-device { position: absolute; top: 90px; z-index: 1; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .55)); }
.lnd-tv { left: clamp(16px, 3vw, 48px); }
.lnd-tv-screen {
  width: 190px; padding: 14px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; place-items: center;
  background: linear-gradient(160deg, #15111a, var(--card)); border: 1px solid rgba(255, 32, 47, .6); border-radius: 24px;
  box-shadow: 0 0 22px rgba(255, 32, 47, .3), 0 18px 40px rgba(0, 0, 0, .6);
}
.lnd-tv-line { display: block; width: 120px; height: 2px; margin: 22px auto 16px; background: linear-gradient(90deg, transparent, var(--red), transparent); box-shadow: 0 0 12px rgba(255, 32, 47, .7); }
.lnd-controller { display: block; width: 84px; height: auto; margin: 0 auto; color: var(--red); filter: drop-shadow(0 0 10px rgba(255, 32, 47, .55)); }

/* Ilustración derecha: laptop con mini dashboard */
.lnd-laptop { right: clamp(16px, 3vw, 48px); }
.lnd-laptop-screen {
  width: 220px; height: 134px; padding: 10px; display: flex; gap: 8px;
  background: linear-gradient(155deg, var(--surface), var(--bg2)); border: 1px solid var(--line); border-radius: 12px 12px 4px 4px; box-shadow: 0 0 0 6px var(--card);
}
.lnd-dash-nav { display: flex; flex-direction: column; gap: 7px; padding-right: 8px; border-right: 1px solid var(--line); }
.lnd-dash-nav span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); }
.lnd-dash-nav span .ico { width: 13px; height: 13px; }
.lnd-dash-nav span.on { background: var(--red); color: #fff; }
.lnd-dash-main { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.lnd-dash-bars { flex: 1; display: flex; align-items: flex-end; gap: 5px; }
.lnd-dash-bars i { flex: 1; background: linear-gradient(var(--red), var(--red2)); border-radius: 3px 3px 0 0; display: block; }
.lnd-dash-line { width: 100%; height: 30px; color: var(--red); }
.lnd-laptop-base { width: 260px; height: 10px; margin: 0 auto; background: var(--card); border-radius: 0 0 8px 8px; position: relative; top: -2px; }
.lnd-laptop-base::before { content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 46px; height: 4px; background: var(--line); border-radius: 0 0 4px 4px; }

/* las ilustraciones laterales solo caben junto al panel de 980px en pantallas anchas */
@media (max-width: 1580px) { .lnd-device { display: none; } }

.lnd-divider { width: min(760px, 86%); height: 2px; margin: 34px auto 0; background: linear-gradient(90deg, transparent, var(--red), transparent); box-shadow: 0 0 16px rgba(255, 31, 54, .6); border-radius: 2px; position: relative; z-index: 2; }

.lnd-section { position: relative; width: 100%; margin: 0 auto; padding: 36px clamp(16px, 3vw, 48px); z-index: 2; }
.lnd-h2 { text-align: center; font-size: 24px; text-transform: none; letter-spacing: 0; margin-bottom: 28px; font-weight: 800; }
.lnd-section .lead.center { text-align: center; }

.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feat-grid { grid-template-columns: 1fr; } }
.feat {
  position: relative; overflow: hidden; background: linear-gradient(150deg, var(--surface) 0%, var(--card) 100%);
  border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: 0 14px 40px rgba(0, 0, 0, .4);
}
.feat::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 55%, rgba(255, 255, 255, .05) 60%, transparent 65%); pointer-events: none; }
.feat-ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(160deg, var(--red), var(--red2)); color: #fff; margin-bottom: 14px; box-shadow: 0 0 18px rgba(255, 31, 54, .4); }
.feat-ico .ico { width: 24px; height: 24px; }
.feat h3 { font-size: 16px; margin-bottom: 6px; font-weight: 800; }
.feat p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.lnd-feats { position: relative; }
.lnd-pad { position: absolute; right: 6px; bottom: -34px; width: 190px; height: auto; color: var(--red); opacity: .5; filter: drop-shadow(0 0 18px rgba(255, 31, 54, .45)); pointer-events: none; }
@media (max-width: 900px) { .lnd-pad { display: none; } }

.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; align-items: start; }
.plans-grid.one { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
.plan { position: relative; background: linear-gradient(150deg, var(--surface) 0%, var(--card) 100%); border: 1px solid var(--line); border-radius: 24px; padding: 26px 22px; text-align: center; box-shadow: 0 14px 40px rgba(0, 0, 0, .4); }
.plan h3 { font-size: 17px; text-transform: uppercase; letter-spacing: .06em; color: var(--silver); margin-bottom: 10px; }
.plan-price { font-size: 32px; font-weight: 800; color: var(--text); margin-bottom: 18px; }
.plan-price span { font-size: 14px; font-weight: 600; color: var(--muted); }
.plan-list { list-style: none; margin: 0 0 22px; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.plan-list li { font-size: 14px; color: var(--soft); padding-left: 22px; position: relative; }
.plan-list li::before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: rgba(34, 197, 94, .15); border: 1px solid var(--green); }
.plan.featured { border-color: var(--red); box-shadow: 0 0 30px rgba(255, 31, 54, .3); transform: scale(1.03); }
.plans-grid.one .plan.featured { transform: none; }
.plan-tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 5px 14px; border-radius: 999px; white-space: nowrap; }

#login { padding-top: 10px; scroll-margin-top: 20px; }
#login .auth-card { margin: 0 auto; }
.lnd-foot { position: relative; z-index: 2; text-align: center; color: var(--muted); font-size: 13px; padding: 24px 20px 36px; }
.lnd-foot p { margin: 14px 0 0; }
.lnd-foot .btn-wa { font-size: 15px; padding: 12px 22px; }
body.landing .btn-wa { background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .45); color: #4ade80; }
body.landing .btn-wa:hover { background: rgba(34, 197, 94, .22); border-color: #22C55E; color: #6ee7a0; }

.auth-back { display: block; text-align: left; font-size: 13px; color: var(--muted); margin: -4px 0 10px; }
.auth-back:hover { color: var(--text); }

@media (max-width: 680px) {
  .lnd-top { padding: 14px 16px; }
  .plan.featured { transform: none; }
}
