/* ===== MẠNH LIFE V70 - AUTH ACCOUNT + POPUP FIX ===== */
#mlAuthBox{
  position:relative !important;
  top:auto !important;
  right:auto !important;
  z-index:3 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:0 !important;
  padding:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
  flex:0 0 auto !important;
  width:auto !important;
  margin-left:auto !important;
  align-self:center !important;
}

#mlAuthAvatar{
  appearance:none !important;
  border:0 !important;
  width:42px !important;
  height:42px !important;
  border-radius:999px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 !important;
  margin:0 !important;
  overflow:hidden !important;
  background:linear-gradient(135deg,#22c55e,#16a34a) !important;
  color:#fff !important;
  font-size:18px !important;
  font-weight:900 !important;
  box-shadow:0 10px 24px rgba(34,197,94,.22) !important;
  flex:0 0 auto !important;
  cursor:pointer !important;
  transition:transform .15s ease, box-shadow .15s ease, filter .15s ease !important;
  text-decoration:none !important;
  user-select:none !important;
}

#mlAuthAvatar img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}

#mlAuthAvatar:hover{
  transform:translateY(-1px) !important;
  filter:brightness(1.03) !important;
}

#mlAuthAvatar:active{
  transform:translateY(0) scale(.98) !important;
}

#mlAuthStatus{
  display:inline-flex !important;
  align-items:center !important;
  max-width:120px !important;
  min-height:30px !important;
  padding:0 10px !important;
  border-radius:999px !important;
  background:linear-gradient(180deg,#ffffff,#f8fafc) !important;
  border:1px solid rgba(15,23,42,.08) !important;
  color:#0f172a !important;
  font-size:12px !important;
  font-weight:850 !important;
  letter-spacing:-.01em !important;
  overflow:hidden !important;
  white-space:nowrap !important;
  text-overflow:ellipsis !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9) !important;
}

#mlAccountBtn,
#mlGoogleLoginBtn,
#mlLogoutBtn{
  min-height:32px !important;
  padding:0 11px !important;
  border-radius:999px !important;
  border:0 !important;
  font-size:12px !important;
  font-weight:900 !important;
  letter-spacing:-.01em !important;
  cursor:pointer !important;
  transition:transform .15s ease, box-shadow .15s ease, filter .15s ease !important;
  white-space:nowrap !important;
}

#mlAccountBtn{
  background:linear-gradient(180deg,#fff,#f8fafc) !important;
  color:#111827 !important;
  border:1px solid rgba(15,23,42,.09) !important;
  box-shadow:0 10px 24px rgba(15,23,42,.10) !important;
}

#mlGoogleLoginBtn{
  background:linear-gradient(135deg,#ff7a1a,#ff4d00) !important;
  color:#fff !important;
  box-shadow:0 12px 28px rgba(255,91,0,.28) !important;
}

#mlLogoutBtn{
  background:linear-gradient(135deg,#111827,#020617) !important;
  color:#fff !important;
  box-shadow:0 12px 28px rgba(15,23,42,.22) !important;
}

#mlAccountBtn:hover,
#mlGoogleLoginBtn:hover,
#mlLogoutBtn:hover{
  transform:translateY(-1px) !important;
  filter:brightness(1.04) !important;
}

#mlAccountBtn:active,
#mlGoogleLoginBtn:active,
#mlLogoutBtn:active{
  transform:translateY(0) scale(.98) !important;
}

.ml-auth-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:1000000;
  background:rgba(15,23,42,.38);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.ml-auth-modal-backdrop.open{display:flex;}

.ml-auth-modal{
  width:min(560px,100%);
  max-height:92vh;
  overflow:auto;
  border-radius:28px;
  background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,250,252,.98));
  border:1px solid rgba(255,255,255,.95);
  box-shadow:0 28px 90px rgba(15,23,42,.28);
  padding:22px;
}

.ml-auth-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}

.ml-auth-modal-head h2{
  margin:0;
  font-size:24px;
  line-height:1.15;
  color:#0f172a;
  letter-spacing:-.04em;
}

.ml-auth-modal-head p{
  margin:6px 0 0;
  color:#64748b;
  font-weight:650;
  line-height:1.45;
}

.ml-auth-close{
  width:38px;
  height:38px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  color:#0f172a;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(15,23,42,.10);
}

.ml-auth-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:6px;
  background:#f1f5f9;
  border-radius:18px;
  margin-bottom:16px;
}

