/* v63: login, inicio visual, modal usuario, menú móvil funcional y coherencia dashboard */
html:has(body.is-login), body.is-login{height:100%;overflow:hidden!important;}
body.is-login .stars,body.is-login .nebula{position:fixed!important;inset:0!important;pointer-events:none!important;}
body.is-login .app-shell.login-shell{min-height:100dvh!important;height:100dvh!important;overflow:hidden!important;display:grid!important;place-items:center!important;padding:12px!important;}
body.is-login .login-card{max-height:calc(100dvh - 24px)!important;overflow:visible!important;width:min(390px,calc(100vw - 24px))!important;padding:clamp(1rem,2.4vh,1.55rem)!important;}
body.is-login .login-card h1{font-size:clamp(1.35rem,4.8vw,1.85rem)!important;margin:.45rem 0!important;}
body.is-login .login-card .privacy-note{margin:.35rem 0 .75rem!important;line-height:1.35!important;}
body.is-login .login-card form{gap:.62rem!important;}
body.is-login .login-card label{gap:.3rem!important;}
body.is-login .login-card input,body.is-login .login-card .mct-btn{min-height:44px!important;}

.patient-insight-grid{display:none!important;}
.patient-remarkable-grid{display:grid;grid-template-columns:1.35fr repeat(2,minmax(0,1fr));gap:1rem;align-items:stretch;margin-top:1rem;}
.remarkable-main-card{grid-row:span 2;background:radial-gradient(circle at 12% 15%,rgba(103,232,249,.17),transparent 34%),linear-gradient(135deg,rgba(255,255,255,.08),rgba(255,255,255,.035))!important;}
.remarkable-chip{display:inline-grid;place-items:center;border-radius:999px;padding:.38rem .72rem;background:rgba(103,232,249,.12);color:#a5f3fc;font-weight:900;font-size:.8rem;letter-spacing:.04em;}
.remarkable-compass{display:grid;grid-template-columns:132px minmax(0,1fr);gap:1rem;align-items:center;margin-top:1rem;}
.remarkable-orb{width:132px;height:132px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#67e8f9 var(--value),rgba(255,255,255,.12) 0);box-shadow:0 0 42px rgba(103,232,249,.18);position:relative;}
.remarkable-orb:before{content:"";position:absolute;inset:18px;border-radius:inherit;background:rgba(8,13,30,.94);}
.remarkable-orb span,.remarkable-orb small{position:relative;z-index:1;grid-area:1/1;}
.remarkable-orb span{font-size:2rem;font-weight:950;color:#fff;transform:translateY(-.25rem);}
.remarkable-orb small{color:var(--muted);font-size:.75rem;transform:translateY(1.35rem);}
.remarkable-stat-card{min-height:150px;display:flex;flex-direction:column;justify-content:space-between;}
.remarkable-stat-card>span{color:#67e8f9;font-size:.78rem;text-transform:uppercase;font-weight:950;letter-spacing:.08em;}
.remarkable-stat-card h3{margin:.35rem 0;font-size:1.16rem;}
.remarkable-stat-card p{margin:0;color:var(--muted);line-height:1.45;}

.sidebar nav a{display:flex!important;align-items:center!important;gap:.75rem!important;min-height:48px!important;padding:.78rem .95rem!important;border-radius:16px!important;background:rgba(255,255,255,.055)!important;border:1px solid rgba(160,190,255,.13)!important;color:inherit!important;}
.sidebar nav a:hover,.sidebar nav a:focus-visible{background:rgba(103,232,249,.11)!important;border-color:rgba(103,232,249,.3)!important;}
.sidebar nav a .nav-svg,.nav-emoji{width:26px!important;height:26px!important;min-width:26px!important;display:inline-grid!important;place-items:center!important;margin:0!important;font-size:24px!important;line-height:1!important;text-align:center!important;}
.nav-emoji{filter:drop-shadow(0 0 10px rgba(103,232,249,.14));}
.nav-badge{margin-left:auto!important;}

.role-admin .admin-home.admin-v57 .admin-panel-stack{margin-top:1rem;}
body.role-admin.admin-subpanel-active .admin-home>.mct-header,
body.role-admin.admin-subpanel-active .admin-home>.admin-kpi-grid,
body.role-admin.admin-subpanel-active #admin-start-panel{display:none!important;}
body.role-admin.admin-subpanel-active .admin-home{padding-top:0!important;}
#admin-users-panel,#admin-assignments-panel{background:radial-gradient(circle at 0 0,rgba(103,232,249,.13),transparent 32%),linear-gradient(135deg,rgba(255,255,255,.075),rgba(255,255,255,.035))!important;}
#admin-users-panel .panel-head,#admin-assignments-panel .panel-head{align-items:flex-start!important;border-bottom:1px solid rgba(160,190,255,.13);padding-bottom:1rem;margin-bottom:1rem;}
#admin-users-panel .compact-list,#admin-assignments-panel .compact-list{display:grid;gap:.72rem;}
#admin-users-panel .compact-row,#admin-assignments-panel .compact-row{display:grid!important;grid-template-columns:minmax(150px,1fr) minmax(110px,.7fr) minmax(190px,1fr) auto;align-items:center;gap:.8rem;padding:1rem!important;border-radius:18px!important;background:rgba(3,7,18,.36)!important;border:1px solid rgba(160,190,255,.12)!important;}
#admin-assignments-panel .compact-row{grid-template-columns:minmax(170px,1fr) minmax(170px,1fr) auto;}
.admin-inline-form{padding:1rem;border-radius:20px;background:rgba(3,7,18,.3);border:1px solid rgba(160,190,255,.12);}

.user-menu-popover{position:fixed!important;inset:clamp(10px,3vw,28px)!important;width:auto!important;max-width:min(980px,calc(100vw - 20px))!important;max-height:calc(100dvh - 20px)!important;margin:auto!important;z-index:2147483200!important;border-radius:28px!important;padding:clamp(1rem,2.5vw,1.5rem)!important;overflow:auto!important;background:rgba(6,10,24,.96)!important;border:1px solid rgba(160,190,255,.22)!important;box-shadow:0 30px 90px rgba(0,0,0,.72)!important;}
.user-menu-popover.is-open{display:block!important;}
.user-menu-popover:before{content:"";position:fixed;inset:0;background:rgba(0,0,0,.62);backdrop-filter:blur(8px);z-index:-1;}
.user-menu-popover .panel-head{position:sticky;top:0;z-index:2;background:linear-gradient(180deg,rgba(6,10,24,.98),rgba(6,10,24,.86));border-bottom:1px solid rgba(160,190,255,.12);padding-bottom:.9rem;margin-bottom:1rem;}
.user-menu-tabs{display:flex!important;gap:.65rem;flex-wrap:wrap;margin-bottom:1rem;}
.user-menu-tabs .mini-btn{width:auto!important;border-radius:999px!important;background:rgba(255,255,255,.06)!important;border:1px solid rgba(160,190,255,.14)!important;color:#dbeafe!important;}
.user-menu-tabs .mini-btn.active{background:linear-gradient(135deg,rgba(103,232,249,.24),rgba(167,139,250,.22))!important;border-color:rgba(103,232,249,.45)!important;color:#fff!important;}
.user-menu-panel{display:none!important;}
.user-menu-panel.active{display:block!important;}
.user-menu-panel form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;}
.user-menu-panel label{display:grid;gap:.45rem;color:#dbeafe;font-weight:800;}
.user-menu-panel input,.user-menu-panel select{width:100%;min-height:48px;border-radius:15px;border:1px solid rgba(160,190,255,.18);background:rgba(3,7,18,.72);color:#fff;padding:.75rem .9rem;}
.user-menu-panel .btn.full{grid-column:1/-1;min-height:48px;border-radius:15px;}

@media(max-width:760px){
  body:not(.is-login){padding-top:68px!important;}
  .mobile-topbar{display:flex!important;position:fixed!important;inset:0 0 auto 0!important;width:100vw!important;height:68px!important;z-index:2147483100!important;background:#000!important;border-radius:0!important;border-bottom:1px solid rgba(255,255,255,.16)!important;box-shadow:0 12px 32px rgba(0,0,0,.72)!important;align-items:center!important;padding:10px 14px!important;}
  .mobile-menu{display:inline-flex!important;align-items:center!important;gap:.6rem!important;min-width:120px!important;height:46px!important;border-radius:14px!important;background:#111827!important;border:1px solid rgba(255,255,255,.18)!important;color:#fff!important;font-weight:950!important;}
  .sidebar{position:fixed!important;top:68px!important;left:0!important;right:auto!important;bottom:auto!important;width:min(340px,88vw)!important;height:calc(100dvh - 68px)!important;transform:translateX(-106%)!important;transition:transform .24s ease!important;z-index:2147483050!important;border-radius:0 24px 24px 0!important;overflow:auto!important;background:rgba(5,8,18,.98)!important;padding:1rem!important;}
  body.menu-open .sidebar{transform:translateX(0)!important;}
  .sidebar-backdrop{display:none!important;position:fixed!important;inset:68px 0 0 0!important;background:rgba(0,0,0,.62)!important;z-index:2147483040!important;}
  body.menu-open .sidebar-backdrop{display:block!important;}
  .sidebar .brand,.sidebar .profile,.sidebar .bottom-icons{display:flex!important;}
  .sidebar nav{display:grid!important;gap:.45rem!important;overflow:visible!important;padding:.75rem 0!important;}
  .sidebar nav a{width:100%!important;white-space:normal!important;}
  .main{padding-top:1rem!important;padding-bottom:2rem!important;}
  .patient-remarkable-grid{grid-template-columns:1fr!important;}
  .remarkable-main-card{grid-row:auto;}
  .remarkable-compass{grid-template-columns:1fr;text-align:center;}
  .remarkable-orb{margin:auto;}
  #admin-users-panel .compact-row,#admin-assignments-panel .compact-row{grid-template-columns:1fr!important;align-items:start;}
  .user-menu-popover{inset:8px!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;border-radius:22px!important;}
  .user-menu-panel form{grid-template-columns:1fr;}
}
@media(max-height:620px){body.is-login .login-card .mct-icon{width:46px!important;height:46px!important;min-width:46px!important;font-size:1.2rem!important;}body.is-login .login-card .privacy-note{display:none!important;}}
