/* Club de Egresados · Cromática Coaching · V1.0 */
:root {
  --ink: #0b1215; --ink-2: #1b2428; --ink-3: #2b363b;
  --gold: #d6a400; --gold-d: #9a7212; --gold-l: #f1d27a;
  --gold-grad: linear-gradient(135deg, #8c6514 0%, #d6a400 45%, #f3d77f 70%, #b98a1c 100%);
  --plat-grad: linear-gradient(135deg, #6f7479 0%, #c9ccd0 45%, #f4f5f6 65%, #9aa0a6 100%);
  --bg: #f6f3ec; --card: #ffffff; --line: #e9e2d3; --line-2: #f1ece1;
  --text: #14181b; --muted: #6b7175; --ok: #1e8e5a; --ok-bg: #e7f5ee; --err: #b83227; --err-bg: #fbecea; --warn-bg: #fff6dc;
  --r: 16px; --r-sm: 10px; --shadow: 0 1px 2px rgba(11,18,21,.05), 0 8px 24px rgba(11,18,21,.06);
  font-family: Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--gold-d); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 800; } h2 { font-size: 1.2rem; font-weight: 700; } h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .gold-t { color: var(--gold-d); }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .grid.c2 { grid-template-columns: 1fr 1fr; } .grid.c3 { grid-template-columns: repeat(3, 1fr); } .grid.c4 { grid-template-columns: repeat(4, 1fr); } }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* ---------- Botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px; font: inherit; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .2s, background .2s; min-height: 46px; }