.ml-auth-tab{
  border:0;
  background:transparent;
  color:#64748b;
  font-weight:900;
  border-radius:14px;
  padding:10px 12px;
  cursor:pointer;
}

.ml-auth-tab.active{
  background:#fff;
  color:#0f172a;
  box-shadow:0 8px 22px rgba(15,23,42,.08);
}

.ml-auth-panel{display:none;}
.ml-auth-panel.active{display:block;}

.ml-auth-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.ml-auth-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.ml-auth-field.full{grid-column:1/-1;}

.ml-auth-field span{
  color:#475569;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.ml-auth-field input{
  width:100%;
  min-height:44px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  padding:0 13px;
  font-size:14px;
  color:#0f172a;
  outline:none;
  box-sizing:border-box;
}

.ml-auth-field input:focus{
  border-color:rgba(255,107,0,.55);
  box-shadow:0 0 0 4px rgba(255,107,0,.10);
}

.ml-auth-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

.ml-auth-primary,
.ml-auth-secondary,
.ml-auth-google,
.ml-auth-danger{
  min-height:44px;
  border:0;
  border-radius:14px;
  padding:0 16px;
  font-weight:950;
  cursor:pointer;
}

.ml-auth-primary{
  background:linear-gradient(135deg,#ff7a1a,#ff4d00);
  color:#fff;
  box-shadow:0 12px 28px rgba(255,91,0,.24);
}

.ml-auth-google{
  background:#fff;
  color:#111827;
  border:1px solid rgba(15,23,42,.10);
  box-shadow:0 10px 24px rgba(15,23,42,.08);
}

.ml-auth-secondary{
  background:#f1f5f9;
  color:#111827;
}

.ml-auth-danger{
  background:#111827;
  color:#fff;
}

.ml-auth-note{
  margin-top:12px;
  color:#64748b;
  font-size:13px;
  line-height:1.45;
  font-weight:650;
}

.ml-auth-summary{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
  border-radius:20px;
  background:linear-gradient(135deg,rgba(15,23,42,.03),rgba(249,115,22,.05));
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 12px 28px rgba(15,23,42,.06);
}

.ml-auth-summary-avatar{
  width:56px;
  height:56px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:linear-gradient(135deg,#22c55e,#16a34a);
  color:#fff;
  font-size:24px;
  font-weight:950;
  flex:0 0 auto;
  box-shadow:0 10px 24px rgba(34,197,94,.22);
}

.ml-auth-summary-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.ml-auth-summary-copy{
  min-width:0;
  display:grid;
  gap:3px;
}

.ml-auth-summary-copy strong{
  color:#0f172a;
  font-size:18px;
  line-height:1.15;
  font-weight:950;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ml-auth-summary-copy span{
  color:#475569;
  font-size:13px;
  font-weight:750;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ml-auth-summary-copy small{
  color:#64748b;
  font-size:12px;
  font-weight:700;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ml-auth-meta-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}

.ml-auth-meta{
  padding:12px 13px;
  border-radius:16px;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 10px 24px rgba(15,23,42,.05);
}

.ml-auth-meta span{
  display:block;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.ml-auth-meta strong{
  display:block;
  margin-top:5px;
  color:#0f172a;
  font-size:13px;
  line-height:1.35;
  font-weight:900;
  overflow-wrap:anywhere;
}

#mlTaskPopupToggle{
  z-index:999998 !important;
  pointer-events:auto !important;
  cursor:pointer !important;
  box-shadow:0 18px 45px rgba(15,23,42,.26) !important;
}

#mlTaskFloatingPopup{
  z-index:999997 !important;
}

@media (max-width: 768px){
  #mlAuthBox{
    width:auto !important;
    margin-left:auto !important;
    align-self:center !important;
    justify-content:flex-end !important;
    gap:0 !important;
    padding:0 !important;
    transform:none !important;
  }
  #mlAuthAvatar{width:38px !important;height:38px !important;font-size:16px !important;}
  .ml-auth-grid{grid-template-columns:1fr;}
  .ml-auth-meta-grid{grid-template-columns:1fr;}
  .ml-auth-summary{align-items:flex-start;}
  .ml-auth-summary-avatar{width:48px;height:48px;border-radius:16px;font-size:20px;}
  .ml-auth-modal{border-radius:22px;padding:16px;}
}
