/* CTGM V74 — Correcciones solicitadas para Inicio y Perfil.
   Se mantiene intacta la funcionalidad real de CTGM y V73. */
html body.ctgm-ui .app-header.v72-brandbar,
html body.ctgm-ui .app-header[hidden] {display:none!important}
html body.ctgm-ui .shell{padding-top:max(10px,env(safe-area-inset-top,0px))!important}
html body.ctgm-ui .v72-topbar{justify-content:flex-start;gap:15px;padding:12px 2px 6px;max-width:830px;margin-inline:auto}
html body.ctgm-ui .v72-home-avatar{margin:0;width:72px;height:72px;min-width:72px;border-radius:22px;border:0;background:#188ec6;box-shadow:none;overflow:hidden}
html body.ctgm-ui .v72-home-avatar img{width:100%;height:100%;object-fit:cover;object-position:center}
html body.ctgm-ui .v72-welcome{gap:4px}
html body.ctgm-ui .v72-welcome small{font-size:10px;font-weight:850;color:#607687!important;letter-spacing:.15em}
html body.ctgm-ui .v72-welcome strong{font-size:clamp(18px,4.3vw,25px);font-weight:950;color:#111e28!important;white-space:normal;overflow-wrap:anywhere;text-transform:none}
html body.ctgm-ui .v72-home-content{padding-top:22px}
html body.ctgm-ui .v72-loyalty{background:transparent!important;box-shadow:none!important;border:0!important;border-radius:0!important;overflow:visible!important}
html body.ctgm-ui .v72-loyalty>img{display:block;width:100%;height:auto;max-height:none;object-fit:contain;filter:drop-shadow(0 11px 16px #16334b15)}
html body.ctgm-ui .v72-loyalty>span{min-height:42px;margin:5px 4px 2px;padding:4px 0;background:transparent!important;box-shadow:none!important;border:0!important;color:#167747!important;font-size:14px;font-weight:850;display:flex;justify-content:space-between;align-items:center;text-decoration:none}
html body.ctgm-ui .v72-loyalty>span>span{font-size:21px;color:#167747!important}
html body.ctgm-ui #v73HomeStamps{background:transparent;border:0;border-radius:0;box-shadow:none;padding:8px 4px 2px;margin:0 0 12px}
html body.ctgm-ui #v73HomeStamps>strong{color:#136e48!important}
html body.ctgm-ui #v73HomeStamps b{width:31px;height:31px}
html body.ctgm-ui .v72-tile-rewards{overflow:hidden}
html body.ctgm-ui .v72-tile-rewards strong{font-size:clamp(17px,4vw,30px);padding-right:36px;overflow-wrap:normal}
html body.ctgm-ui .v72-tile-rewards>span{right:10px;top:13px;width:30px;height:30px}
/* La ficha principal es una portada de identidad, no un listado de apartados. */
html body.ctgm-ui #view-perfil.v74-profile{max-width:850px;margin:0 auto;background:linear-gradient(155deg,#ffae15,#ff9700 65%,#f7a210);padding:16px 18px 30px!important;border-radius:30px;box-shadow:0 14px 40px #ac6b0936!important}
html body.ctgm-ui #view-perfil.v74-profile .v72-profile-intro{margin:6px 2px 14px!important;padding:0!important}
html body.ctgm-ui #view-perfil.v74-profile .v72-profile-intro h1{font-size:clamp(34px,7vw,46px)!important;line-height:1.04;letter-spacing:-.055em;color:#111!important;margin:8px 0!important}
html body.ctgm-ui #view-perfil.v74-profile .v72-profile-intro p{font-size:13px!important;line-height:1.5;color:#3e2e16!important;margin:7px 0}
html body.ctgm-ui #view-perfil.v74-profile .member-dossier{width:100%;padding:10px 4px 18px!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;display:flex;flex-direction:column;align-items:stretch}
html body.ctgm-ui #view-perfil.v74-profile .member-dossier-top{display:none!important}
html body.ctgm-ui #view-perfil.v74-profile .profile-top{display:flex!important;flex-direction:column!important;gap:13px!important;align-items:center!important;width:100%;margin:0 auto!important}
html body.ctgm-ui #view-perfil.v74-profile .profile-avatar-wrap{width:min(100%,340px);display:flex!important;flex-direction:column;align-items:center;gap:7px}
html body.ctgm-ui #view-perfil.v74-profile .profile-avatar{display:block!important;position:relative;width:clamp(210px,68vw,315px)!important;height:clamp(210px,68vw,315px)!important;border-radius:29px!important;background:#131313!important;border:5px solid #f7b74a!important;box-shadow:0 13px 28px #713c0035!important;overflow:visible!important;padding:0}
html body.ctgm-ui #view-perfil.v74-profile .profile-avatar img{width:100%;height:100%;border-radius:24px!important;object-fit:cover!important;object-position:center;display:block}
html body.ctgm-ui #view-perfil.v74-profile .profile-avatar img[hidden]{display:none!important}
html body.ctgm-ui #view-perfil.v74-profile .profile-avatar #profileAvatarFallback{font-size:clamp(56px,12vw,90px);font-weight:900;color:#fff!important;display:grid;place-items:center;height:100%}
html body.ctgm-ui #view-perfil.v74-profile .profile-avatar #profileAvatarFallback[hidden]{display:none!important}
html body.ctgm-ui #view-perfil.v74-profile .profile-avatar-edit{width:52px;height:52px;right:-8px;bottom:-8px;border:3px solid #ffa51b;border-radius:16px;background:#078fc8;color:#fff!important;font-size:36px;z-index:1}
html body.ctgm-ui #view-perfil.v74-profile #profilePhotoAction{margin-top:8px;padding:8px 16px;border-radius:999px;font-size:12px;background:#171717!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
html body.ctgm-ui #view-perfil.v74-profile .profile-top-info{width:100%;display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center}
html body.ctgm-ui #view-perfil.v74-profile .member-role{display:none}
html body.ctgm-ui #view-perfil.v74-profile .profile-name{font-size:clamp(25px,7vw,41px)!important;line-height:1.08!important;letter-spacing:-.04em!important;font-weight:1000!important;text-align:center!important;text-transform:uppercase;overflow-wrap:anywhere;color:#101010!important;margin:10px 0 3px!important}
html body.ctgm-ui #view-perfil.v74-profile .member-contact{width:100%;display:grid!important;gap:4px;justify-items:center;overflow-wrap:anywhere}
html body.ctgm-ui #view-perfil.v74-profile #accountEmail{font-size:clamp(18px,4.4vw,25px);line-height:1.25;color:#181818!important;-webkit-text-fill-color:#181818!important;font-weight:850}
html body.ctgm-ui #view-perfil.v74-profile #profilePhone{font-size:clamp(20px,5vw,29px);line-height:1.15;color:#181818!important;-webkit-text-fill-color:#181818!important;font-weight:900}
html body.ctgm-ui #view-perfil.v74-profile .profile-logout{order:2;align-self:center!important;margin:9px 0 4px}
html body.ctgm-ui #view-perfil.v74-profile .member-id-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:11px;width:100%;max-width:660px;margin:22px auto 0;border-radius:23px!important;padding:16px 17px!important;background:#955406!important;color:#fff!important;box-shadow:none!important}
html body.ctgm-ui #view-perfil.v74-profile .member-id-row small{display:block;color:#fff1d4!important;letter-spacing:.12em;font-weight:850;font-size:11px}
html body.ctgm-ui #view-perfil.v74-profile .member-id-row strong{font-size:clamp(16px,4.4vw,26px)!important;font-weight:1000!important;line-height:1.25;letter-spacing:-.025em;color:#fff!important;overflow-wrap:anywhere}
html body.ctgm-ui #view-perfil.v74-profile .member-id-row .btn{white-space:nowrap;padding:10px 12px!important;border-radius:13px;background:#fff!important;color:#763a00!important;font-weight:900}
html body.ctgm-ui #view-perfil.v74-profile .member-photo-note{display:none}
html body.ctgm-ui #view-perfil.v74-profile .v74-profile-menu{display:grid;gap:11px;margin:8px 0 5px;padding:0}
html body.ctgm-ui #view-perfil.v74-profile .v74-profile-menu a{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:80px;background:#191919;border:1px solid #2b2b2b;border-radius:20px;padding:15px 19px;text-decoration:none!important;color:#fff!important;box-shadow:0 5px 0 #4e2a001a}
html body.ctgm-ui #view-perfil.v74-profile .v74-profile-menu a>span{display:flex;flex-direction:column;gap:4px;color:#fff!important;font-size:clamp(20px,5vw,28px);font-weight:1000;letter-spacing:-.035em}
html body.ctgm-ui #view-perfil.v74-profile .v74-profile-menu a small{color:#ced1d4!important;font-size:12px;font-weight:650;letter-spacing:0}
html body.ctgm-ui #view-perfil.v74-profile .v74-profile-menu a>b{font-size:35px;line-height:1;color:#fff!important;font-weight:400}
html body.ctgm-ui #view-perfil.v74-profile .v74-admin-link{display:block;background:#fff;border-radius:13px;padding:13px 15px;text-align:center;color:#141414!important;font-weight:900;margin-bottom:10px}
html body.ctgm-ui #view-perfil.v74-profile .v74-admin-link[hidden]{display:none!important}
html body.ctgm-ui #view-perfil.v74-profile #profileData{display:none!important}
html body.ctgm-ui #view-perfil.v74-profile #profileMsg{font-size:12px;text-align:center}
html body.ctgm-ui #view-perfil.v74-profile #linkPending{background:#fff!important}
/* Páginas independientes: Referidos / Vincular / Historiales / Notificaciones. */
html body.ctgm-ui .view.v74-subview{width:min(100%,850px);margin:0 auto;padding:8px 0 24px!important}
html body.ctgm-ui .view.v74-subview[hidden]{display:none!important}
html body.ctgm-ui .v74-sub-head{display:flex;align-items:flex-start;gap:14px;margin:8px 0 20px}
html body.ctgm-ui .v74-back{width:48px;height:48px;flex:none;display:grid;place-items:center;border-radius:50%;background:#fff;border:1px solid #d8e6ea;color:#162f41!important;font-size:34px;line-height:1;text-decoration:none}
html body.ctgm-ui .v74-sub-head>div{min-width:0;flex:1}
html body.ctgm-ui .v74-sub-head small{font-size:11px;font-weight:900;letter-spacing:.17em;color:#0f84ad!important}
html body.ctgm-ui .v74-sub-head h1{font-size:clamp(28px,6vw,41px);font-weight:950;line-height:1.1;margin:4px 0 8px;letter-spacing:-.045em;color:#152331!important}
html body.ctgm-ui .v74-sub-head p{font-size:13px;color:#59717b!important;margin:0}
html body.ctgm-ui .v74-sub-content{display:grid;gap:14px}
html body.ctgm-ui .v74-sub-content:empty:before{content:'Sin información disponible en este momento.';font-size:13px;color:#667d86}
html body.ctgm-ui .v74-sub-content>.card,html body.ctgm-ui .v74-sub-content>.referral-card{margin:0;border-radius:22px;background:#fff!important;box-shadow:0 10px 35px #17415712!important;padding:19px!important}
html body.ctgm-ui #v74Content-vincular #profileLinkCard[hidden]{display:none!important}
html body.ctgm-ui #v74Content-perfil-admin #appAdminAccess[hidden]{display:none!important}
@media(max-width:380px){html body.ctgm-ui #view-perfil.v74-profile{padding:15px 13px 26px!important}html body.ctgm-ui #view-perfil.v74-profile .member-id-row{grid-template-columns:1fr}html body.ctgm-ui #view-perfil.v74-profile .member-id-row .btn{justify-self:start}}

html body.ctgm-ui #view-perfil.v74-profile .v74-return-home{display:inline-flex;align-items:center;gap:6px;color:#141414!important;font-size:13px;font-weight:900;text-decoration:none;background:#ffdc87a8;border:1px solid #ffde89;border-radius:999px;padding:8px 13px;margin:0 0 9px}
html body.ctgm-ui #view-perfil.v74-profile .v74-admin-link{display:none!important}
html body.ctgm-ui:has(#appAdminAccess:not([hidden])) #view-perfil.v74-profile .v74-admin-link{display:block!important}

html body.ctgm-ui #view-perfil.v74-profile #accountArea>#logout{display:block;width:100%;max-width:250px;margin:21px auto 0;padding:12px 18px;border-radius:999px;background:#fff!important;color:#111!important;border:1px solid #f9c978!important;font-size:13px;font-weight:850;box-shadow:none!important}