.btn:active { transform: scale(.98); }
.btn.gold { background: var(--gold-grad); color: var(--ink); box-shadow: 0 6px 18px rgba(214,164,0,.35); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--gold); }
.btn.link { background: none; color: var(--gold-d); padding: 6px 4px; min-height: 0; }
.btn.sm { padding: 7px 14px; min-height: 36px; font-size: .85rem; }
.btn.block { width: 100%; }
.btn.danger { background: var(--err-bg); color: var(--err); }
.btn[disabled] { opacity: .55; cursor: default; }
label.f { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 12px; }
label.f > span { display: block; margin-bottom: 5px; }
input, select, textarea { width: 100%; font: inherit; color: inherit; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; outline: none; transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(214,164,0,.15); }
textarea { min-height: 84px; resize: vertical; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--gold-d); flex: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; font-weight: 500; margin: 8px 0; cursor: pointer; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { padding: 11px 14px; border-radius: var(--r-sm); font-size: .9rem; margin: 10px 0; }
.msg.err { background: var(--err-bg); color: var(--err); } .msg.ok { background: var(--ok-bg); color: var(--ok); } .msg.warn { background: var(--warn-bg); color: #7a5a00; }

/* ---------- Tarjetas ---------- */
.card { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card h2 { display: flex; align-items: center; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.tag.gold { background: #fbf1cf; color: #7a5a00; } .tag.ok { background: var(--ok-bg); color: var(--ok); } .tag.err { background: var(--err-bg); color: var(--err); } .tag.dark { background: var(--ink); color: var(--gold-l); }
.tag.live { background: #e11d48; color: #fff; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--gold-grad); color: var(--ink); display: grid; place-items: center; font-weight: 800; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 96px; height: 96px; font-size: 1.8rem; }

/* ---------- Tarjeta de membresía ---------- */
.member { position: relative; border-radius: 22px; padding: 22px; color: #fff; overflow: hidden; background: radial-gradient(120% 90% at 100% 0%, #26323a 0%, var(--ink) 60%); box-shadow: 0 18px 40px rgba(11,18,21,.28); min-height: 200px; }
.member::before { content: ""; position: absolute; inset: 0; border-radius: 22px; padding: 1.5px; background: var(--gold-grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.member.platino::before { background: var(--plat-grad); }
.member .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.member .brand { display: flex; align-items: center; gap: 10px; }
.member .brand img { width: 42px; height: 42px; }
.member .brand b { display: block; font-size: .95rem; letter-spacing: .02em; }
.member .brand small { color: #b9c0c4; font-size: .75rem; }
.member .level { font-weight: 800; letter-spacing: .18em; font-size: .78rem; padding: 6px 12px; border-radius: 999px; color: var(--ink); background: var(--gold-grad); }
.member.platino .level { background: var(--plat-grad); }
.member .pts { margin-top: 26px; }
.member .pts b { font-size: 2.4rem; font-weight: 800; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.member .pts span { display: block; color: #b9c0c4; font-size: .8rem; margin-top: 4px; letter-spacing: .04em; }
.member .bottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 18px; gap: 10px; font-size: .82rem; color: #d4d9dc; }
.member .bottom b { display: block; color: #fff; font-size: 1rem; }

/* ---------- Eventos ---------- */
.ev { display: flex; gap: 14px; align-items: flex-start; }
.ev .date { width: 58px; flex: none; text-align: center; border-radius: 12px; background: var(--ink); color: #fff; padding: 8px 4px; }
.ev .date b { display: block; font-size: 1.35rem; line-height: 1; color: var(--gold-l); }
.ev .date small { text-transform: uppercase; font-size: .7rem; letter-spacing: .08em; }
.ev .body { flex: 1; min-width: 0; }
.ev .body h3 { margin-bottom: 2px; }
.ev-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: var(--ink); margin-bottom: 14px; }
.ev + .ev-wrap, .ev-wrap + .ev, .ev-wrap + .ev-wrap { border-top: 1px solid var(--line-2); padding-top: 16px; margin-top: 16px; }
.ev-wrap .ev { border: 0; padding: 0; margin: 0; }
.cover-pick { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; border: 2px dashed var(--line); background: #fbfaf7 center / cover no-repeat; display: grid; place-items: center; text-align: center; cursor: pointer; color: var(--muted); overflow: hidden; }
.cover-pick.has { border-style: solid; border-color: transparent; color: transparent; }
.cover-pick.has:hover { color: #fff; background-color: #000; } .cover-pick.has:hover::after { content: "Cambiar imagen"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(11,18,21,.55); color: #fff; font-weight: 700; }
.thumb { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; background: var(--line-2); }
.video { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; margin-top: 10px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Beneficios ---------- */
.ben { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-2); position: relative; }
.ben .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fbf1cf; color: var(--gold-d); flex: none; }
.ben.gold .ic { background: var(--ink); color: var(--gold-l); }
.ben.locked { background: #fbfaf7; }
.ben.locked .body { opacity: .6; }
.ben .lock { position: absolute; top: 12px; right: 12px; color: var(--gold-d); }
.code { font-family: ui-monospace, Consolas, monospace; background: var(--ink); color: var(--gold-l); padding: 6px 12px; border-radius: 8px; letter-spacing: .08em; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.upsell { background: var(--ink); color: #fff; border-radius: var(--r); padding: 22px; position: relative; overflow: hidden; }
.upsell::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: var(--gold-grad); opacity: .18; }
.upsell h2 { color: var(--gold-l); }

/* ---------- Puntos ---------- */
.mov { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.mov:last-child { border-bottom: 0; }
.mov .n { font-weight: 800; white-space: nowrap; } .mov .n.pos { color: var(--ok); } .mov .n.neg { color: var(--err); }
.how { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.how b { color: var(--gold-d); }

/* ---------- Estructura de la app del egresado ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(246,243,236,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 980px; margin: auto; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; gap: 10px; }
.topbar .logo { height: 40px; width: auto; }
.nav { display: none; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; }
.nav a.on { background: var(--ink); color: var(--gold-l); }
.main { max-width: 760px; margin: auto; padding: 18px 16px 110px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--ink); display: flex; justify-content: space-around; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.15); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #8d979c; text-decoration: none; font-size: .7rem; font-weight: 600; padding: 4px 10px; border-radius: 12px; }
.tabbar a.on { color: var(--gold-l); }
.tabbar a svg.i { width: 23px; height: 23px; }
@media (min-width: 900px) { .nav { display: flex; } .tabbar { display: none; } .main { padding-bottom: 40px; } }
.hello { margin: 4px 0 16px; } .hello h1 { margin: 0; }
.section-t { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 10px; }
.section-t h2 { margin: 0; }
.bday { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.bday .p { flex: none; width: 86px; text-align: center; font-size: .78rem; }
.bday .p .avatar { margin: 0 auto 6px; width: 56px; height: 56px; }
.bday .p.hoy .avatar { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--gold); }

/* ---------- Pantallas de acceso ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.auth .side { display: none; background: radial-gradient(120% 80% at 0% 0%, #26323a 0%, var(--ink) 65%); color: #fff; padding: 48px; position: relative; overflow: hidden; }
.auth .side h1 { font-size: 2.2rem; color: #fff; } .auth .side h1 em { font-style: normal; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth .side li { margin: 10px 0; color: #d4d9dc; display: flex; gap: 10px; } .auth .side li svg { color: var(--gold-l); }
.auth .form { padding: 28px 18px 40px; max-width: 460px; width: 100%; margin: auto; }
.auth .form .logo { height: 72px; margin: 0 auto 18px; }
@media (min-width: 960px) { .auth { grid-template-columns: 1.05fr 1fr; } .auth .side { display: flex; flex-direction: column; justify-content: center; } }
.prog-list { max-height: 260px; overflow: auto; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 4px 12px; background: #fff; }
.prog-item { padding: 6px 0; border-bottom: 1px solid var(--line-2); } .prog-item:last-child { border-bottom: 0; }
.prog-item input[type=text] { margin: 4px 0 4px 30px; width: calc(100% - 30px); padding: 7px 10px; font-size: .85rem; }

/* ---------- Pie de página ---------- */
.pie { text-align: center; color: var(--muted); font-size: .76rem; padding: 28px 12px 8px; line-height: 1.6; }
.pie span { white-space: nowrap; }
.auth .form .pie { padding-top: 36px; }

/* ---------- Ventanas y avisos ---------- */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; opacity: 0; transition: .25s; z-index: 100; max-width: 92vw; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast.on { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--err); }
@media (min-width: 900px) { .toast { bottom: 28px; } }
.modal-bg { position: fixed; inset: 0; background: rgba(11,18,21,.55); z-index: 90; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: #fff; border-radius: 20px; padding: 24px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal.wide { max-width: 860px; }
.modal .x { float: right; background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); }
@keyframes fade { from { opacity: 0; } }
.confetti { font-size: 3rem; text-align: center; }
.loader { display: grid; place-items: center; min-height: 40vh; color: var(--muted); }
.spin { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- Panel de administración ---------- */
.adm { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.side-nav { background: var(--ink); color: #cfd5d8; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; }
.side-nav .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; }
.side-nav .brand img { width: 40px; height: 40px; }
.side-nav .brand small { display: block; color: var(--gold-l); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: #aeb7bb; text-decoration: none; font-weight: 600; font-size: .92rem; }
.side-nav a:hover { background: var(--ink-2); color: #fff; }
.side-nav a.on { background: var(--ink-3); color: var(--gold-l); }
.side-nav a .badge { margin-left: auto; background: var(--gold); color: var(--ink); border-radius: 999px; padding: 1px 8px; font-size: .72rem; font-weight: 800; }
.side-nav .sep { flex: 1; }
.adm-main { padding: 22px 18px 60px; max-width: 1200px; width: 100%; }
.adm-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.adm-head h1 { margin: 0; }
.kpi { background: var(--card); border-radius: var(--r); padding: 16px 18px; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.kpi small { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.kpi b { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1.15; margin-top: 4px; }
.kpi.dark { background: var(--ink); color: #fff; border: 0; } .kpi.dark small { color: #9aa4a9; } .kpi.dark b { color: var(--gold-l); }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: #fcfaf5; }
.tbl-wrap { overflow-x: auto; }
.pend { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.pend:last-child { border-bottom: 0; }
.pend .who { flex: 1; min-width: 200px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input { flex: 1; min-width: 200px; } .filters select { width: auto; }
.qr-box { background: #fff; padding: 16px; border-radius: 14px; display: inline-block; border: 1px solid var(--line); }
.qr-box canvas, .qr-box img { width: 220px; height: 220px; }
.big-code { font-size: 2rem; font-weight: 800; letter-spacing: .2em; color: var(--ink); }
.mobile-top { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: #fff; padding: 10px 14px; }
.mobile-top img { height: 34px; }
@media (max-width: 899px) { .side-nav { position: fixed; inset: 0 30% 0 0; z-index: 80; transform: translateX(-100%); transition: .2s; } .side-nav.open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.4); } }
@media (min-width: 900px) { .adm { grid-template-columns: 250px 1fr; } .side-nav { position: sticky; top: 0; height: 100vh; } .mobile-top { display: none; } .adm-main { padding: 28px 32px 60px; } }
